From ae9c64831916a4f15e195dabd43a67d0f011277e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 15 Apr 2019 17:01:52 -0700 Subject: [PATCH] [AutoPR] deploymentmanager/resource-manager (#3411) * [AutoPR deploymentmanager/resource-manager] DeploymentManager: API Spec, examples - private preview (#3400) * Generated from 9a7afa25b188eb0699bd2652c710c824b093b70d Add SDK generation settings for all sdks * Packaging update of azure-mgmt-deploymentmanager * Generated from d87b67dab074c096ade09877b0963ff9d7c7f684 Add docs link * Generated from 7da4e113aeade00194dff3380deb531e071358b5 Incorporated feedback + updated descriptions * [AutoPR deploymentmanager/resource-manager] DeploymentManager: Fix property name and enhance descriptions (#3474) * Generated from f6a2220ab078866ebaefef5c0ec8b8f12d3adc42 Enhance descriptions and fix property name * Packaging update of azure-mgmt-deploymentmanager * [AutoPR deploymentmanager/resource-manager] typo: Microsoft.DeploymentManager (#3934) * Generated from ec1a0120ad99a3b4a8e992d2919f39090de68ceb typo: Microsoft.DeploymentManager - Individial -> Individual * Packaging update of azure-mgmt-deploymentmanager * Packaging update of azure-mgmt-deploymentmanager * Update HISTORY.rst * Update version.py * Update sdk_packaging.toml * Packaging update of azure-mgmt-deploymentmanager * [AutoPR deploymentmanager/resource-manager] DeploymentManager: Override client name for python SDK (#4696) * Generated from 27944089c215a1941a262c7b755d847c5fbf0b29 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into deoletim-adm-clientconfig * Packaging update of azure-mgmt-deploymentmanager * Packaging update of azure-mgmt-deploymentmanager * Update HISTORY.rst * Update version.py --- azure-mgmt-deploymentmanager/HISTORY.rst | 9 + azure-mgmt-deploymentmanager/MANIFEST.in | 5 + azure-mgmt-deploymentmanager/README.rst | 33 ++ .../azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/deploymentmanager/__init__.py | 18 + .../deployment_manager_client.py | 115 +++++ .../mgmt/deploymentmanager/models/__init__.py | 125 ++++++ .../models/artifact_source.py | 75 ++++ .../artifact_source_properties_model.py | 51 +++ .../artifact_source_properties_model_py3.py | 51 +++ .../models/artifact_source_py3.py | 75 ++++ .../models/authentication.py | 41 ++ .../models/authentication_py3.py | 41 ++ .../models/azure_entity_resource.py | 50 +++ .../models/azure_entity_resource_py3.py | 50 +++ .../models/cloud_error_body.py | 48 ++ .../models/cloud_error_body_py3.py | 48 ++ .../models/deployment_manager_client_enums.py | 18 + .../mgmt/deploymentmanager/models/identity.py | 39 ++ .../deploymentmanager/models/identity_py3.py | 39 ++ .../mgmt/deploymentmanager/models/message.py | 40 ++ .../deploymentmanager/models/message_py3.py | 40 ++ .../deploymentmanager/models/operation.py | 40 ++ .../models/operation_detail.py | 41 ++ .../models/operation_detail_py3.py | 41 ++ .../deploymentmanager/models/operation_py3.py | 40 ++ .../deploymentmanager/models/pre_post_step.py | 34 ++ .../models/pre_post_step_py3.py | 34 ++ .../models/proxy_resource.py | 45 ++ .../models/proxy_resource_py3.py | 45 ++ .../mgmt/deploymentmanager/models/resource.py | 47 ++ .../models/resource_operation.py | 64 +++ .../models/resource_operation_py3.py | 64 +++ .../deploymentmanager/models/resource_py3.py | 47 ++ .../mgmt/deploymentmanager/models/rollout.py | 102 +++++ .../models/rollout_operation_info.py | 60 +++ .../models/rollout_operation_info_py3.py | 60 +++ .../models/rollout_properties_model.py | 52 +++ .../models/rollout_properties_model_py3.py | 52 +++ .../deploymentmanager/models/rollout_py3.py | 102 +++++ .../models/rollout_request.py | 81 ++++ .../models/rollout_request_py3.py | 81 ++++ .../deploymentmanager/models/rollout_step.py | 64 +++ .../models/rollout_step_py3.py | 64 +++ .../models/sas_authentication.py | 42 ++ .../models/sas_authentication_py3.py | 42 ++ .../mgmt/deploymentmanager/models/service.py | 49 ++ .../models/service_properties.py | 41 ++ .../models/service_properties_py3.py | 41 ++ .../deploymentmanager/models/service_py3.py | 49 ++ .../models/service_resource.py | 65 +++ .../models/service_resource_py3.py | 65 +++ .../models/service_topology_properties.py | 29 ++ .../models/service_topology_properties_py3.py | 29 ++ .../models/service_topology_resource.py | 58 +++ .../models/service_topology_resource_py3.py | 58 +++ .../deploymentmanager/models/service_unit.py | 52 +++ .../models/service_unit_artifacts.py | 44 ++ .../models/service_unit_artifacts_py3.py | 44 ++ .../models/service_unit_properties.py | 47 ++ .../models/service_unit_properties_py3.py | 47 ++ .../models/service_unit_py3.py | 52 +++ .../models/service_unit_resource.py | 71 +++ .../models/service_unit_resource_py3.py | 71 +++ .../mgmt/deploymentmanager/models/step.py | 58 +++ .../models/step_operation_info.py | 61 +++ .../models/step_operation_info_py3.py | 61 +++ .../models/step_properties.py | 41 ++ .../models/step_properties_py3.py | 41 ++ .../mgmt/deploymentmanager/models/step_py3.py | 58 +++ .../deploymentmanager/models/step_resource.py | 58 +++ .../models/step_resource_py3.py | 58 +++ .../models/tracked_resource.py | 55 +++ .../models/tracked_resource_py3.py | 55 +++ .../models/wait_step_attributes.py | 35 ++ .../models/wait_step_attributes_py3.py | 35 ++ .../models/wait_step_properties.py | 38 ++ .../models/wait_step_properties_py3.py | 38 ++ .../deploymentmanager/operations/__init__.py | 28 ++ .../operations/artifact_sources_operations.py | 231 ++++++++++ .../operations/operations.py | 94 ++++ .../operations/rollouts_operations.py | 419 ++++++++++++++++++ .../service_topologies_operations.py | 229 ++++++++++ .../operations/service_units_operations.py | 292 ++++++++++++ .../operations/services_operations.py | 236 ++++++++++ .../operations/steps_operations.py | 229 ++++++++++ .../azure/mgmt/deploymentmanager/version.py | 13 + .../sdk_packaging.toml | 6 + azure-mgmt-deploymentmanager/setup.cfg | 2 + azure-mgmt-deploymentmanager/setup.py | 88 ++++ 91 files changed, 5828 insertions(+) create mode 100644 azure-mgmt-deploymentmanager/HISTORY.rst create mode 100644 azure-mgmt-deploymentmanager/MANIFEST.in create mode 100644 azure-mgmt-deploymentmanager/README.rst create mode 100644 azure-mgmt-deploymentmanager/azure/__init__.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/__init__.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/__init__.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/deployment_manager_client.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/__init__.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_properties_model.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_properties_model_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/authentication.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/authentication_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/azure_entity_resource.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/azure_entity_resource_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/cloud_error_body.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/cloud_error_body_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/deployment_manager_client_enums.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/identity.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/identity_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/message.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/message_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_detail.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_detail_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/pre_post_step.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/pre_post_step_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/proxy_resource.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/proxy_resource_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_operation.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_operation_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_operation_info.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_operation_info_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_properties_model.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_properties_model_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_request.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_request_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_step.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_step_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/sas_authentication.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/sas_authentication_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_properties.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_properties_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_resource.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_resource_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_properties.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_properties_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_resource.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_resource_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_artifacts.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_artifacts_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_properties.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_properties_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_resource.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_resource_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_operation_info.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_operation_info_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_properties.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_properties_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_resource.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_resource_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/tracked_resource.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/tracked_resource_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_attributes.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_attributes_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_properties.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_properties_py3.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/__init__.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/artifact_sources_operations.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/operations.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/rollouts_operations.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/service_topologies_operations.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/service_units_operations.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/services_operations.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/steps_operations.py create mode 100644 azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/version.py create mode 100644 azure-mgmt-deploymentmanager/sdk_packaging.toml create mode 100644 azure-mgmt-deploymentmanager/setup.cfg create mode 100644 azure-mgmt-deploymentmanager/setup.py diff --git a/azure-mgmt-deploymentmanager/HISTORY.rst b/azure-mgmt-deploymentmanager/HISTORY.rst new file mode 100644 index 000000000000..2f620a4201ec --- /dev/null +++ b/azure-mgmt-deploymentmanager/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (2019-04-15) +++++++++++++++++++ + +* Initial Release diff --git a/azure-mgmt-deploymentmanager/MANIFEST.in b/azure-mgmt-deploymentmanager/MANIFEST.in new file mode 100644 index 000000000000..e4884efef41b --- /dev/null +++ b/azure-mgmt-deploymentmanager/MANIFEST.in @@ -0,0 +1,5 @@ +recursive-include tests *.py *.yaml +include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-deploymentmanager/README.rst b/azure-mgmt-deploymentmanager/README.rst new file mode 100644 index 000000000000..ab4686f8b581 --- /dev/null +++ b/azure-mgmt-deploymentmanager/README.rst @@ -0,0 +1,33 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure Deployment Manager Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Usage +===== + +For code examples, see `Deployment Manager +`__ +on docs.microsoft.com. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-deploymentmanager%2FREADME.png diff --git a/azure-mgmt-deploymentmanager/azure/__init__.py b/azure-mgmt-deploymentmanager/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/__init__.py b/azure-mgmt-deploymentmanager/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/__init__.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/__init__.py new file mode 100644 index 000000000000..26da780d9a3e --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/__init__.py @@ -0,0 +1,18 @@ +# 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 .deployment_manager_client import DeploymentManagerClient +from .version import VERSION + +__all__ = ['DeploymentManagerClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/deployment_manager_client.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/deployment_manager_client.py new file mode 100644 index 000000000000..69f3e74da2c5 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/deployment_manager_client.py @@ -0,0 +1,115 @@ +# 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 msrestazure import AzureConfiguration +from .version import VERSION +from .operations.service_topologies_operations import ServiceTopologiesOperations +from .operations.services_operations import ServicesOperations +from .operations.service_units_operations import ServiceUnitsOperations +from .operations.steps_operations import StepsOperations +from .operations.rollouts_operations import RolloutsOperations +from .operations.artifact_sources_operations import ArtifactSourcesOperations +from .operations.operations import Operations +from . import models + + +class DeploymentManagerClientConfiguration(AzureConfiguration): + """Configuration for DeploymentManagerClient + 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` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID 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(DeploymentManagerClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-deploymentmanager/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DeploymentManagerClient(SDKClient): + """REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM). See https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information. + + :ivar config: Configuration for client. + :vartype config: DeploymentManagerClientConfiguration + + :ivar service_topologies: ServiceTopologies operations + :vartype service_topologies: azure.mgmt.deploymentmanager.operations.ServiceTopologiesOperations + :ivar services: Services operations + :vartype services: azure.mgmt.deploymentmanager.operations.ServicesOperations + :ivar service_units: ServiceUnits operations + :vartype service_units: azure.mgmt.deploymentmanager.operations.ServiceUnitsOperations + :ivar steps: Steps operations + :vartype steps: azure.mgmt.deploymentmanager.operations.StepsOperations + :ivar rollouts: Rollouts operations + :vartype rollouts: azure.mgmt.deploymentmanager.operations.RolloutsOperations + :ivar artifact_sources: ArtifactSources operations + :vartype artifact_sources: azure.mgmt.deploymentmanager.operations.ArtifactSourcesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.deploymentmanager.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID 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 = DeploymentManagerClientConfiguration(credentials, subscription_id, base_url) + super(DeploymentManagerClient, 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 = '2018-09-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.service_topologies = ServiceTopologiesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.services = ServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.service_units = ServiceUnitsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.steps = StepsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.rollouts = RolloutsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.artifact_sources = ArtifactSourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/__init__.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/__init__.py new file mode 100644 index 000000000000..8359ec2b2882 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/__init__.py @@ -0,0 +1,125 @@ +# 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 .identity_py3 import Identity + from .pre_post_step_py3 import PrePostStep + from .step_py3 import Step + from .rollout_request_py3 import RolloutRequest + from .artifact_source_py3 import ArtifactSource + from .authentication_py3 import Authentication + from .artifact_source_properties_model_py3 import ArtifactSourcePropertiesModel + from .sas_authentication_py3 import SasAuthentication + from .cloud_error_body_py3 import CloudErrorBody + from .rollout_operation_info_py3 import RolloutOperationInfo + from .step_operation_info_py3 import StepOperationInfo + from .resource_operation_py3 import ResourceOperation + from .message_py3 import Message + from .rollout_step_py3 import RolloutStep + from .service_unit_py3 import ServiceUnit + from .service_py3 import Service + from .rollout_py3 import Rollout + from .rollout_properties_model_py3 import RolloutPropertiesModel + from .service_topology_resource_py3 import ServiceTopologyResource + from .service_topology_properties_py3 import ServiceTopologyProperties + from .service_resource_py3 import ServiceResource + from .service_properties_py3 import ServiceProperties + from .service_unit_resource_py3 import ServiceUnitResource + from .service_unit_artifacts_py3 import ServiceUnitArtifacts + from .service_unit_properties_py3 import ServiceUnitProperties + from .operation_detail_py3 import OperationDetail + from .operation_py3 import Operation + from .step_properties_py3 import StepProperties + from .step_resource_py3 import StepResource + from .wait_step_attributes_py3 import WaitStepAttributes + from .wait_step_properties_py3 import WaitStepProperties + from .proxy_resource_py3 import ProxyResource + from .azure_entity_resource_py3 import AzureEntityResource + from .resource_py3 import Resource + from .tracked_resource_py3 import TrackedResource +except (SyntaxError, ImportError): + from .identity import Identity + from .pre_post_step import PrePostStep + from .step import Step + from .rollout_request import RolloutRequest + from .artifact_source import ArtifactSource + from .authentication import Authentication + from .artifact_source_properties_model import ArtifactSourcePropertiesModel + from .sas_authentication import SasAuthentication + from .cloud_error_body import CloudErrorBody + from .rollout_operation_info import RolloutOperationInfo + from .step_operation_info import StepOperationInfo + from .resource_operation import ResourceOperation + from .message import Message + from .rollout_step import RolloutStep + from .service_unit import ServiceUnit + from .service import Service + from .rollout import Rollout + from .rollout_properties_model import RolloutPropertiesModel + from .service_topology_resource import ServiceTopologyResource + from .service_topology_properties import ServiceTopologyProperties + from .service_resource import ServiceResource + from .service_properties import ServiceProperties + from .service_unit_resource import ServiceUnitResource + from .service_unit_artifacts import ServiceUnitArtifacts + from .service_unit_properties import ServiceUnitProperties + from .operation_detail import OperationDetail + from .operation import Operation + from .step_properties import StepProperties + from .step_resource import StepResource + from .wait_step_attributes import WaitStepAttributes + from .wait_step_properties import WaitStepProperties + from .proxy_resource import ProxyResource + from .azure_entity_resource import AzureEntityResource + from .resource import Resource + from .tracked_resource import TrackedResource +from .deployment_manager_client_enums import ( + DeploymentMode, +) + +__all__ = [ + 'Identity', + 'PrePostStep', + 'Step', + 'RolloutRequest', + 'ArtifactSource', + 'Authentication', + 'ArtifactSourcePropertiesModel', + 'SasAuthentication', + 'CloudErrorBody', + 'RolloutOperationInfo', + 'StepOperationInfo', + 'ResourceOperation', + 'Message', + 'RolloutStep', + 'ServiceUnit', + 'Service', + 'Rollout', + 'RolloutPropertiesModel', + 'ServiceTopologyResource', + 'ServiceTopologyProperties', + 'ServiceResource', + 'ServiceProperties', + 'ServiceUnitResource', + 'ServiceUnitArtifacts', + 'ServiceUnitProperties', + 'OperationDetail', + 'Operation', + 'StepProperties', + 'StepResource', + 'WaitStepAttributes', + 'WaitStepProperties', + 'ProxyResource', + 'AzureEntityResource', + 'Resource', + 'TrackedResource', + 'DeploymentMode', +] diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source.py new file mode 100644 index 000000000000..0a6cea848766 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source.py @@ -0,0 +1,75 @@ +# 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 .tracked_resource import TrackedResource + + +class ArtifactSource(TrackedResource): + """The resource that defines the source location where the artifacts are + located. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param source_type: Required. The type of artifact source used. + :type source_type: str + :param artifact_root: The path from the location that the 'authentication' + property [say, a SAS URI to the blob container] refers to, to the location + of the artifacts. This can be used to differentiate different versions of + the artifacts. Or, different types of artifacts like binaries or + templates. The location referenced by the authentication property + concatenated with this optional artifactRoot path forms the artifact + source location where the artifacts are expected to be found. + :type artifact_root: str + :param authentication: Required. The authentication method to use to + access the artifact source. + :type authentication: ~azure.mgmt.deploymentmanager.models.Authentication + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'source_type': {'required': True}, + 'authentication': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'artifact_root': {'key': 'properties.artifactRoot', 'type': 'str'}, + 'authentication': {'key': 'properties.authentication', 'type': 'Authentication'}, + } + + def __init__(self, **kwargs): + super(ArtifactSource, self).__init__(**kwargs) + self.source_type = kwargs.get('source_type', None) + self.artifact_root = kwargs.get('artifact_root', None) + self.authentication = kwargs.get('authentication', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_properties_model.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_properties_model.py new file mode 100644 index 000000000000..534026c6a720 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_properties_model.py @@ -0,0 +1,51 @@ +# 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.serialization import Model + + +class ArtifactSourcePropertiesModel(Model): + """The properties that define the source location where the artifacts are + located. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. The type of artifact source used. + :type source_type: str + :param artifact_root: The path from the location that the 'authentication' + property [say, a SAS URI to the blob container] refers to, to the location + of the artifacts. This can be used to differentiate different versions of + the artifacts. Or, different types of artifacts like binaries or + templates. The location referenced by the authentication property + concatenated with this optional artifactRoot path forms the artifact + source location where the artifacts are expected to be found. + :type artifact_root: str + :param authentication: Required. The authentication method to use to + access the artifact source. + :type authentication: ~azure.mgmt.deploymentmanager.models.Authentication + """ + + _validation = { + 'source_type': {'required': True}, + 'authentication': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'artifact_root': {'key': 'artifactRoot', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + } + + def __init__(self, **kwargs): + super(ArtifactSourcePropertiesModel, self).__init__(**kwargs) + self.source_type = kwargs.get('source_type', None) + self.artifact_root = kwargs.get('artifact_root', None) + self.authentication = kwargs.get('authentication', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_properties_model_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_properties_model_py3.py new file mode 100644 index 000000000000..f46a7a9486da --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_properties_model_py3.py @@ -0,0 +1,51 @@ +# 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.serialization import Model + + +class ArtifactSourcePropertiesModel(Model): + """The properties that define the source location where the artifacts are + located. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. The type of artifact source used. + :type source_type: str + :param artifact_root: The path from the location that the 'authentication' + property [say, a SAS URI to the blob container] refers to, to the location + of the artifacts. This can be used to differentiate different versions of + the artifacts. Or, different types of artifacts like binaries or + templates. The location referenced by the authentication property + concatenated with this optional artifactRoot path forms the artifact + source location where the artifacts are expected to be found. + :type artifact_root: str + :param authentication: Required. The authentication method to use to + access the artifact source. + :type authentication: ~azure.mgmt.deploymentmanager.models.Authentication + """ + + _validation = { + 'source_type': {'required': True}, + 'authentication': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'artifact_root': {'key': 'artifactRoot', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + } + + def __init__(self, *, source_type: str, authentication, artifact_root: str=None, **kwargs) -> None: + super(ArtifactSourcePropertiesModel, self).__init__(**kwargs) + self.source_type = source_type + self.artifact_root = artifact_root + self.authentication = authentication diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_py3.py new file mode 100644 index 000000000000..42d7816f6687 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/artifact_source_py3.py @@ -0,0 +1,75 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class ArtifactSource(TrackedResource): + """The resource that defines the source location where the artifacts are + located. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param source_type: Required. The type of artifact source used. + :type source_type: str + :param artifact_root: The path from the location that the 'authentication' + property [say, a SAS URI to the blob container] refers to, to the location + of the artifacts. This can be used to differentiate different versions of + the artifacts. Or, different types of artifacts like binaries or + templates. The location referenced by the authentication property + concatenated with this optional artifactRoot path forms the artifact + source location where the artifacts are expected to be found. + :type artifact_root: str + :param authentication: Required. The authentication method to use to + access the artifact source. + :type authentication: ~azure.mgmt.deploymentmanager.models.Authentication + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'source_type': {'required': True}, + 'authentication': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'artifact_root': {'key': 'properties.artifactRoot', 'type': 'str'}, + 'authentication': {'key': 'properties.authentication', 'type': 'Authentication'}, + } + + def __init__(self, *, location: str, source_type: str, authentication, tags=None, artifact_root: str=None, **kwargs) -> None: + super(ArtifactSource, self).__init__(tags=tags, location=location, **kwargs) + self.source_type = source_type + self.artifact_root = artifact_root + self.authentication = authentication diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/authentication.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/authentication.py new file mode 100644 index 000000000000..32ae67a966ba --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/authentication.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class Authentication(Model): + """Defines the authentication method and properties to access the artifacts. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SasAuthentication + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Sas': 'SasAuthentication'} + } + + def __init__(self, **kwargs): + super(Authentication, self).__init__(**kwargs) + self.type = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/authentication_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/authentication_py3.py new file mode 100644 index 000000000000..55eabe16ff55 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/authentication_py3.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class Authentication(Model): + """Defines the authentication method and properties to access the artifacts. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SasAuthentication + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Sas': 'SasAuthentication'} + } + + def __init__(self, **kwargs) -> None: + super(Authentication, self).__init__(**kwargs) + self.type = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/azure_entity_resource.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/azure_entity_resource.py new file mode 100644 index 000000000000..3bffaab8d35b --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/azure_entity_resource.py @@ -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 .resource import Resource + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/azure_entity_resource_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/azure_entity_resource_py3.py new file mode 100644 index 000000000000..d3f80d87498a --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/azure_entity_resource_py3.py @@ -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 .resource_py3 import Resource + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/cloud_error_body.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/cloud_error_body.py new file mode 100644 index 000000000000..a5ec07fbb5d7 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/cloud_error_body.py @@ -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 msrest.serialization import Model + + +class CloudErrorBody(Model): + """Detailed error information of any failure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code string. + :vartype code: str + :ivar message: Descriptive error information. + :vartype message: str + :param target: Error target + :type target: str + :param details: More detailed error information. + :type details: list[~azure.mgmt.deploymentmanager.models.CloudErrorBody] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/cloud_error_body_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/cloud_error_body_py3.py new file mode 100644 index 000000000000..3c66e0bfbd4a --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/cloud_error_body_py3.py @@ -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 msrest.serialization import Model + + +class CloudErrorBody(Model): + """Detailed error information of any failure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code string. + :vartype code: str + :ivar message: Descriptive error information. + :vartype message: str + :param target: Error target + :type target: str + :param details: More detailed error information. + :type details: list[~azure.mgmt.deploymentmanager.models.CloudErrorBody] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = target + self.details = details diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/deployment_manager_client_enums.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/deployment_manager_client_enums.py new file mode 100644 index 000000000000..75727c05d502 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/deployment_manager_client_enums.py @@ -0,0 +1,18 @@ +# 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 DeploymentMode(str, Enum): + + incremental = "Incremental" + complete = "Complete" diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/identity.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/identity.py new file mode 100644 index 000000000000..535f1d89b220 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/identity.py @@ -0,0 +1,39 @@ +# 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.serialization import Model + + +class Identity(Model): + """Identity for the resource. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The identity type. + :type type: str + :param identity_ids: Required. The list of identities. + :type identity_ids: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'identity_ids': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.identity_ids = kwargs.get('identity_ids', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/identity_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/identity_py3.py new file mode 100644 index 000000000000..7d7994ebb0f5 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/identity_py3.py @@ -0,0 +1,39 @@ +# 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.serialization import Model + + +class Identity(Model): + """Identity for the resource. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The identity type. + :type type: str + :param identity_ids: Required. The list of identities. + :type identity_ids: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'identity_ids': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, *, type: str, identity_ids, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.type = type + self.identity_ids = identity_ids diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/message.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/message.py new file mode 100644 index 000000000000..ac7fd4e0bf7a --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/message.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class Message(Model): + """Supplementary contextual messages during a rollout. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_stamp: Time in UTC this message was provided. + :vartype time_stamp: datetime + :ivar message: The actual message text. + :vartype message: str + """ + + _validation = { + 'time_stamp': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Message, self).__init__(**kwargs) + self.time_stamp = None + self.message = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/message_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/message_py3.py new file mode 100644 index 000000000000..76e746149f59 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/message_py3.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class Message(Model): + """Supplementary contextual messages during a rollout. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_stamp: Time in UTC this message was provided. + :vartype time_stamp: datetime + :ivar message: The actual message text. + :vartype message: str + """ + + _validation = { + 'time_stamp': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Message, self).__init__(**kwargs) + self.time_stamp = None + self.message = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation.py new file mode 100644 index 000000000000..2b45906d1d79 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class Operation(Model): + """Represents an operation that can be performed on the service. + + :param name: The name of the operation. + :type name: str + :param display: The display name of the operation. + :type display: ~azure.mgmt.deploymentmanager.models.OperationDetail + :param origin: The origin of the operation. + :type origin: str + :param properties: The properties of the operation. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDetail'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_detail.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_detail.py new file mode 100644 index 000000000000..4c6709406783 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_detail.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class OperationDetail(Model): + """The detail about an operation. + + :param provider: The name of the provider that supports the operation. + :type provider: str + :param resource: The resource type on which this operation can be + performed. + :type resource: str + :param operation: The name of the operation. + :type operation: str + :param description: The description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDetail, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_detail_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_detail_py3.py new file mode 100644 index 000000000000..de8a38c27fc4 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_detail_py3.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class OperationDetail(Model): + """The detail about an operation. + + :param provider: The name of the provider that supports the operation. + :type provider: str + :param resource: The resource type on which this operation can be + performed. + :type resource: str + :param operation: The name of the operation. + :type operation: str + :param description: The description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDetail, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_py3.py new file mode 100644 index 000000000000..695126102e0b --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/operation_py3.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class Operation(Model): + """Represents an operation that can be performed on the service. + + :param name: The name of the operation. + :type name: str + :param display: The display name of the operation. + :type display: ~azure.mgmt.deploymentmanager.models.OperationDetail + :param origin: The origin of the operation. + :type origin: str + :param properties: The properties of the operation. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDetail'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/pre_post_step.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/pre_post_step.py new file mode 100644 index 000000000000..6fed8a1c9fe1 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/pre_post_step.py @@ -0,0 +1,34 @@ +# 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.serialization import Model + + +class PrePostStep(Model): + """The properties that define a step. + + All required parameters must be populated in order to send to Azure. + + :param step_id: Required. The resource Id of the step to be run. + :type step_id: str + """ + + _validation = { + 'step_id': {'required': True}, + } + + _attribute_map = { + 'step_id': {'key': 'stepId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrePostStep, self).__init__(**kwargs) + self.step_id = kwargs.get('step_id', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/pre_post_step_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/pre_post_step_py3.py new file mode 100644 index 000000000000..33bb9c3bf23a --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/pre_post_step_py3.py @@ -0,0 +1,34 @@ +# 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.serialization import Model + + +class PrePostStep(Model): + """The properties that define a step. + + All required parameters must be populated in order to send to Azure. + + :param step_id: Required. The resource Id of the step to be run. + :type step_id: str + """ + + _validation = { + 'step_id': {'required': True}, + } + + _attribute_map = { + 'step_id': {'key': 'stepId', 'type': 'str'}, + } + + def __init__(self, *, step_id: str, **kwargs) -> None: + super(PrePostStep, self).__init__(**kwargs) + self.step_id = step_id diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/proxy_resource.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/proxy_resource.py new file mode 100644 index 000000000000..0de8fb6bd420 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/proxy_resource.py @@ -0,0 +1,45 @@ +# 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 .resource import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/proxy_resource_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/proxy_resource_py3.py new file mode 100644 index 000000000000..2e8391f912d6 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/proxy_resource_py3.py @@ -0,0 +1,45 @@ +# 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 .resource_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource.py new file mode 100644 index 000000000000..9333a2ac49ef --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_operation.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_operation.py new file mode 100644 index 000000000000..e523f71297b5 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_operation.py @@ -0,0 +1,64 @@ +# 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.serialization import Model + + +class ResourceOperation(Model): + """Individual resource operation information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param resource_name: Name of the resource as specified in the artifacts. + For ARM resources, this is the name of the resource specified in the + template. + :type resource_name: str + :ivar operation_id: Unique identifier of the operation. For ARM resources, + this is the operationId obtained from ARM service. + :vartype operation_id: str + :param resource_type: Type of the resource as specified in the artifacts. + For ARM resources, this is the type of the resource specified in the + template. + :type resource_type: str + :ivar provisioning_state: State of the resource deployment. For ARM + resources, this is the current provisioning state of the resource. + :vartype provisioning_state: str + :ivar status_message: Descriptive information of the resource operation. + :vartype status_message: str + :ivar status_code: Http status code of the operation. + :vartype status_code: str + """ + + _validation = { + 'operation_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'status_code': {'readonly': True}, + } + + _attribute_map = { + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceOperation, self).__init__(**kwargs) + self.resource_name = kwargs.get('resource_name', None) + self.operation_id = None + self.resource_type = kwargs.get('resource_type', None) + self.provisioning_state = None + self.status_message = None + self.status_code = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_operation_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_operation_py3.py new file mode 100644 index 000000000000..6be4f5bb7011 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_operation_py3.py @@ -0,0 +1,64 @@ +# 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.serialization import Model + + +class ResourceOperation(Model): + """Individual resource operation information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param resource_name: Name of the resource as specified in the artifacts. + For ARM resources, this is the name of the resource specified in the + template. + :type resource_name: str + :ivar operation_id: Unique identifier of the operation. For ARM resources, + this is the operationId obtained from ARM service. + :vartype operation_id: str + :param resource_type: Type of the resource as specified in the artifacts. + For ARM resources, this is the type of the resource specified in the + template. + :type resource_type: str + :ivar provisioning_state: State of the resource deployment. For ARM + resources, this is the current provisioning state of the resource. + :vartype provisioning_state: str + :ivar status_message: Descriptive information of the resource operation. + :vartype status_message: str + :ivar status_code: Http status code of the operation. + :vartype status_code: str + """ + + _validation = { + 'operation_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'status_code': {'readonly': True}, + } + + _attribute_map = { + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + } + + def __init__(self, *, resource_name: str=None, resource_type: str=None, **kwargs) -> None: + super(ResourceOperation, self).__init__(**kwargs) + self.resource_name = resource_name + self.operation_id = None + self.resource_type = resource_type + self.provisioning_state = None + self.status_message = None + self.status_code = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_py3.py new file mode 100644 index 000000000000..370e6c506581 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/resource_py3.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout.py new file mode 100644 index 000000000000..e9f691564816 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout.py @@ -0,0 +1,102 @@ +# 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 .tracked_resource import TrackedResource + + +class Rollout(TrackedResource): + """Defines the rollout. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.deploymentmanager.models.Identity + :param build_version: Required. The version of the build being deployed. + :type build_version: str + :param artifact_source_id: The reference to the artifact source resource + Id where the payload is located. + :type artifact_source_id: str + :param target_service_topology_id: Required. The resource Id of the + service topology from which service units are being referenced in step + groups to be deployed. + :type target_service_topology_id: str + :param step_groups: Required. The list of step groups that define the + orchestration. + :type step_groups: list[~azure.mgmt.deploymentmanager.models.Step] + :ivar status: The current status of the rollout. + :vartype status: str + :ivar total_retry_attempts: The cardinal count of total number of retries + performed on the rollout at a given time. + :vartype total_retry_attempts: int + :ivar operation_info: Operational information of the rollout. + :vartype operation_info: + ~azure.mgmt.deploymentmanager.models.RolloutOperationInfo + :ivar services: The detailed information on the services being deployed. + :vartype services: list[~azure.mgmt.deploymentmanager.models.Service] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'build_version': {'required': True}, + 'target_service_topology_id': {'required': True}, + 'step_groups': {'required': True}, + 'status': {'readonly': True}, + 'total_retry_attempts': {'readonly': True}, + 'operation_info': {'readonly': True}, + 'services': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'build_version': {'key': 'properties.buildVersion', 'type': 'str'}, + 'artifact_source_id': {'key': 'properties.artifactSourceId', 'type': 'str'}, + 'target_service_topology_id': {'key': 'properties.targetServiceTopologyId', 'type': 'str'}, + 'step_groups': {'key': 'properties.stepGroups', 'type': '[Step]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'total_retry_attempts': {'key': 'properties.totalRetryAttempts', 'type': 'int'}, + 'operation_info': {'key': 'properties.operationInfo', 'type': 'RolloutOperationInfo'}, + 'services': {'key': 'properties.services', 'type': '[Service]'}, + } + + def __init__(self, **kwargs): + super(Rollout, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.build_version = kwargs.get('build_version', None) + self.artifact_source_id = kwargs.get('artifact_source_id', None) + self.target_service_topology_id = kwargs.get('target_service_topology_id', None) + self.step_groups = kwargs.get('step_groups', None) + self.status = None + self.total_retry_attempts = None + self.operation_info = None + self.services = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_operation_info.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_operation_info.py new file mode 100644 index 000000000000..91d2d3b538c3 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_operation_info.py @@ -0,0 +1,60 @@ +# 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.serialization import Model + + +class RolloutOperationInfo(Model): + """Detailed runtime information of the rollout. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retry_attempt: The ordinal count of the number of retry attempts on + a rollout. 0 if no retries of the rollout have been performed. If the + rollout is updated with a PUT, this count is reset to 0. + :vartype retry_attempt: int + :ivar skip_succeeded_on_retry: True, if all steps that succeeded on the + previous run/attempt were chosen to be skipped in this retry attempt. + False, otherwise. + :vartype skip_succeeded_on_retry: bool + :ivar start_time: The start time of the rollout in UTC. + :vartype start_time: datetime + :ivar end_time: The start time of the rollout in UTC. This property will + not be set if the rollout has not completed yet. + :vartype end_time: datetime + :ivar error: The detailed error information for any failure. + :vartype error: ~azure.mgmt.deploymentmanager.models.CloudErrorBody + """ + + _validation = { + 'retry_attempt': {'readonly': True}, + 'skip_succeeded_on_retry': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'retry_attempt': {'key': 'retryAttempt', 'type': 'int'}, + 'skip_succeeded_on_retry': {'key': 'skipSucceededOnRetry', 'type': 'bool'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(RolloutOperationInfo, self).__init__(**kwargs) + self.retry_attempt = None + self.skip_succeeded_on_retry = None + self.start_time = None + self.end_time = None + self.error = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_operation_info_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_operation_info_py3.py new file mode 100644 index 000000000000..9dd400e0d95a --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_operation_info_py3.py @@ -0,0 +1,60 @@ +# 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.serialization import Model + + +class RolloutOperationInfo(Model): + """Detailed runtime information of the rollout. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retry_attempt: The ordinal count of the number of retry attempts on + a rollout. 0 if no retries of the rollout have been performed. If the + rollout is updated with a PUT, this count is reset to 0. + :vartype retry_attempt: int + :ivar skip_succeeded_on_retry: True, if all steps that succeeded on the + previous run/attempt were chosen to be skipped in this retry attempt. + False, otherwise. + :vartype skip_succeeded_on_retry: bool + :ivar start_time: The start time of the rollout in UTC. + :vartype start_time: datetime + :ivar end_time: The start time of the rollout in UTC. This property will + not be set if the rollout has not completed yet. + :vartype end_time: datetime + :ivar error: The detailed error information for any failure. + :vartype error: ~azure.mgmt.deploymentmanager.models.CloudErrorBody + """ + + _validation = { + 'retry_attempt': {'readonly': True}, + 'skip_succeeded_on_retry': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'retry_attempt': {'key': 'retryAttempt', 'type': 'int'}, + 'skip_succeeded_on_retry': {'key': 'skipSucceededOnRetry', 'type': 'bool'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs) -> None: + super(RolloutOperationInfo, self).__init__(**kwargs) + self.retry_attempt = None + self.skip_succeeded_on_retry = None + self.start_time = None + self.end_time = None + self.error = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_properties_model.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_properties_model.py new file mode 100644 index 000000000000..50dacf5fc2ca --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_properties_model.py @@ -0,0 +1,52 @@ +# 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.serialization import Model + + +class RolloutPropertiesModel(Model): + """Defines the properties of a rollout. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The current status of the rollout. + :vartype status: str + :ivar total_retry_attempts: The cardinal count of total number of retries + performed on the rollout at a given time. + :vartype total_retry_attempts: int + :ivar operation_info: Operational information of the rollout. + :vartype operation_info: + ~azure.mgmt.deploymentmanager.models.RolloutOperationInfo + :ivar services: The detailed information on the services being deployed. + :vartype services: list[~azure.mgmt.deploymentmanager.models.Service] + """ + + _validation = { + 'status': {'readonly': True}, + 'total_retry_attempts': {'readonly': True}, + 'operation_info': {'readonly': True}, + 'services': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'total_retry_attempts': {'key': 'totalRetryAttempts', 'type': 'int'}, + 'operation_info': {'key': 'operationInfo', 'type': 'RolloutOperationInfo'}, + 'services': {'key': 'services', 'type': '[Service]'}, + } + + def __init__(self, **kwargs): + super(RolloutPropertiesModel, self).__init__(**kwargs) + self.status = None + self.total_retry_attempts = None + self.operation_info = None + self.services = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_properties_model_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_properties_model_py3.py new file mode 100644 index 000000000000..3ba0d1a7fa72 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_properties_model_py3.py @@ -0,0 +1,52 @@ +# 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.serialization import Model + + +class RolloutPropertiesModel(Model): + """Defines the properties of a rollout. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The current status of the rollout. + :vartype status: str + :ivar total_retry_attempts: The cardinal count of total number of retries + performed on the rollout at a given time. + :vartype total_retry_attempts: int + :ivar operation_info: Operational information of the rollout. + :vartype operation_info: + ~azure.mgmt.deploymentmanager.models.RolloutOperationInfo + :ivar services: The detailed information on the services being deployed. + :vartype services: list[~azure.mgmt.deploymentmanager.models.Service] + """ + + _validation = { + 'status': {'readonly': True}, + 'total_retry_attempts': {'readonly': True}, + 'operation_info': {'readonly': True}, + 'services': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'total_retry_attempts': {'key': 'totalRetryAttempts', 'type': 'int'}, + 'operation_info': {'key': 'operationInfo', 'type': 'RolloutOperationInfo'}, + 'services': {'key': 'services', 'type': '[Service]'}, + } + + def __init__(self, **kwargs) -> None: + super(RolloutPropertiesModel, self).__init__(**kwargs) + self.status = None + self.total_retry_attempts = None + self.operation_info = None + self.services = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_py3.py new file mode 100644 index 000000000000..23e63e184112 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_py3.py @@ -0,0 +1,102 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Rollout(TrackedResource): + """Defines the rollout. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.deploymentmanager.models.Identity + :param build_version: Required. The version of the build being deployed. + :type build_version: str + :param artifact_source_id: The reference to the artifact source resource + Id where the payload is located. + :type artifact_source_id: str + :param target_service_topology_id: Required. The resource Id of the + service topology from which service units are being referenced in step + groups to be deployed. + :type target_service_topology_id: str + :param step_groups: Required. The list of step groups that define the + orchestration. + :type step_groups: list[~azure.mgmt.deploymentmanager.models.Step] + :ivar status: The current status of the rollout. + :vartype status: str + :ivar total_retry_attempts: The cardinal count of total number of retries + performed on the rollout at a given time. + :vartype total_retry_attempts: int + :ivar operation_info: Operational information of the rollout. + :vartype operation_info: + ~azure.mgmt.deploymentmanager.models.RolloutOperationInfo + :ivar services: The detailed information on the services being deployed. + :vartype services: list[~azure.mgmt.deploymentmanager.models.Service] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'build_version': {'required': True}, + 'target_service_topology_id': {'required': True}, + 'step_groups': {'required': True}, + 'status': {'readonly': True}, + 'total_retry_attempts': {'readonly': True}, + 'operation_info': {'readonly': True}, + 'services': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'build_version': {'key': 'properties.buildVersion', 'type': 'str'}, + 'artifact_source_id': {'key': 'properties.artifactSourceId', 'type': 'str'}, + 'target_service_topology_id': {'key': 'properties.targetServiceTopologyId', 'type': 'str'}, + 'step_groups': {'key': 'properties.stepGroups', 'type': '[Step]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'total_retry_attempts': {'key': 'properties.totalRetryAttempts', 'type': 'int'}, + 'operation_info': {'key': 'properties.operationInfo', 'type': 'RolloutOperationInfo'}, + 'services': {'key': 'properties.services', 'type': '[Service]'}, + } + + def __init__(self, *, location: str, build_version: str, target_service_topology_id: str, step_groups, tags=None, identity=None, artifact_source_id: str=None, **kwargs) -> None: + super(Rollout, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.build_version = build_version + self.artifact_source_id = artifact_source_id + self.target_service_topology_id = target_service_topology_id + self.step_groups = step_groups + self.status = None + self.total_retry_attempts = None + self.operation_info = None + self.services = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_request.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_request.py new file mode 100644 index 000000000000..78588600ba34 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_request.py @@ -0,0 +1,81 @@ +# 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 .tracked_resource import TrackedResource + + +class RolloutRequest(TrackedResource): + """Defines the PUT rollout request body. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param identity: Required. Identity for the resource. + :type identity: ~azure.mgmt.deploymentmanager.models.Identity + :param build_version: Required. The version of the build being deployed. + :type build_version: str + :param artifact_source_id: The reference to the artifact source resource + Id where the payload is located. + :type artifact_source_id: str + :param target_service_topology_id: Required. The resource Id of the + service topology from which service units are being referenced in step + groups to be deployed. + :type target_service_topology_id: str + :param step_groups: Required. The list of step groups that define the + orchestration. + :type step_groups: list[~azure.mgmt.deploymentmanager.models.Step] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'identity': {'required': True}, + 'build_version': {'required': True}, + 'target_service_topology_id': {'required': True}, + 'step_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'build_version': {'key': 'properties.buildVersion', 'type': 'str'}, + 'artifact_source_id': {'key': 'properties.artifactSourceId', 'type': 'str'}, + 'target_service_topology_id': {'key': 'properties.targetServiceTopologyId', 'type': 'str'}, + 'step_groups': {'key': 'properties.stepGroups', 'type': '[Step]'}, + } + + def __init__(self, **kwargs): + super(RolloutRequest, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.build_version = kwargs.get('build_version', None) + self.artifact_source_id = kwargs.get('artifact_source_id', None) + self.target_service_topology_id = kwargs.get('target_service_topology_id', None) + self.step_groups = kwargs.get('step_groups', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_request_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_request_py3.py new file mode 100644 index 000000000000..f2f73a5ab7e6 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_request_py3.py @@ -0,0 +1,81 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class RolloutRequest(TrackedResource): + """Defines the PUT rollout request body. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param identity: Required. Identity for the resource. + :type identity: ~azure.mgmt.deploymentmanager.models.Identity + :param build_version: Required. The version of the build being deployed. + :type build_version: str + :param artifact_source_id: The reference to the artifact source resource + Id where the payload is located. + :type artifact_source_id: str + :param target_service_topology_id: Required. The resource Id of the + service topology from which service units are being referenced in step + groups to be deployed. + :type target_service_topology_id: str + :param step_groups: Required. The list of step groups that define the + orchestration. + :type step_groups: list[~azure.mgmt.deploymentmanager.models.Step] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'identity': {'required': True}, + 'build_version': {'required': True}, + 'target_service_topology_id': {'required': True}, + 'step_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'build_version': {'key': 'properties.buildVersion', 'type': 'str'}, + 'artifact_source_id': {'key': 'properties.artifactSourceId', 'type': 'str'}, + 'target_service_topology_id': {'key': 'properties.targetServiceTopologyId', 'type': 'str'}, + 'step_groups': {'key': 'properties.stepGroups', 'type': '[Step]'}, + } + + def __init__(self, *, location: str, identity, build_version: str, target_service_topology_id: str, step_groups, tags=None, artifact_source_id: str=None, **kwargs) -> None: + super(RolloutRequest, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.build_version = build_version + self.artifact_source_id = artifact_source_id + self.target_service_topology_id = target_service_topology_id + self.step_groups = step_groups diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_step.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_step.py new file mode 100644 index 000000000000..6201f4beb5ba --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_step.py @@ -0,0 +1,64 @@ +# 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.serialization import Model + + +class RolloutStep(Model): + """Defines a specific step on a target service unit. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the step. + :type name: str + :ivar status: Current state of the step. + :vartype status: str + :param step_group: The step group the current step is part of. + :type step_group: str + :ivar operation_info: Detailed information of specific action execution. + :vartype operation_info: + ~azure.mgmt.deploymentmanager.models.StepOperationInfo + :ivar resource_operations: Set of resource operations that were performed, + if any, on an Azure resource. + :vartype resource_operations: + list[~azure.mgmt.deploymentmanager.models.ResourceOperation] + :ivar messages: Supplementary informative messages during rollout. + :vartype messages: list[~azure.mgmt.deploymentmanager.models.Message] + """ + + _validation = { + 'name': {'required': True}, + 'status': {'readonly': True}, + 'operation_info': {'readonly': True}, + 'resource_operations': {'readonly': True}, + 'messages': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'step_group': {'key': 'stepGroup', 'type': 'str'}, + 'operation_info': {'key': 'operationInfo', 'type': 'StepOperationInfo'}, + 'resource_operations': {'key': 'resourceOperations', 'type': '[ResourceOperation]'}, + 'messages': {'key': 'messages', 'type': '[Message]'}, + } + + def __init__(self, **kwargs): + super(RolloutStep, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.status = None + self.step_group = kwargs.get('step_group', None) + self.operation_info = None + self.resource_operations = None + self.messages = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_step_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_step_py3.py new file mode 100644 index 000000000000..2ce0f2807c92 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/rollout_step_py3.py @@ -0,0 +1,64 @@ +# 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.serialization import Model + + +class RolloutStep(Model): + """Defines a specific step on a target service unit. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the step. + :type name: str + :ivar status: Current state of the step. + :vartype status: str + :param step_group: The step group the current step is part of. + :type step_group: str + :ivar operation_info: Detailed information of specific action execution. + :vartype operation_info: + ~azure.mgmt.deploymentmanager.models.StepOperationInfo + :ivar resource_operations: Set of resource operations that were performed, + if any, on an Azure resource. + :vartype resource_operations: + list[~azure.mgmt.deploymentmanager.models.ResourceOperation] + :ivar messages: Supplementary informative messages during rollout. + :vartype messages: list[~azure.mgmt.deploymentmanager.models.Message] + """ + + _validation = { + 'name': {'required': True}, + 'status': {'readonly': True}, + 'operation_info': {'readonly': True}, + 'resource_operations': {'readonly': True}, + 'messages': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'step_group': {'key': 'stepGroup', 'type': 'str'}, + 'operation_info': {'key': 'operationInfo', 'type': 'StepOperationInfo'}, + 'resource_operations': {'key': 'resourceOperations', 'type': '[ResourceOperation]'}, + 'messages': {'key': 'messages', 'type': '[Message]'}, + } + + def __init__(self, *, name: str, step_group: str=None, **kwargs) -> None: + super(RolloutStep, self).__init__(**kwargs) + self.name = name + self.status = None + self.step_group = step_group + self.operation_info = None + self.resource_operations = None + self.messages = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/sas_authentication.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/sas_authentication.py new file mode 100644 index 000000000000..4901ca0a0297 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/sas_authentication.py @@ -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 .authentication import Authentication + + +class SasAuthentication(Authentication): + """Defines the properties to access the artifacts using an Azure Storage SAS + URI. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param sas_uri: Required. The SAS URI to the Azure Storage blob container. + Any offset from the root of the container to where the artifacts are + located can be defined in the artifactRoot. + :type sas_uri: str + """ + + _validation = { + 'type': {'required': True}, + 'sas_uri': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'sas_uri': {'key': 'properties.sasUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasAuthentication, self).__init__(**kwargs) + self.sas_uri = kwargs.get('sas_uri', None) + self.type = 'Sas' diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/sas_authentication_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/sas_authentication_py3.py new file mode 100644 index 000000000000..450369cc1574 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/sas_authentication_py3.py @@ -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 .authentication_py3 import Authentication + + +class SasAuthentication(Authentication): + """Defines the properties to access the artifacts using an Azure Storage SAS + URI. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param sas_uri: Required. The SAS URI to the Azure Storage blob container. + Any offset from the root of the container to where the artifacts are + located can be defined in the artifactRoot. + :type sas_uri: str + """ + + _validation = { + 'type': {'required': True}, + 'sas_uri': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'sas_uri': {'key': 'properties.sasUri', 'type': 'str'}, + } + + def __init__(self, *, sas_uri: str, **kwargs) -> None: + super(SasAuthentication, self).__init__(**kwargs) + self.sas_uri = sas_uri + self.type = 'Sas' diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service.py new file mode 100644 index 000000000000..9e4b37b21344 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service.py @@ -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 .service_properties import ServiceProperties + + +class Service(ServiceProperties): + """Defines a service. + + All required parameters must be populated in order to send to Azure. + + :param target_location: Required. The Azure location to which the + resources in the service belong to or should be deployed to. + :type target_location: str + :param target_subscription_id: Required. The subscription to which the + resources in the service belong to or should be deployed to. + :type target_subscription_id: str + :param name: Name of the service. + :type name: str + :param service_units: The detailed information about the units that make + up the service. + :type service_units: + list[~azure.mgmt.deploymentmanager.models.ServiceUnit] + """ + + _validation = { + 'target_location': {'required': True}, + 'target_subscription_id': {'required': True}, + } + + _attribute_map = { + 'target_location': {'key': 'targetLocation', 'type': 'str'}, + 'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_units': {'key': 'serviceUnits', 'type': '[ServiceUnit]'}, + } + + def __init__(self, **kwargs): + super(Service, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.service_units = kwargs.get('service_units', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_properties.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_properties.py new file mode 100644 index 000000000000..68528981e030 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_properties.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class ServiceProperties(Model): + """The properties of a service. + + All required parameters must be populated in order to send to Azure. + + :param target_location: Required. The Azure location to which the + resources in the service belong to or should be deployed to. + :type target_location: str + :param target_subscription_id: Required. The subscription to which the + resources in the service belong to or should be deployed to. + :type target_subscription_id: str + """ + + _validation = { + 'target_location': {'required': True}, + 'target_subscription_id': {'required': True}, + } + + _attribute_map = { + 'target_location': {'key': 'targetLocation', 'type': 'str'}, + 'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceProperties, self).__init__(**kwargs) + self.target_location = kwargs.get('target_location', None) + self.target_subscription_id = kwargs.get('target_subscription_id', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_properties_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_properties_py3.py new file mode 100644 index 000000000000..0abfc872cd7d --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_properties_py3.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class ServiceProperties(Model): + """The properties of a service. + + All required parameters must be populated in order to send to Azure. + + :param target_location: Required. The Azure location to which the + resources in the service belong to or should be deployed to. + :type target_location: str + :param target_subscription_id: Required. The subscription to which the + resources in the service belong to or should be deployed to. + :type target_subscription_id: str + """ + + _validation = { + 'target_location': {'required': True}, + 'target_subscription_id': {'required': True}, + } + + _attribute_map = { + 'target_location': {'key': 'targetLocation', 'type': 'str'}, + 'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'}, + } + + def __init__(self, *, target_location: str, target_subscription_id: str, **kwargs) -> None: + super(ServiceProperties, self).__init__(**kwargs) + self.target_location = target_location + self.target_subscription_id = target_subscription_id diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_py3.py new file mode 100644 index 000000000000..8747205e5bd4 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_py3.py @@ -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 .service_properties_py3 import ServiceProperties + + +class Service(ServiceProperties): + """Defines a service. + + All required parameters must be populated in order to send to Azure. + + :param target_location: Required. The Azure location to which the + resources in the service belong to or should be deployed to. + :type target_location: str + :param target_subscription_id: Required. The subscription to which the + resources in the service belong to or should be deployed to. + :type target_subscription_id: str + :param name: Name of the service. + :type name: str + :param service_units: The detailed information about the units that make + up the service. + :type service_units: + list[~azure.mgmt.deploymentmanager.models.ServiceUnit] + """ + + _validation = { + 'target_location': {'required': True}, + 'target_subscription_id': {'required': True}, + } + + _attribute_map = { + 'target_location': {'key': 'targetLocation', 'type': 'str'}, + 'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_units': {'key': 'serviceUnits', 'type': '[ServiceUnit]'}, + } + + def __init__(self, *, target_location: str, target_subscription_id: str, name: str=None, service_units=None, **kwargs) -> None: + super(Service, self).__init__(target_location=target_location, target_subscription_id=target_subscription_id, **kwargs) + self.name = name + self.service_units = service_units diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_resource.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_resource.py new file mode 100644 index 000000000000..db530c7e4ddc --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_resource.py @@ -0,0 +1,65 @@ +# 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 .tracked_resource import TrackedResource + + +class ServiceResource(TrackedResource): + """The resource representation of a service in a service topology. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param target_location: Required. The Azure location to which the + resources in the service belong to or should be deployed to. + :type target_location: str + :param target_subscription_id: Required. The subscription to which the + resources in the service belong to or should be deployed to. + :type target_subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'target_location': {'required': True}, + 'target_subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'target_location': {'key': 'properties.targetLocation', 'type': 'str'}, + 'target_subscription_id': {'key': 'properties.targetSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceResource, self).__init__(**kwargs) + self.target_location = kwargs.get('target_location', None) + self.target_subscription_id = kwargs.get('target_subscription_id', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_resource_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_resource_py3.py new file mode 100644 index 000000000000..35f0193e405b --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_resource_py3.py @@ -0,0 +1,65 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class ServiceResource(TrackedResource): + """The resource representation of a service in a service topology. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param target_location: Required. The Azure location to which the + resources in the service belong to or should be deployed to. + :type target_location: str + :param target_subscription_id: Required. The subscription to which the + resources in the service belong to or should be deployed to. + :type target_subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'target_location': {'required': True}, + 'target_subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'target_location': {'key': 'properties.targetLocation', 'type': 'str'}, + 'target_subscription_id': {'key': 'properties.targetSubscriptionId', 'type': 'str'}, + } + + def __init__(self, *, location: str, target_location: str, target_subscription_id: str, tags=None, **kwargs) -> None: + super(ServiceResource, self).__init__(tags=tags, location=location, **kwargs) + self.target_location = target_location + self.target_subscription_id = target_subscription_id diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_properties.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_properties.py new file mode 100644 index 000000000000..88da92173426 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_properties.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class ServiceTopologyProperties(Model): + """The properties of a service topology. + + :param artifact_source_id: The resource Id of the artifact source that + contains the artifacts that can be referenced in the service units. + :type artifact_source_id: str + """ + + _attribute_map = { + 'artifact_source_id': {'key': 'artifactSourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceTopologyProperties, self).__init__(**kwargs) + self.artifact_source_id = kwargs.get('artifact_source_id', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_properties_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_properties_py3.py new file mode 100644 index 000000000000..49a5bfd03a38 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_properties_py3.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class ServiceTopologyProperties(Model): + """The properties of a service topology. + + :param artifact_source_id: The resource Id of the artifact source that + contains the artifacts that can be referenced in the service units. + :type artifact_source_id: str + """ + + _attribute_map = { + 'artifact_source_id': {'key': 'artifactSourceId', 'type': 'str'}, + } + + def __init__(self, *, artifact_source_id: str=None, **kwargs) -> None: + super(ServiceTopologyProperties, self).__init__(**kwargs) + self.artifact_source_id = artifact_source_id diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_resource.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_resource.py new file mode 100644 index 000000000000..c19d1f94e90e --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_resource.py @@ -0,0 +1,58 @@ +# 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 .tracked_resource import TrackedResource + + +class ServiceTopologyResource(TrackedResource): + """The resource representation of a service topology. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param artifact_source_id: The resource Id of the artifact source that + contains the artifacts that can be referenced in the service units. + :type artifact_source_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'artifact_source_id': {'key': 'properties.artifactSourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceTopologyResource, self).__init__(**kwargs) + self.artifact_source_id = kwargs.get('artifact_source_id', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_resource_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_resource_py3.py new file mode 100644 index 000000000000..c73cc620ccfa --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_topology_resource_py3.py @@ -0,0 +1,58 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class ServiceTopologyResource(TrackedResource): + """The resource representation of a service topology. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param artifact_source_id: The resource Id of the artifact source that + contains the artifacts that can be referenced in the service units. + :type artifact_source_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'artifact_source_id': {'key': 'properties.artifactSourceId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, artifact_source_id: str=None, **kwargs) -> None: + super(ServiceTopologyResource, self).__init__(tags=tags, location=location, **kwargs) + self.artifact_source_id = artifact_source_id diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit.py new file mode 100644 index 000000000000..d180b1f4ec18 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit.py @@ -0,0 +1,52 @@ +# 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 .service_unit_properties import ServiceUnitProperties + + +class ServiceUnit(ServiceUnitProperties): + """Defines a service unit. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. The Azure Resource Group to which + the resources in the service unit belong to or should be deployed to. + :type target_resource_group: str + :param deployment_mode: Required. Describes the type of ARM deployment to + be performed on the resource. Possible values include: 'Incremental', + 'Complete' + :type deployment_mode: str or + ~azure.mgmt.deploymentmanager.models.DeploymentMode + :param artifacts: The artifacts for the service unit. + :type artifacts: ~azure.mgmt.deploymentmanager.models.ServiceUnitArtifacts + :param name: Name of the service unit. + :type name: str + :param steps: Detailed step information, if present. + :type steps: list[~azure.mgmt.deploymentmanager.models.RolloutStep] + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'deployment_mode': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'deployment_mode': {'key': 'deploymentMode', 'type': 'DeploymentMode'}, + 'artifacts': {'key': 'artifacts', 'type': 'ServiceUnitArtifacts'}, + 'name': {'key': 'name', 'type': 'str'}, + 'steps': {'key': 'steps', 'type': '[RolloutStep]'}, + } + + def __init__(self, **kwargs): + super(ServiceUnit, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.steps = kwargs.get('steps', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_artifacts.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_artifacts.py new file mode 100644 index 000000000000..bbde075fc51f --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_artifacts.py @@ -0,0 +1,44 @@ +# 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.serialization import Model + + +class ServiceUnitArtifacts(Model): + """Defines the artifacts of a service unit. + + :param template_uri: The full URI of the ARM template file with the SAS + token. + :type template_uri: str + :param parameters_uri: The full URI of the ARM parameters file with the + SAS token. + :type parameters_uri: str + :param template_artifact_source_relative_path: The path to the ARM + template file relative to the artifact source. + :type template_artifact_source_relative_path: str + :param parameters_artifact_source_relative_path: The path to the ARM + parameters file relative to the artifact source. + :type parameters_artifact_source_relative_path: str + """ + + _attribute_map = { + 'template_uri': {'key': 'templateUri', 'type': 'str'}, + 'parameters_uri': {'key': 'parametersUri', 'type': 'str'}, + 'template_artifact_source_relative_path': {'key': 'templateArtifactSourceRelativePath', 'type': 'str'}, + 'parameters_artifact_source_relative_path': {'key': 'parametersArtifactSourceRelativePath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceUnitArtifacts, self).__init__(**kwargs) + self.template_uri = kwargs.get('template_uri', None) + self.parameters_uri = kwargs.get('parameters_uri', None) + self.template_artifact_source_relative_path = kwargs.get('template_artifact_source_relative_path', None) + self.parameters_artifact_source_relative_path = kwargs.get('parameters_artifact_source_relative_path', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_artifacts_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_artifacts_py3.py new file mode 100644 index 000000000000..9ba6f3efeb9a --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_artifacts_py3.py @@ -0,0 +1,44 @@ +# 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.serialization import Model + + +class ServiceUnitArtifacts(Model): + """Defines the artifacts of a service unit. + + :param template_uri: The full URI of the ARM template file with the SAS + token. + :type template_uri: str + :param parameters_uri: The full URI of the ARM parameters file with the + SAS token. + :type parameters_uri: str + :param template_artifact_source_relative_path: The path to the ARM + template file relative to the artifact source. + :type template_artifact_source_relative_path: str + :param parameters_artifact_source_relative_path: The path to the ARM + parameters file relative to the artifact source. + :type parameters_artifact_source_relative_path: str + """ + + _attribute_map = { + 'template_uri': {'key': 'templateUri', 'type': 'str'}, + 'parameters_uri': {'key': 'parametersUri', 'type': 'str'}, + 'template_artifact_source_relative_path': {'key': 'templateArtifactSourceRelativePath', 'type': 'str'}, + 'parameters_artifact_source_relative_path': {'key': 'parametersArtifactSourceRelativePath', 'type': 'str'}, + } + + def __init__(self, *, template_uri: str=None, parameters_uri: str=None, template_artifact_source_relative_path: str=None, parameters_artifact_source_relative_path: str=None, **kwargs) -> None: + super(ServiceUnitArtifacts, self).__init__(**kwargs) + self.template_uri = template_uri + self.parameters_uri = parameters_uri + self.template_artifact_source_relative_path = template_artifact_source_relative_path + self.parameters_artifact_source_relative_path = parameters_artifact_source_relative_path diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_properties.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_properties.py new file mode 100644 index 000000000000..652cf0fac33c --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_properties.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class ServiceUnitProperties(Model): + """Defines the properties of a service unit. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. The Azure Resource Group to which + the resources in the service unit belong to or should be deployed to. + :type target_resource_group: str + :param deployment_mode: Required. Describes the type of ARM deployment to + be performed on the resource. Possible values include: 'Incremental', + 'Complete' + :type deployment_mode: str or + ~azure.mgmt.deploymentmanager.models.DeploymentMode + :param artifacts: The artifacts for the service unit. + :type artifacts: ~azure.mgmt.deploymentmanager.models.ServiceUnitArtifacts + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'deployment_mode': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'deployment_mode': {'key': 'deploymentMode', 'type': 'DeploymentMode'}, + 'artifacts': {'key': 'artifacts', 'type': 'ServiceUnitArtifacts'}, + } + + def __init__(self, **kwargs): + super(ServiceUnitProperties, self).__init__(**kwargs) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.deployment_mode = kwargs.get('deployment_mode', None) + self.artifacts = kwargs.get('artifacts', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_properties_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_properties_py3.py new file mode 100644 index 000000000000..bdfbd4d6efa1 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_properties_py3.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class ServiceUnitProperties(Model): + """Defines the properties of a service unit. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. The Azure Resource Group to which + the resources in the service unit belong to or should be deployed to. + :type target_resource_group: str + :param deployment_mode: Required. Describes the type of ARM deployment to + be performed on the resource. Possible values include: 'Incremental', + 'Complete' + :type deployment_mode: str or + ~azure.mgmt.deploymentmanager.models.DeploymentMode + :param artifacts: The artifacts for the service unit. + :type artifacts: ~azure.mgmt.deploymentmanager.models.ServiceUnitArtifacts + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'deployment_mode': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'deployment_mode': {'key': 'deploymentMode', 'type': 'DeploymentMode'}, + 'artifacts': {'key': 'artifacts', 'type': 'ServiceUnitArtifacts'}, + } + + def __init__(self, *, target_resource_group: str, deployment_mode, artifacts=None, **kwargs) -> None: + super(ServiceUnitProperties, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.deployment_mode = deployment_mode + self.artifacts = artifacts diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_py3.py new file mode 100644 index 000000000000..3d5852a53e06 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_py3.py @@ -0,0 +1,52 @@ +# 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 .service_unit_properties_py3 import ServiceUnitProperties + + +class ServiceUnit(ServiceUnitProperties): + """Defines a service unit. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. The Azure Resource Group to which + the resources in the service unit belong to or should be deployed to. + :type target_resource_group: str + :param deployment_mode: Required. Describes the type of ARM deployment to + be performed on the resource. Possible values include: 'Incremental', + 'Complete' + :type deployment_mode: str or + ~azure.mgmt.deploymentmanager.models.DeploymentMode + :param artifacts: The artifacts for the service unit. + :type artifacts: ~azure.mgmt.deploymentmanager.models.ServiceUnitArtifacts + :param name: Name of the service unit. + :type name: str + :param steps: Detailed step information, if present. + :type steps: list[~azure.mgmt.deploymentmanager.models.RolloutStep] + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'deployment_mode': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'deployment_mode': {'key': 'deploymentMode', 'type': 'DeploymentMode'}, + 'artifacts': {'key': 'artifacts', 'type': 'ServiceUnitArtifacts'}, + 'name': {'key': 'name', 'type': 'str'}, + 'steps': {'key': 'steps', 'type': '[RolloutStep]'}, + } + + def __init__(self, *, target_resource_group: str, deployment_mode, artifacts=None, name: str=None, steps=None, **kwargs) -> None: + super(ServiceUnit, self).__init__(target_resource_group=target_resource_group, deployment_mode=deployment_mode, artifacts=artifacts, **kwargs) + self.name = name + self.steps = steps diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_resource.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_resource.py new file mode 100644 index 000000000000..17a5b0fc3dd9 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_resource.py @@ -0,0 +1,71 @@ +# 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 .tracked_resource import TrackedResource + + +class ServiceUnitResource(TrackedResource): + """Represents the response of a service unit resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param target_resource_group: Required. The Azure Resource Group to which + the resources in the service unit belong to or should be deployed to. + :type target_resource_group: str + :param deployment_mode: Required. Describes the type of ARM deployment to + be performed on the resource. Possible values include: 'Incremental', + 'Complete' + :type deployment_mode: str or + ~azure.mgmt.deploymentmanager.models.DeploymentMode + :param artifacts: The artifacts for the service unit. + :type artifacts: ~azure.mgmt.deploymentmanager.models.ServiceUnitArtifacts + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'target_resource_group': {'required': True}, + 'deployment_mode': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'target_resource_group': {'key': 'properties.targetResourceGroup', 'type': 'str'}, + 'deployment_mode': {'key': 'properties.deploymentMode', 'type': 'DeploymentMode'}, + 'artifacts': {'key': 'properties.artifacts', 'type': 'ServiceUnitArtifacts'}, + } + + def __init__(self, **kwargs): + super(ServiceUnitResource, self).__init__(**kwargs) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.deployment_mode = kwargs.get('deployment_mode', None) + self.artifacts = kwargs.get('artifacts', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_resource_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_resource_py3.py new file mode 100644 index 000000000000..91a6f7798df8 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/service_unit_resource_py3.py @@ -0,0 +1,71 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class ServiceUnitResource(TrackedResource): + """Represents the response of a service unit resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param target_resource_group: Required. The Azure Resource Group to which + the resources in the service unit belong to or should be deployed to. + :type target_resource_group: str + :param deployment_mode: Required. Describes the type of ARM deployment to + be performed on the resource. Possible values include: 'Incremental', + 'Complete' + :type deployment_mode: str or + ~azure.mgmt.deploymentmanager.models.DeploymentMode + :param artifacts: The artifacts for the service unit. + :type artifacts: ~azure.mgmt.deploymentmanager.models.ServiceUnitArtifacts + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'target_resource_group': {'required': True}, + 'deployment_mode': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'target_resource_group': {'key': 'properties.targetResourceGroup', 'type': 'str'}, + 'deployment_mode': {'key': 'properties.deploymentMode', 'type': 'DeploymentMode'}, + 'artifacts': {'key': 'properties.artifacts', 'type': 'ServiceUnitArtifacts'}, + } + + def __init__(self, *, location: str, target_resource_group: str, deployment_mode, tags=None, artifacts=None, **kwargs) -> None: + super(ServiceUnitResource, self).__init__(tags=tags, location=location, **kwargs) + self.target_resource_group = target_resource_group + self.deployment_mode = deployment_mode + self.artifacts = artifacts diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step.py new file mode 100644 index 000000000000..babe264bc0b0 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step.py @@ -0,0 +1,58 @@ +# 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.serialization import Model + + +class Step(Model): + """The properties that define an Azure Deployment Manager step. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the step group. + :type name: str + :param depends_on_step_groups: The list of step group names on which this + step group depends on. + :type depends_on_step_groups: list[str] + :param pre_deployment_steps: The list of steps to be run before deploying + the target. + :type pre_deployment_steps: + list[~azure.mgmt.deploymentmanager.models.PrePostStep] + :param deployment_target_id: Required. The resource Id of service unit to + be deployed. The service unit should be from the service topology + referenced in targetServiceTopologyId + :type deployment_target_id: str + :param post_deployment_steps: The list of steps to be run after deploying + the target. + :type post_deployment_steps: + list[~azure.mgmt.deploymentmanager.models.PrePostStep] + """ + + _validation = { + 'name': {'required': True}, + 'deployment_target_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'depends_on_step_groups': {'key': 'dependsOnStepGroups', 'type': '[str]'}, + 'pre_deployment_steps': {'key': 'preDeploymentSteps', 'type': '[PrePostStep]'}, + 'deployment_target_id': {'key': 'deploymentTargetId', 'type': 'str'}, + 'post_deployment_steps': {'key': 'postDeploymentSteps', 'type': '[PrePostStep]'}, + } + + def __init__(self, **kwargs): + super(Step, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.depends_on_step_groups = kwargs.get('depends_on_step_groups', None) + self.pre_deployment_steps = kwargs.get('pre_deployment_steps', None) + self.deployment_target_id = kwargs.get('deployment_target_id', None) + self.post_deployment_steps = kwargs.get('post_deployment_steps', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_operation_info.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_operation_info.py new file mode 100644 index 000000000000..de7bf27165ed --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_operation_info.py @@ -0,0 +1,61 @@ +# 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.serialization import Model + + +class StepOperationInfo(Model): + """Detailed information of a specific step run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar deployment_name: The name of the ARM deployment initiated as part of + the step. + :vartype deployment_name: str + :ivar correlation_id: Unique identifier to track the request for ARM-based + resources. + :vartype correlation_id: str + :ivar start_time: Start time of the action in UTC. + :vartype start_time: datetime + :ivar end_time: End time of the action in UTC. + :vartype end_time: datetime + :ivar last_updated_time: Last time in UTC this operation was updated. + :vartype last_updated_time: datetime + :param error: The errors, if any, for the action. + :type error: ~azure.mgmt.deploymentmanager.models.CloudErrorBody + """ + + _validation = { + 'deployment_name': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(StepOperationInfo, self).__init__(**kwargs) + self.deployment_name = None + self.correlation_id = None + self.start_time = None + self.end_time = None + self.last_updated_time = None + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_operation_info_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_operation_info_py3.py new file mode 100644 index 000000000000..f04ffbf3f139 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_operation_info_py3.py @@ -0,0 +1,61 @@ +# 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.serialization import Model + + +class StepOperationInfo(Model): + """Detailed information of a specific step run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar deployment_name: The name of the ARM deployment initiated as part of + the step. + :vartype deployment_name: str + :ivar correlation_id: Unique identifier to track the request for ARM-based + resources. + :vartype correlation_id: str + :ivar start_time: Start time of the action in UTC. + :vartype start_time: datetime + :ivar end_time: End time of the action in UTC. + :vartype end_time: datetime + :ivar last_updated_time: Last time in UTC this operation was updated. + :vartype last_updated_time: datetime + :param error: The errors, if any, for the action. + :type error: ~azure.mgmt.deploymentmanager.models.CloudErrorBody + """ + + _validation = { + 'deployment_name': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(StepOperationInfo, self).__init__(**kwargs) + self.deployment_name = None + self.correlation_id = None + self.start_time = None + self.end_time = None + self.last_updated_time = None + self.error = error diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_properties.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_properties.py new file mode 100644 index 000000000000..7f0bd6168261 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_properties.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class StepProperties(Model): + """The properties of a step resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: WaitStepProperties + + All required parameters must be populated in order to send to Azure. + + :param step_type: Required. Constant filled by server. + :type step_type: str + """ + + _validation = { + 'step_type': {'required': True}, + } + + _attribute_map = { + 'step_type': {'key': 'stepType', 'type': 'str'}, + } + + _subtype_map = { + 'step_type': {'Wait': 'WaitStepProperties'} + } + + def __init__(self, **kwargs): + super(StepProperties, self).__init__(**kwargs) + self.step_type = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_properties_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_properties_py3.py new file mode 100644 index 000000000000..784bb2c64c29 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_properties_py3.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class StepProperties(Model): + """The properties of a step resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: WaitStepProperties + + All required parameters must be populated in order to send to Azure. + + :param step_type: Required. Constant filled by server. + :type step_type: str + """ + + _validation = { + 'step_type': {'required': True}, + } + + _attribute_map = { + 'step_type': {'key': 'stepType', 'type': 'str'}, + } + + _subtype_map = { + 'step_type': {'Wait': 'WaitStepProperties'} + } + + def __init__(self, **kwargs) -> None: + super(StepProperties, self).__init__(**kwargs) + self.step_type = None diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_py3.py new file mode 100644 index 000000000000..e8c2c97158e5 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_py3.py @@ -0,0 +1,58 @@ +# 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.serialization import Model + + +class Step(Model): + """The properties that define an Azure Deployment Manager step. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the step group. + :type name: str + :param depends_on_step_groups: The list of step group names on which this + step group depends on. + :type depends_on_step_groups: list[str] + :param pre_deployment_steps: The list of steps to be run before deploying + the target. + :type pre_deployment_steps: + list[~azure.mgmt.deploymentmanager.models.PrePostStep] + :param deployment_target_id: Required. The resource Id of service unit to + be deployed. The service unit should be from the service topology + referenced in targetServiceTopologyId + :type deployment_target_id: str + :param post_deployment_steps: The list of steps to be run after deploying + the target. + :type post_deployment_steps: + list[~azure.mgmt.deploymentmanager.models.PrePostStep] + """ + + _validation = { + 'name': {'required': True}, + 'deployment_target_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'depends_on_step_groups': {'key': 'dependsOnStepGroups', 'type': '[str]'}, + 'pre_deployment_steps': {'key': 'preDeploymentSteps', 'type': '[PrePostStep]'}, + 'deployment_target_id': {'key': 'deploymentTargetId', 'type': 'str'}, + 'post_deployment_steps': {'key': 'postDeploymentSteps', 'type': '[PrePostStep]'}, + } + + def __init__(self, *, name: str, deployment_target_id: str, depends_on_step_groups=None, pre_deployment_steps=None, post_deployment_steps=None, **kwargs) -> None: + super(Step, self).__init__(**kwargs) + self.name = name + self.depends_on_step_groups = depends_on_step_groups + self.pre_deployment_steps = pre_deployment_steps + self.deployment_target_id = deployment_target_id + self.post_deployment_steps = post_deployment_steps diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_resource.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_resource.py new file mode 100644 index 000000000000..1a33362fbe96 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_resource.py @@ -0,0 +1,58 @@ +# 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 .tracked_resource import TrackedResource + + +class StepResource(TrackedResource): + """The resource representation of a rollout step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param properties: Required. The properties that define the step. + :type properties: ~azure.mgmt.deploymentmanager.models.StepProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'StepProperties'}, + } + + def __init__(self, **kwargs): + super(StepResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_resource_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_resource_py3.py new file mode 100644 index 000000000000..a3cd19a871c1 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/step_resource_py3.py @@ -0,0 +1,58 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class StepResource(TrackedResource): + """The resource representation of a rollout step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param properties: Required. The properties that define the step. + :type properties: ~azure.mgmt.deploymentmanager.models.StepProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'StepProperties'}, + } + + def __init__(self, *, location: str, properties, tags=None, **kwargs) -> None: + super(StepResource, self).__init__(tags=tags, location=location, **kwargs) + self.properties = properties diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/tracked_resource.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/tracked_resource.py new file mode 100644 index 000000000000..27ab94c7a8dd --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/tracked_resource.py @@ -0,0 +1,55 @@ +# 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 .resource import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/tracked_resource_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/tracked_resource_py3.py new file mode 100644 index 000000000000..b28cc1859448 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/tracked_resource_py3.py @@ -0,0 +1,55 @@ +# 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 .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_attributes.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_attributes.py new file mode 100644 index 000000000000..59afb8daa834 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_attributes.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class WaitStepAttributes(Model): + """The parameters for the wait step. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. The duration in ISO 8601 format of how long the + wait should be. + :type duration: str + """ + + _validation = { + 'duration': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitStepAttributes, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_attributes_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_attributes_py3.py new file mode 100644 index 000000000000..9981c667560d --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_attributes_py3.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class WaitStepAttributes(Model): + """The parameters for the wait step. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. The duration in ISO 8601 format of how long the + wait should be. + :type duration: str + """ + + _validation = { + 'duration': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__(self, *, duration: str, **kwargs) -> None: + super(WaitStepAttributes, self).__init__(**kwargs) + self.duration = duration diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_properties.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_properties.py new file mode 100644 index 000000000000..52eda802984a --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_properties.py @@ -0,0 +1,38 @@ +# 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 .step_properties import StepProperties + + +class WaitStepProperties(StepProperties): + """Defines the properties of a Wait step. + + All required parameters must be populated in order to send to Azure. + + :param step_type: Required. Constant filled by server. + :type step_type: str + :param attributes: The Wait attributes + :type attributes: ~azure.mgmt.deploymentmanager.models.WaitStepAttributes + """ + + _validation = { + 'step_type': {'required': True}, + } + + _attribute_map = { + 'step_type': {'key': 'stepType', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'WaitStepAttributes'}, + } + + def __init__(self, **kwargs): + super(WaitStepProperties, self).__init__(**kwargs) + self.attributes = kwargs.get('attributes', None) + self.step_type = 'Wait' diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_properties_py3.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_properties_py3.py new file mode 100644 index 000000000000..6d4b4c8c1099 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/wait_step_properties_py3.py @@ -0,0 +1,38 @@ +# 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 .step_properties_py3 import StepProperties + + +class WaitStepProperties(StepProperties): + """Defines the properties of a Wait step. + + All required parameters must be populated in order to send to Azure. + + :param step_type: Required. Constant filled by server. + :type step_type: str + :param attributes: The Wait attributes + :type attributes: ~azure.mgmt.deploymentmanager.models.WaitStepAttributes + """ + + _validation = { + 'step_type': {'required': True}, + } + + _attribute_map = { + 'step_type': {'key': 'stepType', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'WaitStepAttributes'}, + } + + def __init__(self, *, attributes=None, **kwargs) -> None: + super(WaitStepProperties, self).__init__(**kwargs) + self.attributes = attributes + self.step_type = 'Wait' diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/__init__.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/__init__.py new file mode 100644 index 000000000000..76ca297d2cb3 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/__init__.py @@ -0,0 +1,28 @@ +# 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 .service_topologies_operations import ServiceTopologiesOperations +from .services_operations import ServicesOperations +from .service_units_operations import ServiceUnitsOperations +from .steps_operations import StepsOperations +from .rollouts_operations import RolloutsOperations +from .artifact_sources_operations import ArtifactSourcesOperations +from .operations import Operations + +__all__ = [ + 'ServiceTopologiesOperations', + 'ServicesOperations', + 'ServiceUnitsOperations', + 'StepsOperations', + 'RolloutsOperations', + 'ArtifactSourcesOperations', + 'Operations', +] diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/artifact_sources_operations.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/artifact_sources_operations.py new file mode 100644 index 000000000000..9f07092c0c0a --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/artifact_sources_operations.py @@ -0,0 +1,231 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ArtifactSourcesOperations(object): + """ArtifactSourcesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def create_or_update( + self, resource_group_name, artifact_source_name, artifact_source_info=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an artifact source. + + Synchronously creates a new artifact source or updates an existing + artifact source. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param artifact_source_name: The name of the artifact source. + :type artifact_source_name: str + :param artifact_source_info: Source object that defines the resource. + :type artifact_source_info: + ~azure.mgmt.deploymentmanager.models.ArtifactSource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ArtifactSource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.ArtifactSource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'artifactSourceName': self._serialize.url("artifact_source_name", artifact_source_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if artifact_source_info is not None: + body_content = self._serialize.body(artifact_source_info, 'ArtifactSource') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('ArtifactSource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}'} + + def get( + self, resource_group_name, artifact_source_name, custom_headers=None, raw=False, **operation_config): + """Gets an artifact source. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param artifact_source_name: The name of the artifact source. + :type artifact_source_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ArtifactSource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.ArtifactSource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'artifactSourceName': self._serialize.url("artifact_source_name", artifact_source_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ArtifactSource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}'} + + def delete( + self, resource_group_name, artifact_source_name, custom_headers=None, raw=False, **operation_config): + """Deletes an artifact source. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param artifact_source_name: The name of the artifact source. + :type artifact_source_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'artifactSourceName': self._serialize.url("artifact_source_name", artifact_source_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}'} diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/operations.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/operations.py new file mode 100644 index 000000000000..bfc7008090c8 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/operations.py @@ -0,0 +1,94 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def get( + self, custom_headers=None, raw=False, **operation_config): + """Gets an operation resource. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.deploymentmanager.models.Operation] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[Operation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DeploymentManager/operations'} diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/rollouts_operations.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/rollouts_operations.py new file mode 100644 index 000000000000..02e882420c56 --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/rollouts_operations.py @@ -0,0 +1,419 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class RolloutsOperations(object): + """RolloutsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, rollout_name, rollout_request=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'rolloutName': self._serialize.url("rollout_name", rollout_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if rollout_request is not None: + body_content = self._serialize.body(rollout_request, 'RolloutRequest') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 201: + deserialized = self._deserialize('RolloutRequest', response) + header_dict = { + 'Azure-AsyncOperation': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, rollout_name, rollout_request=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a rollout. + + This is an asynchronous operation and can be polled to completion using + the location header returned by this operation. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param rollout_name: The rollout name. + :type rollout_name: str + :param rollout_request: Source rollout request object that defines the + rollout. + :type rollout_request: + ~azure.mgmt.deploymentmanager.models.RolloutRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RolloutRequest or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.deploymentmanager.models.RolloutRequest] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.deploymentmanager.models.RolloutRequest]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + rollout_name=rollout_name, + rollout_request=rollout_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Azure-AsyncOperation': 'str', + } + deserialized = self._deserialize('RolloutRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}'} + + def get( + self, resource_group_name, rollout_name, retry_attempt=None, custom_headers=None, raw=False, **operation_config): + """Gets detailed information of a rollout. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param rollout_name: The rollout name. + :type rollout_name: str + :param retry_attempt: Rollout retry attempt ordinal to get the result + of. If not specified, result of the latest attempt will be returned. + :type retry_attempt: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Rollout or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.Rollout or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'rolloutName': self._serialize.url("rollout_name", rollout_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if retry_attempt is not None: + query_parameters['retryAttempt'] = self._serialize.query("retry_attempt", retry_attempt, 'int') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Rollout', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}'} + + def delete( + self, resource_group_name, rollout_name, custom_headers=None, raw=False, **operation_config): + """Deletes a rollout resource. + + Only rollouts in terminal state can be deleted. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param rollout_name: The rollout name. + :type rollout_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'rolloutName': self._serialize.url("rollout_name", rollout_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}'} + + def cancel( + self, resource_group_name, rollout_name, custom_headers=None, raw=False, **operation_config): + """Stops a running rollout. + + Only running rollouts can be canceled. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param rollout_name: The rollout name. + :type rollout_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Rollout or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.Rollout or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'rolloutName': self._serialize.url("rollout_name", rollout_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Rollout', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}/cancel'} + + def restart( + self, resource_group_name, rollout_name, skip_succeeded=None, custom_headers=None, raw=False, **operation_config): + """Restarts a failed rollout and optionally skips all succeeded steps. + + Only failed rollouts can be restarted. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param rollout_name: The rollout name. + :type rollout_name: str + :param skip_succeeded: If true, will skip all succeeded steps so far + in the rollout. If false, will execute the entire rollout again + regardless of the current state of individual resources. Defaults to + false if not specified. + :type skip_succeeded: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Rollout or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.Rollout or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'rolloutName': self._serialize.url("rollout_name", rollout_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip_succeeded is not None: + query_parameters['skipSucceeded'] = self._serialize.query("skip_succeeded", skip_succeeded, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Rollout', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}/restart'} diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/service_topologies_operations.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/service_topologies_operations.py new file mode 100644 index 000000000000..dfa9f8b0180f --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/service_topologies_operations.py @@ -0,0 +1,229 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ServiceTopologiesOperations(object): + """ServiceTopologiesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def create_or_update( + self, service_topology_info, resource_group_name, service_topology_name, custom_headers=None, raw=False, **operation_config): + """Creates or updates a service topology. + + Synchronously creates a new service topology or updates an existing + service topology. + + :param service_topology_info: Source topology object defines the + resource. + :type service_topology_info: + ~azure.mgmt.deploymentmanager.models.ServiceTopologyResource + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param service_topology_name: The name of the service topology . + :type service_topology_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceTopologyResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.ServiceTopologyResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serviceTopologyName': self._serialize.url("service_topology_name", service_topology_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_topology_info, 'ServiceTopologyResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('ServiceTopologyResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}'} + + def get( + self, resource_group_name, service_topology_name, custom_headers=None, raw=False, **operation_config): + """Gets the service topology. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param service_topology_name: The name of the service topology . + :type service_topology_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceTopologyResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.ServiceTopologyResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serviceTopologyName': self._serialize.url("service_topology_name", service_topology_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServiceTopologyResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}'} + + def delete( + self, resource_group_name, service_topology_name, custom_headers=None, raw=False, **operation_config): + """Deletes the service topology. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param service_topology_name: The name of the service topology . + :type service_topology_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serviceTopologyName': self._serialize.url("service_topology_name", service_topology_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}'} diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/service_units_operations.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/service_units_operations.py new file mode 100644 index 000000000000..56779520a0ab --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/service_units_operations.py @@ -0,0 +1,292 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ServiceUnitsOperations(object): + """ServiceUnitsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, service_topology_name, service_name, service_unit_name, service_unit_info, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serviceTopologyName': self._serialize.url("service_topology_name", service_topology_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceUnitName': self._serialize.url("service_unit_name", service_unit_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_unit_info, 'ServiceUnitResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 201: + deserialized = self._deserialize('ServiceUnitResource', response) + header_dict = { + 'Azure-AsyncOperation': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, service_topology_name, service_name, service_unit_name, service_unit_info, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a service unit under the service in the service + topology. + + This is an asynchronous operation and can be polled to completion using + the operation resource returned by this operation. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param service_topology_name: The name of the service topology . + :type service_topology_name: str + :param service_name: The name of the service resource. + :type service_name: str + :param service_unit_name: The name of the service unit resource. + :type service_unit_name: str + :param service_unit_info: The service unit resource object. + :type service_unit_info: + ~azure.mgmt.deploymentmanager.models.ServiceUnitResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ServiceUnitResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.deploymentmanager.models.ServiceUnitResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.deploymentmanager.models.ServiceUnitResource]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_topology_name=service_topology_name, + service_name=service_name, + service_unit_name=service_unit_name, + service_unit_info=service_unit_info, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Azure-AsyncOperation': 'str', + } + deserialized = self._deserialize('ServiceUnitResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}'} + + def get( + self, resource_group_name, service_topology_name, service_name, service_unit_name, custom_headers=None, raw=False, **operation_config): + """Gets the service unit. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param service_topology_name: The name of the service topology . + :type service_topology_name: str + :param service_name: The name of the service resource. + :type service_name: str + :param service_unit_name: The name of the service unit resource. + :type service_unit_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceUnitResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.ServiceUnitResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serviceTopologyName': self._serialize.url("service_topology_name", service_topology_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceUnitName': self._serialize.url("service_unit_name", service_unit_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServiceUnitResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}'} + + def delete( + self, resource_group_name, service_topology_name, service_name, service_unit_name, custom_headers=None, raw=False, **operation_config): + """Deletes the service unit. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param service_topology_name: The name of the service topology . + :type service_topology_name: str + :param service_name: The name of the service resource. + :type service_name: str + :param service_unit_name: The name of the service unit resource. + :type service_unit_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serviceTopologyName': self._serialize.url("service_topology_name", service_topology_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceUnitName': self._serialize.url("service_unit_name", service_unit_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}'} diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/services_operations.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/services_operations.py new file mode 100644 index 000000000000..deb03e2a645e --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/services_operations.py @@ -0,0 +1,236 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ServicesOperations(object): + """ServicesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def create_or_update( + self, resource_group_name, service_topology_name, service_name, service_info, custom_headers=None, raw=False, **operation_config): + """Creates or updates a service in the service topology. + + Synchronously creates a new service or updates an existing service. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param service_topology_name: The name of the service topology . + :type service_topology_name: str + :param service_name: The name of the service resource. + :type service_name: str + :param service_info: The service object + :type service_info: + ~azure.mgmt.deploymentmanager.models.ServiceResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.ServiceResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serviceTopologyName': self._serialize.url("service_topology_name", service_topology_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_info, 'ServiceResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('ServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}'} + + def get( + self, resource_group_name, service_topology_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the service. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param service_topology_name: The name of the service topology . + :type service_topology_name: str + :param service_name: The name of the service resource. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.ServiceResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serviceTopologyName': self._serialize.url("service_topology_name", service_topology_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}'} + + def delete( + self, resource_group_name, service_topology_name, service_name, custom_headers=None, raw=False, **operation_config): + """Deletes the service. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param service_topology_name: The name of the service topology . + :type service_topology_name: str + :param service_name: The name of the service resource. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serviceTopologyName': self._serialize.url("service_topology_name", service_topology_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}'} diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/steps_operations.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/steps_operations.py new file mode 100644 index 000000000000..eeb12488c11b --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/steps_operations.py @@ -0,0 +1,229 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class StepsOperations(object): + """StepsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def create_or_update( + self, resource_group_name, step_name, step_info=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a rollout step with the given step properties. + + Synchronously creates a new step or updates an existing step. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param step_name: The name of the deployment step. + :type step_name: str + :param step_info: The step object. + :type step_info: ~azure.mgmt.deploymentmanager.models.StepResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StepResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.StepResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'stepName': self._serialize.url("step_name", step_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if step_info is not None: + body_content = self._serialize.body(step_info, 'StepResource') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('StepResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName}'} + + def get( + self, resource_group_name, step_name, custom_headers=None, raw=False, **operation_config): + """Gets the step. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param step_name: The name of the deployment step. + :type step_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StepResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.deploymentmanager.models.StepResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'stepName': self._serialize.url("step_name", step_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StepResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName}'} + + def delete( + self, resource_group_name, step_name, custom_headers=None, raw=False, **operation_config): + """Deletes the step. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param step_name: The name of the deployment step. + :type step_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'stepName': self._serialize.url("step_name", step_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName}'} diff --git a/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/version.py b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/version.py new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/azure-mgmt-deploymentmanager/sdk_packaging.toml b/azure-mgmt-deploymentmanager/sdk_packaging.toml new file mode 100644 index 000000000000..511cf105697c --- /dev/null +++ b/azure-mgmt-deploymentmanager/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-mgmt-deploymentmanager" +package_pprint_name = "Deployment Manager" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-deploymentmanager/setup.cfg b/azure-mgmt-deploymentmanager/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/azure-mgmt-deploymentmanager/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/azure-mgmt-deploymentmanager/setup.py b/azure-mgmt-deploymentmanager/setup.py new file mode 100644 index 000000000000..5aed42da18a0 --- /dev/null +++ b/azure-mgmt-deploymentmanager/setup.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-deploymentmanager" +PACKAGE_PPRINT_NAME = "Deployment Manager" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + 'azure-common~=1.1', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +)