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

[ReleasePR azure-mgmt-resource] package-templatespecs-2019-06-preview tag added #12229

Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ResourceManagementClient(MultiApiClientMixin, SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2019-10-01'
DEFAULT_API_VERSION = '2020-06-01'
_PROFILE_TAG = "azure.mgmt.resource.resources.ResourceManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand Down Expand Up @@ -82,6 +82,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2019-07-01: :mod:`v2019_07_01.models<azure.mgmt.resource.resources.v2019_07_01.models>`
* 2019-08-01: :mod:`v2019_08_01.models<azure.mgmt.resource.resources.v2019_08_01.models>`
* 2019-10-01: :mod:`v2019_10_01.models<azure.mgmt.resource.resources.v2019_10_01.models>`
* 2020-06-01: :mod:`v2020_06_01.models<azure.mgmt.resource.resources.v2020_06_01.models>`
"""
if api_version == '2016-02-01':
from .v2016_02_01 import models
Expand Down Expand Up @@ -113,6 +114,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-10-01':
from .v2019_10_01 import models
return models
elif api_version == '2020-06-01':
from .v2020_06_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand All @@ -129,6 +133,7 @@ def deployment_operations(self):
* 2019-07-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_07_01.operations.DeploymentOperations>`
* 2019-08-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_08_01.operations.DeploymentOperations>`
* 2019-10-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentOperations>`
* 2020-06-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentOperations>`
"""
api_version = self._get_api_version('deployment_operations')
if api_version == '2016-02-01':
Expand All @@ -151,6 +156,8 @@ def deployment_operations(self):
from .v2019_08_01.operations import DeploymentOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import DeploymentOperations as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import DeploymentOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -169,6 +176,7 @@ def deployments(self):
* 2019-07-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.DeploymentsOperations>`
* 2019-08-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.DeploymentsOperations>`
* 2019-10-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentsOperations>`
* 2020-06-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentsOperations>`
"""
api_version = self._get_api_version('deployments')
if api_version == '2016-02-01':
Expand All @@ -191,6 +199,8 @@ def deployments(self):
from .v2019_08_01.operations import DeploymentsOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import DeploymentsOperations as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import DeploymentsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -205,6 +215,7 @@ def operations(self):
* 2019-07-01: :class:`Operations<azure.mgmt.resource.resources.v2019_07_01.operations.Operations>`
* 2019-08-01: :class:`Operations<azure.mgmt.resource.resources.v2019_08_01.operations.Operations>`
* 2019-10-01: :class:`Operations<azure.mgmt.resource.resources.v2019_10_01.operations.Operations>`
* 2020-06-01: :class:`Operations<azure.mgmt.resource.resources.v2020_06_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2018-05-01':
Expand All @@ -219,6 +230,8 @@ def operations(self):
from .v2019_08_01.operations import Operations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import Operations as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -237,6 +250,7 @@ def providers(self):
* 2019-07-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ProvidersOperations>`
* 2019-08-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ProvidersOperations>`
* 2019-10-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ProvidersOperations>`
* 2020-06-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ProvidersOperations>`
"""
api_version = self._get_api_version('providers')
if api_version == '2016-02-01':
Expand All @@ -259,6 +273,8 @@ def providers(self):
from .v2019_08_01.operations import ProvidersOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import ProvidersOperations as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import ProvidersOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -277,6 +293,7 @@ def resource_groups(self):
* 2019-07-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ResourceGroupsOperations>`
* 2019-08-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ResourceGroupsOperations>`
* 2019-10-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourceGroupsOperations>`
* 2020-06-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ResourceGroupsOperations>`
"""
api_version = self._get_api_version('resource_groups')
if api_version == '2016-02-01':
Expand All @@ -299,6 +316,8 @@ def resource_groups(self):
from .v2019_08_01.operations import ResourceGroupsOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import ResourceGroupsOperations as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import ResourceGroupsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -317,6 +336,7 @@ def resources(self):
* 2019-07-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ResourcesOperations>`
* 2019-08-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ResourcesOperations>`
* 2019-10-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourcesOperations>`
* 2020-06-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ResourcesOperations>`
"""
api_version = self._get_api_version('resources')
if api_version == '2016-02-01':
Expand All @@ -339,6 +359,8 @@ def resources(self):
from .v2019_08_01.operations import ResourcesOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import ResourcesOperations as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import ResourcesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -357,6 +379,7 @@ def tags(self):
* 2019-07-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.TagsOperations>`
* 2019-08-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.TagsOperations>`
* 2019-10-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.TagsOperations>`
* 2020-06-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.TagsOperations>`
"""
api_version = self._get_api_version('tags')
if api_version == '2016-02-01':
Expand All @@ -379,6 +402,8 @@ def tags(self):
from .v2019_08_01.operations import TagsOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import TagsOperations as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import TagsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
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 .v2019_10_01.models import *
from .v2020_06_01.models import *
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 ._configuration import ResourceManagementClientConfiguration
from ._resource_management_client import ResourceManagementClient
__all__ = ['ResourceManagementClient', 'ResourceManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 msrestazure import AzureConfiguration

from .version import VERSION


class ResourceManagementClientConfiguration(AzureConfiguration):
"""Configuration for ResourceManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(ResourceManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-resource/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 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 msrest.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import ResourceManagementClientConfiguration
from .operations import Operations
from .operations import DeploymentsOperations
from .operations import ProvidersOperations
from .operations import ResourcesOperations
from .operations import ResourceGroupsOperations
from .operations import TagsOperations
from .operations import DeploymentOperations
from . import models


class ResourceManagementClient(SDKClient):
"""Provides operations for working with resources and resource groups.

:ivar config: Configuration for client.
:vartype config: ResourceManagementClientConfiguration

:ivar operations: Operations operations
:vartype operations: azure.mgmt.resource.resources.v2020_06_01.operations.Operations
:ivar deployments: Deployments operations
:vartype deployments: azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentsOperations
:ivar providers: Providers operations
:vartype providers: azure.mgmt.resource.resources.v2020_06_01.operations.ProvidersOperations
:ivar resources: Resources operations
:vartype resources: azure.mgmt.resource.resources.v2020_06_01.operations.ResourcesOperations
:ivar resource_groups: ResourceGroups operations
:vartype resource_groups: azure.mgmt.resource.resources.v2020_06_01.operations.ResourceGroupsOperations
:ivar tags: Tags operations
:vartype tags: azure.mgmt.resource.resources.v2020_06_01.operations.TagsOperations
:ivar deployment_operations: DeploymentOperations operations
:vartype deployment_operations: azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = ResourceManagementClientConfiguration(credentials, subscription_id, base_url)
super(ResourceManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2020-06-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.deployments = DeploymentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.providers = ProvidersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.resources = ResourcesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.resource_groups = ResourceGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.tags = TagsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.deployment_operations = DeploymentOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading