Skip to content

Commit

Permalink
CodeGen from PR 19415 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Fix small logical mistake in automation rules examples (Azure#19415)

* Fix small logical mistake in automation rules examples

* Update readme.md

Co-authored-by: Wei Dong <40835867+dw511214992@users.noreply.github.com>
  • Loading branch information
SDKAuto and dw511214992 committed Jun 20, 2022
1 parent cd545f8 commit 1740ea1
Show file tree
Hide file tree
Showing 83 changed files with 9,693 additions and 5,484 deletions.
6 changes: 3 additions & 3 deletions sdk/securityinsight/azure-mgmt-securityinsight/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.12.0",
"@autorest/python@5.16.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "e432d9cc87bfed320d8feead4b448be9481c9181",
"commit": "8f19637f5d779aa364f1f7cfeeb2c2b7d4980ad9",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/securityinsights/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"autorest_command": "autorest specification/securityinsights/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/securityinsights/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['SecurityInsights']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials import TokenCredential


class SecurityInsightsConfiguration(Configuration):
class SecurityInsightsConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for SecurityInsights.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,6 +29,9 @@ class SecurityInsightsConfiguration(Configuration):
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
Expand All @@ -38,14 +41,16 @@ def __init__(
**kwargs: Any
) -> None:
super(SecurityInsightsConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-06-01-preview") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2022-01-01-preview"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-securityinsight/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down

This file was deleted.

Loading

0 comments on commit 1740ea1

Please sign in to comment.