Skip to content

Commit

Permalink
azure-mgmt-resource 2.0.0rc2 (#2570)
Browse files Browse the repository at this point in the history
* [AutoPR resources/resource-manager] Update Azure Governance Policy api-version to 2018-03-01 (#2553)

* Generated from c6fdb571641dffddc9ebde1f5d1d4d894fd696f6

Putting back original example, modified during troubleshooting.

* Generated from fbc7d29bd96e61e2042654350626a31b79e93ff6

Correct/improve wording in description properties.

* [AutoPR resources/resource-manager] <Do Not Merge> New APIs for Microsoft.Resources (#2500)

* Generated from 500eaaaf41a99addb917d3a1e4c071bb2f3f1648

All subscription level deployment APIs.

* Generated from 602243e2d56c1bdd3d8aa7bf725263ad815ab410

Update operation Ids.

* Generated from 8b06b2509ea6da282f0d878ede669fb5ab44cca1

update.

* Generated from 1a25db3512628e56cb23454b392bfe9ff1c85cdc

fix.

* Generated from 7e0f55500605a924c2c7f001f33cf5f7571911b9

add changes for readme.csharp.md.

* Update version.py

* [AutoPR resources/resource-manager] Minor updates to description properties to improve docs (#2718)

* Generated from 3458e4c78d94b38d05c2478c90fe62bf862420b4

Merge from main

* Generated from 3458e4c78d94b38d05c2478c90fe62bf862420b4

Merge from main

* Auto packaging file

* ChangeLog

* Change default policy

* Change resource to 2018-05-01
  • Loading branch information
AutorestCI authored and lmazuel committed Jun 13, 2018
1 parent f05a16b commit 600c8e7
Show file tree
Hide file tree
Showing 162 changed files with 12,114 additions and 956 deletions.
32 changes: 32 additions & 0 deletions azure-mgmt-resource/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,38 @@
Release History
===============

2.0.0rc2 (2018-06-13)
+++++++++++++++++++++

**Features on Policy**

- New API version for Policy 2018-03-01. This a merge of 2017-06-01-preview and 2016-12-01 and has no external API breaking.

**Features on Resources**

- Resources new Api Version 2018-05-01
- Model Deployment has a new parameter location
- Model DeploymentExtended has a new parameter location
- Added operation DeploymentsOperations.export_template_at_subscription_scope
- Added operation DeploymentsOperations.get_at_subscription_scope
- Added operation DeploymentsOperations.cancel_at_subscription_scope
- Added operation DeploymentsOperations.delete_at_subscription_scope
- Added operation DeploymentsOperations.create_or_update_at_subscription_scope
- Added operation DeploymentsOperations.validate_at_subscription_scope
- Added operation DeploymentsOperations.check_existence_at_subscription_scope
- Added operation DeploymentsOperations.list_at_subscription_scope
- Added operation DeploymentOperations.get_at_subscription_scope
- Added operation DeploymentOperations.list_at_subscription_scope

**Breaking changes on Resources**

- Operation DeploymentsOperations.create_or_update lost its ignored "location" parameter.
- Operation DeploymentsOperations.validate lost its ignored "location" parameter.

**Common features**

- Client class can be used as a context manager to keep the underlying HTTP session open for performance

2.0.0rc1 (2018-04-23)
+++++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -49,7 +49,7 @@ def __init__(
self.subscription_id = subscription_id


class FeatureClient(object):
class FeatureClient(SDKClient):
"""Azure Feature Exposure Control (AFEC) provides a mechanism for the resource providers to control feature exposure to users. Resource providers typically use this mechanism to provide public/private preview for new features prior to making them generally available. Users need to explicitly register for AFEC features to get access to such functionality.
:ivar config: Configuration for client.
Expand All @@ -70,7 +70,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = FeatureClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(FeatureClient, 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 = '2015-12-01'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -49,7 +49,7 @@ def __init__(
self.subscription_id = subscription_id


class ManagementLinkClient(object):
class ManagementLinkClient(SDKClient):
"""Azure resources can be linked together to form logical relationships. You can establish links between resources belonging to different resource groups. However, all the linked resources must belong to the same subscription. Each resource can be linked to 50 other resources. If any of the linked resources are deleted or moved, the link owner must clean up the remaining link.
:ivar config: Configuration for client.
Expand All @@ -70,7 +70,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = ManagementLinkClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(ManagementLinkClient, 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 = '2016-09-01'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand All @@ -25,9 +25,7 @@ class ManagementLockClientConfiguration(AzureConfiguration):
: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: Gets subscription credentials which uniquely
identify Microsoft Azure subscription. The subscription ID forms part of
the URI for every service call.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""
Expand All @@ -51,7 +49,7 @@ def __init__(
self.subscription_id = subscription_id


class ManagementLockClient(object):
class ManagementLockClient(SDKClient):
"""ManagementLockClient
:ivar config: Configuration for client.
Expand All @@ -63,9 +61,7 @@ class ManagementLockClient(object):
: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: Gets subscription credentials which uniquely
identify Microsoft Azure subscription. The subscription ID forms part of
the URI for every service call.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""
Expand All @@ -74,7 +70,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = ManagementLockClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(ManagementLockClient, 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 = '2015-01-01'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ManagementLocksOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client Api Version. Constant value: "2015-01-01".
:ivar api_version: The API version to use for the operation. Constant value: "2015-01-01".
"""

models = models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -49,7 +49,7 @@ def __init__(
self.subscription_id = subscription_id


class ManagementLockClient(object):
class ManagementLockClient(SDKClient):
"""Azure resources can be locked to prevent other users in your organization from deleting or modifying resources.
:ivar config: Configuration for client.
Expand All @@ -70,7 +70,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = ManagementLockClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(ManagementLockClient, 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 = '2016-09-01'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -50,7 +50,7 @@ def __init__(
self.subscription_id = subscription_id


class ApplicationClient(object):
class ApplicationClient(SDKClient):
"""ARM applications
:ivar config: Configuration for client.
Expand All @@ -73,7 +73,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = ApplicationClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(ApplicationClient, 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 = '2017-09-01'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .generic_resource import GenericResource
from .generic_resource_py3 import GenericResource


class ApplicationDefinition(GenericResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .generic_resource import GenericResource
from .generic_resource_py3 import GenericResource


class ApplicationPatchable(GenericResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .generic_resource import GenericResource
from .generic_resource_py3 import GenericResource


class Application(GenericResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource
from .resource_py3 import Resource


class GenericResource(Resource):
Expand Down
17 changes: 15 additions & 2 deletions azure-mgmt-resource/azure/mgmt/resource/policy/policy_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class PolicyClient(MultiApiClientMixin):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION='2016-12-01'
DEFAULT_API_VERSION='2018-03-01'
_PROFILE_TAG = "azure.mgmt.resource.policy.PolicyClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand Down Expand Up @@ -103,6 +103,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2016-04-01: :mod:`v2016_04_01.models<azure.mgmt.resource.policy.v2016_04_01.models>`
* 2016-12-01: :mod:`v2016_12_01.models<azure.mgmt.resource.policy.v2016_12_01.models>`
* 2017-06-01-preview: :mod:`v2017_06_01_preview.models<azure.mgmt.resource.policy.v2017_06_01_preview.models>`
* 2018-03-01: :mod:`v2018_03_01.models<azure.mgmt.resource.policy.v2018_03_01.models>`
"""
if api_version == '2015-10-01-preview':
from .v2015_10_01_preview import models
Expand All @@ -116,8 +117,11 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2017-06-01-preview':
from .v2017_06_01_preview import models
return models
elif api_version == '2018-03-01':
from .v2018_03_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
def policy_assignments(self):
"""Instance depends on the API version:
Expand All @@ -126,6 +130,7 @@ def policy_assignments(self):
* 2016-04-01: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.policy.v2016_04_01.operations.PolicyAssignmentsOperations>`
* 2016-12-01: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.policy.v2016_12_01.operations.PolicyAssignmentsOperations>`
* 2017-06-01-preview: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.policy.v2017_06_01_preview.operations.PolicyAssignmentsOperations>`
* 2018-03-01: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.policy.v2018_03_01.operations.PolicyAssignmentsOperations>`
"""
api_version = self._get_api_version('policy_assignments')
if api_version == '2015-10-01-preview':
Expand All @@ -136,6 +141,8 @@ def policy_assignments(self):
from .v2016_12_01.operations import PolicyAssignmentsOperations as OperationClass
elif api_version == '2017-06-01-preview':
from .v2017_06_01_preview.operations import PolicyAssignmentsOperations as OperationClass
elif api_version == '2018-03-01':
from .v2018_03_01.operations import PolicyAssignmentsOperations 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 @@ -148,6 +155,7 @@ def policy_definitions(self):
* 2016-04-01: :class:`PolicyDefinitionsOperations<azure.mgmt.resource.policy.v2016_04_01.operations.PolicyDefinitionsOperations>`
* 2016-12-01: :class:`PolicyDefinitionsOperations<azure.mgmt.resource.policy.v2016_12_01.operations.PolicyDefinitionsOperations>`
* 2017-06-01-preview: :class:`PolicyDefinitionsOperations<azure.mgmt.resource.policy.v2017_06_01_preview.operations.PolicyDefinitionsOperations>`
* 2018-03-01: :class:`PolicyDefinitionsOperations<azure.mgmt.resource.policy.v2018_03_01.operations.PolicyDefinitionsOperations>`
"""
api_version = self._get_api_version('policy_definitions')
if api_version == '2015-10-01-preview':
Expand All @@ -158,6 +166,8 @@ def policy_definitions(self):
from .v2016_12_01.operations import PolicyDefinitionsOperations as OperationClass
elif api_version == '2017-06-01-preview':
from .v2017_06_01_preview.operations import PolicyDefinitionsOperations as OperationClass
elif api_version == '2018-03-01':
from .v2018_03_01.operations import PolicyDefinitionsOperations 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 @@ -167,10 +177,13 @@ def policy_set_definitions(self):
"""Instance depends on the API version:
* 2017-06-01-preview: :class:`PolicySetDefinitionsOperations<azure.mgmt.resource.policy.v2017_06_01_preview.operations.PolicySetDefinitionsOperations>`
* 2018-03-01: :class:`PolicySetDefinitionsOperations<azure.mgmt.resource.policy.v2018_03_01.operations.PolicySetDefinitionsOperations>`
"""
api_version = self._get_api_version('policy_set_definitions')
if api_version == '2017-06-01-preview':
from .v2017_06_01_preview.operations import PolicySetDefinitionsOperations as OperationClass
elif api_version == '2018-03-01':
from .v2018_03_01.operations import PolicySetDefinitionsOperations 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 @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -50,7 +50,7 @@ def __init__(
self.subscription_id = subscription_id


class PolicyClient(object):
class PolicyClient(SDKClient):
"""To manage and control access to your resources, you can define customized policies and assign them at a scope.
:ivar config: Configuration for client.
Expand All @@ -73,7 +73,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = PolicyClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(PolicyClient, 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 = '2015-10-01-preview'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -50,7 +50,7 @@ def __init__(
self.subscription_id = subscription_id


class PolicyClient(object):
class PolicyClient(SDKClient):
"""To manage and control access to your resources, you can define customized policies and assign them at a scope.
:ivar config: Configuration for client.
Expand All @@ -73,7 +73,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = PolicyClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(PolicyClient, 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 = '2016-04-01'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# --------------------------------------------------------------------------

import warnings
from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -51,7 +51,7 @@ def __init__(
self.subscription_id = subscription_id


class PolicyClient(object):
class PolicyClient(SDKClient):
"""To manage and control access to your resources, you can define customized policies and assign them at a scope.
:ivar config: Configuration for client.
Expand All @@ -74,7 +74,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = PolicyClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(PolicyClient, 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 = '2016-12-01'
Expand Down
Loading

0 comments on commit 600c8e7

Please sign in to comment.