Skip to content

Commit

Permalink
CodeGen from PR 20434 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
{AzureSecurityContacts} fixes Azure/azure-rest-api-specs#20364 (Azure#20434)

Currently, the azure python SDK supports version 2017-08-01-preview for security contacts. We need to update it to 2020-01-01-preview.

fixes Azure/azure-rest-api-specs#20364

This request is forwarded from Azure#25771
  • Loading branch information
SDKAuto committed Sep 13, 2022
1 parent 732056b commit 596dbd0
Show file tree
Hide file tree
Showing 499 changed files with 71,552 additions and 47,272 deletions.
10 changes: 5 additions & 5 deletions sdk/security/azure-mgmt-security/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.8.4",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
"@autorest/python@6.1.5",
"@autorest/modelerfour@4.23.5"
],
"commit": "a8719243647b7c6d06ed287483d788808de7ecab",
"commit": "3bffe148db995d5af5bbb150a9716d4dff360342",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/security/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"autorest_command": "autorest specification/security/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.1.5 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
"readme": "specification/security/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
# --------------------------------------------------------------------------

from ._security_center import SecurityCenter
from ._version import VERSION

__version__ = VERSION
__all__ = ['SecurityCenter']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass

from ._version import VERSION

__version__ = VERSION
Original file line number Diff line number Diff line change
@@ -1,61 +1,54 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential


class SecurityCenterConfiguration(Configuration):
"""Configuration for SecurityCenter.
Note that all parameters used to create this instance are saved as instance
attributes.
:param credential: Credential needed for the client to connect to Azure.
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Azure subscription ID.
:param subscription_id: Azure subscription ID. Required.
:type subscription_id: str
:param asc_location: The location where ASC stores the data of the subscription. can be retrieved from Get locations.
:type asc_location: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
asc_location, # type: str
credential: "TokenCredential",
subscription_id: str,
**kwargs # type: Any
):
# type: (...) -> None
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.")
if asc_location is None:
raise ValueError("Parameter 'asc_location' must not be None.")
super(SecurityCenterConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.asc_location = asc_location
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-security/{}'.format(VERSION))
kwargs.setdefault('sdk_moniker', 'azure-mgmt-security/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
Expand All @@ -73,4 +66,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
159 changes: 0 additions & 159 deletions sdk/security/azure-mgmt-security/azure/mgmt/security/_metadata.json

This file was deleted.

Loading

0 comments on commit 596dbd0

Please sign in to comment.