Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoRelease] t2-resource-2021-07-13-77207 #19764

Merged
merged 5 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sdk/resources/azure-mgmt-resource/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 18.1.0 (2021-07-13)

**Features**

- Added operation group SubscriptionFeatureRegistrationsOperations

## 18.0.0 (2021-05-19)

**Breaking changes**
Expand Down
8 changes: 4 additions & 4 deletions sdk/resources/azure-mgmt-resource/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.2",
"use": [
"@autorest/[email protected].0",
"@autorest/[email protected].1"
"@autorest/[email protected].1",
"@autorest/[email protected].2"
],
"commit": "6816683ce2d163a8ba62f426202fdcfbe7b68e35",
"commit": "67edac68c3362c820786f650333b731a4ad0da57",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/resources/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/[email protected].0 --use=@autorest/[email protected].1 --version=3.4.2",
"autorest_command": "autorest specification/resources/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/[email protected].1 --use=@autorest/[email protected].2 --version=3.4.2",
"readme": "specification/resources/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "18.0.0"
VERSION = "18.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "18.0.0"
VERSION = "18.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "18.0.0"
VERSION = "18.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "18.0.0"
VERSION = "18.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,31 @@ class FeatureClientConfiguration(Configuration):

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:param subscription_id: The Azure subscription ID.
:type subscription_id: str
:param provider_namespace: The provider namespace.
:type provider_namespace: str
"""

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

self.credential = credential
self.subscription_id = subscription_id
self.provider_namespace = provider_namespace
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-resource/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ class FeatureClient(FeatureClientOperationsMixin, MultiApiClientMixin, _SDKClien

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:param subscription_id: The Azure subscription ID.
:type subscription_id: str
:param provider_namespace: The provider namespace.
:type provider_namespace: str
:param api_version: API version to use if no profile is provided, or if missing in profile.
:type api_version: str
:param base_url: Service URL
Expand All @@ -56,7 +58,7 @@ class FeatureClient(FeatureClientOperationsMixin, MultiApiClientMixin, _SDKClien
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2015-12-01'
DEFAULT_API_VERSION = '2021-07-01'
_PROFILE_TAG = "azure.mgmt.resource.features.FeatureClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -69,14 +71,15 @@ def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
provider_namespace, # type: str
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
base_url = 'https://management.azure.com'
self._config = FeatureClientConfiguration(credential, subscription_id, **kwargs)
self._config = FeatureClientConfiguration(credential, subscription_id, provider_namespace, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(FeatureClient, self).__init__(
api_version=api_version,
Expand All @@ -92,25 +95,45 @@ def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:

* 2015-12-01: :mod:`v2015_12_01.models<azure.mgmt.resource.features.v2015_12_01.models>`
* 2021-07-01: :mod:`v2021_07_01.models<azure.mgmt.resource.features.v2021_07_01.models>`
"""
if api_version == '2015-12-01':
from .v2015_12_01 import models
return models
elif api_version == '2021-07-01':
from .v2021_07_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
def features(self):
"""Instance depends on the API version:

* 2015-12-01: :class:`FeaturesOperations<azure.mgmt.resource.features.v2015_12_01.operations.FeaturesOperations>`
* 2021-07-01: :class:`FeaturesOperations<azure.mgmt.resource.features.v2021_07_01.operations.FeaturesOperations>`
"""
api_version = self._get_api_version('features')
if api_version == '2015-12-01':
from .v2015_12_01.operations import FeaturesOperations as OperationClass
elif api_version == '2021-07-01':
from .v2021_07_01.operations import FeaturesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'features'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def subscription_feature_registrations(self):
"""Instance depends on the API version:

* 2021-07-01: :class:`SubscriptionFeatureRegistrationsOperations<azure.mgmt.resource.features.v2021_07_01.operations.SubscriptionFeatureRegistrationsOperations>`
"""
api_version = self._get_api_version('subscription_feature_registrations')
if api_version == '2021-07-01':
from .v2021_07_01.operations import SubscriptionFeatureRegistrationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'subscription_feature_registrations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

