Skip to content

Commit

Permalink
[T1] resource 2020 11 02 (Azure#14876)
Browse files Browse the repository at this point in the history
* Generated from b4c84993865c6cad970485f276882161d128d6cb

* test,version,changelog

Co-authored-by: SDK Automation <sdkautomation@microsoft.com>
  • Loading branch information
msyyc and SDK Automation authored Oct 30, 2020
1 parent d99400d commit 2efd3cf
Show file tree
Hide file tree
Showing 60 changed files with 45,035 additions and 14,603 deletions.
12 changes: 12 additions & 0 deletions sdk/resources/azure-mgmt-resource/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release History

## 10.3.0 (2020-11-02)
**Features**

- Model DeploymentWhatIfProperties has a new parameter expression_evaluation_options
- Model DeploymentProperties has a new parameter expression_evaluation_options
- Model TemplateSpec has a new parameter versions
- Added operation ProvidersOperations.register_at_management_group_scope
- Added operation ApplicationDefinitionsOperations.get_by_id
- Added operation ApplicationDefinitionsOperations.create_or_update_by_id
- Added operation ApplicationDefinitionsOperations.delete_by_id
- Added operation group ApplicationClientOperationsMixin

## 10.2.0 (2020-08-03)

**Features**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DeploymentScriptsClient(MultiApiClientMixin, SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2019-10-01-preview'
DEFAULT_API_VERSION = '2020-10-01'
_PROFILE_TAG = "azure.mgmt.resource.deploymentscripts.DeploymentScriptsClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -72,22 +72,36 @@ def _models_dict(cls, api_version):
def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:
* 2019-10-01-preview: :mod:`v2019_10_01_preview.models<azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models>`
* 2019-10-01-preview: :mod:`v2019_10_preview.models<azure.mgmt.resource.deploymentscripts.v2019_10_preview.models>`
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.resource.deploymentscripts.v2020_10_01.models>`
"""
if api_version == '2019-10-01-preview':
from .v2019_10_01_preview import models
return models
elif api_version == '2019-10-01-preview':
from .v2019_10_preview import models
return models
elif api_version == '2020-10-01':
from .v2020_10_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
def deployment_scripts(self):
"""Instance depends on the API version:
* 2019-10-01-preview: :class:`DeploymentScriptsOperations<azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.operations.DeploymentScriptsOperations>`
* 2019-10-01-preview: :class:`DeploymentScriptsOperations<azure.mgmt.resource.deploymentscripts.v2019_10_preview.operations.DeploymentScriptsOperations>`
* 2020-10-01: :class:`DeploymentScriptsOperations<azure.mgmt.resource.deploymentscripts.v2020_10_01.operations.DeploymentScriptsOperations>`
"""
api_version = self._get_api_version('deployment_scripts')
if api_version == '2019-10-01-preview':
from .v2019_10_01_preview.operations import DeploymentScriptsOperations as OperationClass
elif api_version == '2019-10-01-preview':
from .v2019_10_preview.operations import DeploymentScriptsOperations as OperationClass
elif api_version == '2020-10-01':
from .v2020_10_01.operations import DeploymentScriptsOperations 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_preview.models import *
from .v2020_10_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 DeploymentScriptsClientConfiguration
from ._deployment_scripts_client import DeploymentScriptsClient
__all__ = ['DeploymentScriptsClient', 'DeploymentScriptsClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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 DeploymentScriptsClientConfiguration(AzureConfiguration):
"""Configuration for DeploymentScriptsClient
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: Subscription Id which forms part of the URI for
every service call.
: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(DeploymentScriptsClientConfiguration, 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,50 @@
# 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 DeploymentScriptsClientConfiguration
from .operations import DeploymentScriptsOperations
from . import models


class DeploymentScriptsClient(SDKClient):
"""The APIs listed in this specification can be used to manage Deployment Scripts resource through the Azure Resource Manager.
:ivar config: Configuration for client.
:vartype config: DeploymentScriptsClientConfiguration
:ivar deployment_scripts: DeploymentScripts operations
:vartype deployment_scripts: azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.operations.DeploymentScriptsOperations
: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: Subscription Id which forms part of the URI for
every service call.
:type subscription_id: str
:param str base_url: Service URL
"""

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

self.config = DeploymentScriptsClientConfiguration(credentials, subscription_id, base_url)
super(DeploymentScriptsClient, 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 = '2019-10-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.deployment_scripts = DeploymentScriptsOperations(
self._client, self.config, self._serialize, self._deserialize)
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.
# --------------------------------------------------------------------------

try:
from ._models_py3 import AzureCliScript
from ._models_py3 import AzurePowerShellScript
from ._models_py3 import AzureResourceBase
from ._models_py3 import ContainerConfiguration
from ._models_py3 import DeploymentScript
from ._models_py3 import DeploymentScriptsError, DeploymentScriptsErrorException
from ._models_py3 import DeploymentScriptUpdateParameter
from ._models_py3 import EnvironmentVariable
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorResponse
from ._models_py3 import ManagedServiceIdentity
from ._models_py3 import ScriptLog
from ._models_py3 import ScriptLogsList
from ._models_py3 import ScriptStatus
from ._models_py3 import StorageAccountConfiguration
from ._models_py3 import SystemData
from ._models_py3 import UserAssignedIdentity
except (SyntaxError, ImportError):
from ._models import AzureCliScript
from ._models import AzurePowerShellScript
from ._models import AzureResourceBase
from ._models import ContainerConfiguration
from ._models import DeploymentScript
from ._models import DeploymentScriptsError, DeploymentScriptsErrorException
from ._models import DeploymentScriptUpdateParameter
from ._models import EnvironmentVariable
from ._models import ErrorAdditionalInfo
from ._models import ErrorResponse
from ._models import ManagedServiceIdentity
from ._models import ScriptLog
from ._models import ScriptLogsList
from ._models import ScriptStatus
from ._models import StorageAccountConfiguration
from ._models import SystemData
from ._models import UserAssignedIdentity
from ._paged_models import DeploymentScriptPaged
from ._deployment_scripts_client_enums import (
ManagedServiceIdentityType,
CreatedByType,
CleanupOptions,
ScriptProvisioningState,
)

__all__ = [
'AzureCliScript',
'AzurePowerShellScript',
'AzureResourceBase',
'ContainerConfiguration',
'DeploymentScript',
'DeploymentScriptsError', 'DeploymentScriptsErrorException',
'DeploymentScriptUpdateParameter',
'EnvironmentVariable',
'ErrorAdditionalInfo',
'ErrorResponse',
'ManagedServiceIdentity',
'ScriptLog',
'ScriptLogsList',
'ScriptStatus',
'StorageAccountConfiguration',
'SystemData',
'UserAssignedIdentity',
'DeploymentScriptPaged',
'ManagedServiceIdentityType',
'CreatedByType',
'CleanupOptions',
'ScriptProvisioningState',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 enum import Enum


class ManagedServiceIdentityType(str, Enum):

user_assigned = "UserAssigned"


class CreatedByType(str, Enum):

user = "User"
application = "Application"
managed_identity = "ManagedIdentity"
key = "Key"


class CleanupOptions(str, Enum):

always = "Always"
on_success = "OnSuccess"
on_expiration = "OnExpiration"


class ScriptProvisioningState(str, Enum):

creating = "Creating"
provisioning_resources = "ProvisioningResources"
running = "Running"
succeeded = "Succeeded"
failed = "Failed"
canceled = "Canceled"
Loading

0 comments on commit 2efd3cf

Please sign in to comment.