def close(self):
self._client.close()
def __enter__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ def list_operations(

:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either OperationListResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.resource.features.v2015_12_01.models.OperationListResult]
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.resource.features.v2021_07_01.models.OperationListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('list_operations')
if api_version == '2015-12-01':
from .v2015_12_01.operations import FeatureClientOperationsMixin as OperationClass
elif api_version == '2021-07-01':
from .v2021_07_01.operations import FeatureClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'list_operations'".format(api_version))
mixin_instance = OperationClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "18.0.0"
VERSION = "18.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,30 @@ class FeatureClientConfiguration(Configuration):

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription.
:param subscription_id: The Azure subscription ID.
:type subscription_id: str
:param provider_namespace: The provider namespace.
:type provider_namespace: str
"""

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

self.credential = credential
self.subscription_id = subscription_id
self.provider_namespace = provider_namespace
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-resource/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ class FeatureClient(FeatureClientOperationsMixin, MultiApiClientMixin, _SDKClien

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription.
:param subscription_id: The Azure subscription ID.
:type subscription_id: str
:param provider_namespace: The provider namespace.
:type provider_namespace: str
:param api_version: API version to use if no profile is provided, or if missing in profile.
:type api_version: str
:param base_url: Service URL
Expand All @@ -54,7 +56,7 @@ class FeatureClient(FeatureClientOperationsMixin, MultiApiClientMixin, _SDKClien
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2015-12-01'
DEFAULT_API_VERSION = '2021-07-01'
_PROFILE_TAG = "azure.mgmt.resource.features.FeatureClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -67,14 +69,15 @@ def __init__(
self,
credential: "AsyncTokenCredential",
subscription_id: str,
provider_namespace: str,
api_version: Optional[str] = None,
base_url: Optional[str] = None,
profile: KnownProfiles = KnownProfiles.default,
**kwargs # type: Any
) -> None:
if not base_url:
base_url = 'https://management.azure.com'
self._config = FeatureClientConfiguration(credential, subscription_id, **kwargs)
self._config = FeatureClientConfiguration(credential, subscription_id, provider_namespace, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(FeatureClient, self).__init__(
api_version=api_version,
Expand All @@ -90,25 +93,45 @@ def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:

* 2015-12-01: :mod:`v2015_12_01.models<azure.mgmt.resource.features.v2015_12_01.models>`
* 2021-07-01: :mod:`v2021_07_01.models<azure.mgmt.resource.features.v2021_07_01.models>`
"""
if api_version == '2015-12-01':
from ..v2015_12_01 import models
return models
elif api_version == '2021-07-01':
from ..v2021_07_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
def features(self):
"""Instance depends on the API version:

* 2015-12-01: :class:`FeaturesOperations<azure.mgmt.resource.features.v2015_12_01.aio.operations.FeaturesOperations>`
* 2021-07-01: :class:`FeaturesOperations<azure.mgmt.resource.features.v2021_07_01.aio.operations.FeaturesOperations>`
"""
api_version = self._get_api_version('features')
if api_version == '2015-12-01':
from ..v2015_12_01.aio.operations import FeaturesOperations as OperationClass
elif api_version == '2021-07-01':
from ..v2021_07_01.aio.operations import FeaturesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'features'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def subscription_feature_registrations(self):
"""Instance depends on the API version:

* 2021-07-01: :class:`SubscriptionFeatureRegistrationsOperations<azure.mgmt.resource.features.v2021_07_01.aio.operations.SubscriptionFeatureRegistrationsOperations>`
"""
api_version = self._get_api_version('subscription_feature_registrations')
if api_version == '2021-07-01':
from ..v2021_07_01.aio.operations import SubscriptionFeatureRegistrationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'subscription_feature_registrations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

async def close(self):
await self._client.close()
async def __aenter__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ def list_operations(

:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either OperationListResult or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.features.v2015_12_01.models.OperationListResult]
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.features.v2021_07_01.models.OperationListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('list_operations')
if api_version == '2015-12-01':
from ..v2015_12_01.aio.operations import FeatureClientOperationsMixin as OperationClass
elif api_version == '2021-07-01':
from ..v2021_07_01.aio.operations import FeatureClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'list_operations'".format(api_version))
mixin_instance = OperationClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .v2015_12_01.models import *
from .v2021_07_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "18.0.0"
VERSION = "18.1.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._feature_client import FeatureClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['FeatureClient']

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