From f4b616344cbd853ad1142ccac1a695bc1b0d4a38 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 30 Nov 2018 00:50:14 +0000 Subject: [PATCH 1/6] Generated from 4c4c444cec4755c5a23dfe4ac3bd1fa5476c4a5e add python repo --- .../azure/mgmt/blueprint/__init__.py | 18 ++ .../blueprint/blueprint_management_client.py | 103 ++++++ .../azure/mgmt/blueprint/models/__init__.py | 128 ++++++++ .../azure/mgmt/blueprint/models/artifact.py | 58 ++++ .../mgmt/blueprint/models/artifact_paged.py | 27 ++ .../mgmt/blueprint/models/artifact_py3.py | 58 ++++ .../azure/mgmt/blueprint/models/assignment.py | 98 ++++++ .../models/assignment_deployment_job.py | 53 +++ .../models/assignment_deployment_job_py3.py | 53 +++ .../assignment_deployment_job_result.py | 33 ++ .../assignment_deployment_job_result_py3.py | 33 ++ .../models/assignment_job_created_resource.py | 46 +++ .../assignment_job_created_resource_py3.py | 46 +++ .../models/assignment_lock_settings.py | 28 ++ .../models/assignment_lock_settings_py3.py | 28 ++ .../blueprint/models/assignment_operation.py | 68 ++++ .../models/assignment_operation_paged.py | 27 ++ .../models/assignment_operation_py3.py | 68 ++++ .../mgmt/blueprint/models/assignment_paged.py | 27 ++ .../mgmt/blueprint/models/assignment_py3.py | 98 ++++++ .../blueprint/models/assignment_status.py | 38 +++ .../blueprint/models/assignment_status_py3.py | 38 +++ .../blueprint/models/azure_resource_base.py | 45 +++ .../models/azure_resource_base_py3.py | 45 +++ .../models/azure_resource_manager_error.py | 32 ++ .../azure_resource_manager_error_py3.py | 32 ++ .../azure/mgmt/blueprint/models/blueprint.py | 82 +++++ .../blueprint_management_client_enums.py | 56 ++++ .../mgmt/blueprint/models/blueprint_paged.py | 27 ++ .../mgmt/blueprint/models/blueprint_py3.py | 82 +++++ .../models/blueprint_resource_status_base.py | 40 +++ .../blueprint_resource_status_base_py3.py | 40 +++ .../mgmt/blueprint/models/blueprint_status.py | 38 +++ .../blueprint/models/blueprint_status_py3.py | 38 +++ .../blueprint/models/key_vault_reference.py | 34 ++ .../models/key_vault_reference_py3.py | 34 ++ .../models/managed_service_identity.py | 44 +++ .../models/managed_service_identity_py3.py | 44 +++ .../blueprint/models/parameter_definition.py | 60 ++++ .../models/parameter_definition_py3.py | 60 ++++ .../mgmt/blueprint/models/parameter_value.py | 38 +++ .../blueprint/models/parameter_value_base.py | 29 ++ .../models/parameter_value_base_py3.py | 29 ++ .../blueprint/models/parameter_value_py3.py | 38 +++ .../models/policy_assignment_artifact.py | 81 +++++ .../models/policy_assignment_artifact_py3.py | 81 +++++ .../blueprint/models/published_blueprint.py | 83 +++++ .../models/published_blueprint_paged.py | 27 ++ .../models/published_blueprint_py3.py | 83 +++++ .../models/resource_group_definition.py | 60 ++++ .../models/resource_group_definition_py3.py | 60 ++++ .../blueprint/models/resource_group_value.py | 36 +++ .../models/resource_group_value_py3.py | 36 +++ .../models/resource_provider_operation.py | 34 ++ .../resource_provider_operation_display.py | 40 +++ ...resource_provider_operation_display_py3.py | 40 +++ .../resource_provider_operation_list.py | 28 ++ .../resource_provider_operation_list_py3.py | 28 ++ .../models/resource_provider_operation_py3.py | 34 ++ .../models/role_assignment_artifact.py | 81 +++++ .../models/role_assignment_artifact_py3.py | 81 +++++ .../secret_reference_parameter_value.py | 38 +++ .../secret_reference_parameter_value_py3.py | 38 +++ .../models/secret_value_reference.py | 45 +++ .../models/secret_value_reference_py3.py | 45 +++ .../blueprint/models/template_artifact.py | 80 +++++ .../blueprint/models/template_artifact_py3.py | 80 +++++ .../mgmt/blueprint/models/tracked_resource.py | 49 +++ .../blueprint/models/tracked_resource_py3.py | 49 +++ .../mgmt/blueprint/operations/__init__.py | 28 ++ .../operations/artifacts_operations.py | 305 ++++++++++++++++++ .../operations/assignment_operations.py | 173 ++++++++++ .../operations/assignments_operations.py | 297 +++++++++++++++++ .../operations/blueprints_operations.py | 293 +++++++++++++++++ .../mgmt/blueprint/operations/operations.py | 92 ++++++ .../published_artifacts_operations.py | 177 ++++++++++ .../published_blueprints_operations.py | 300 +++++++++++++++++ .../azure/mgmt/blueprint/version.py | 13 + 78 files changed, 5156 insertions(+) create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/__init__.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/blueprint_management_client.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/__init__.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact_paged.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_lock_settings.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_lock_settings_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_paged.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_paged.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_status.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_status_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_base.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_base_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_manager_error.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_manager_error_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_management_client_enums.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_paged.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_resource_status_base.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_resource_status_base_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_status.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_status_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/key_vault_reference.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/key_vault_reference_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_definition.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_definition_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_base.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_base_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/policy_assignment_artifact.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/policy_assignment_artifact_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint_paged.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_definition.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_definition_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_value.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_value_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_display.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_display_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_list.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_list_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/role_assignment_artifact.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/role_assignment_artifact_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_reference_parameter_value.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_reference_parameter_value_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_value_reference.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_value_reference_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/template_artifact.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/template_artifact_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/tracked_resource.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/models/tracked_resource_py3.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/operations/__init__.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/operations/artifacts_operations.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignments_operations.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/operations/blueprints_operations.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/operations/operations.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/operations/published_artifacts_operations.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/operations/published_blueprints_operations.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/blueprint/version.py diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/__init__.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/__init__.py new file mode 100644 index 000000000000..39c4a02d07e1 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/__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 .blueprint_management_client import BlueprintManagementClient +from .version import VERSION + +__all__ = ['BlueprintManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/blueprint_management_client.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/blueprint_management_client.py new file mode 100644 index 000000000000..3bbbbdaa58c5 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/blueprint_management_client.py @@ -0,0 +1,103 @@ +# 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.blueprints_operations import BlueprintsOperations +from .operations.artifacts_operations import ArtifactsOperations +from .operations.published_blueprints_operations import PublishedBlueprintsOperations +from .operations.published_artifacts_operations import PublishedArtifactsOperations +from .operations.operations import Operations +from .operations.assignments_operations import AssignmentsOperations +from .operations.assignment_operations import AssignmentOperations +from . import models + + +class BlueprintManagementClientConfiguration(AzureConfiguration): + """Configuration for BlueprintManagementClient + 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 str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(BlueprintManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-blueprint/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + + +class BlueprintManagementClient(SDKClient): + """Blueprint Client + + :ivar config: Configuration for client. + :vartype config: BlueprintManagementClientConfiguration + + :ivar blueprints: Blueprints operations + :vartype blueprints: azure.mgmt.blueprint.operations.BlueprintsOperations + :ivar artifacts: Artifacts operations + :vartype artifacts: azure.mgmt.blueprint.operations.ArtifactsOperations + :ivar published_blueprints: PublishedBlueprints operations + :vartype published_blueprints: azure.mgmt.blueprint.operations.PublishedBlueprintsOperations + :ivar published_artifacts: PublishedArtifacts operations + :vartype published_artifacts: azure.mgmt.blueprint.operations.PublishedArtifactsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.blueprint.operations.Operations + :ivar assignments: Assignments operations + :vartype assignments: azure.mgmt.blueprint.operations.AssignmentsOperations + :ivar assignment_operations: AssignmentOperations operations + :vartype assignment_operations: azure.mgmt.blueprint.operations.AssignmentOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = BlueprintManagementClientConfiguration(credentials, base_url) + super(BlueprintManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.blueprints = BlueprintsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.artifacts = ArtifactsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.published_blueprints = PublishedBlueprintsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.published_artifacts = PublishedArtifactsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.assignments = AssignmentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.assignment_operations = AssignmentOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/__init__.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/__init__.py new file mode 100644 index 000000000000..1c32bcaad7ec --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/__init__.py @@ -0,0 +1,128 @@ +# 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 .blueprint_py3 import Blueprint + from .artifact_py3 import Artifact + from .published_blueprint_py3 import PublishedBlueprint + from .resource_provider_operation_display_py3 import ResourceProviderOperationDisplay + from .resource_provider_operation_py3 import ResourceProviderOperation + from .resource_provider_operation_list_py3 import ResourceProviderOperationList + from .blueprint_status_py3 import BlueprintStatus + from .parameter_definition_py3 import ParameterDefinition + from .resource_group_definition_py3 import ResourceGroupDefinition + from .parameter_value_base_py3 import ParameterValueBase + from .template_artifact_py3 import TemplateArtifact + from .role_assignment_artifact_py3 import RoleAssignmentArtifact + from .policy_assignment_artifact_py3 import PolicyAssignmentArtifact + from .parameter_value_py3 import ParameterValue + from .key_vault_reference_py3 import KeyVaultReference + from .secret_value_reference_py3 import SecretValueReference + from .secret_reference_parameter_value_py3 import SecretReferenceParameterValue + from .resource_group_value_py3 import ResourceGroupValue + from .azure_resource_base_py3 import AzureResourceBase + from .blueprint_resource_status_base_py3 import BlueprintResourceStatusBase + from .managed_service_identity_py3 import ManagedServiceIdentity + from .assignment_status_py3 import AssignmentStatus + from .assignment_lock_settings_py3 import AssignmentLockSettings + from .assignment_py3 import Assignment + from .tracked_resource_py3 import TrackedResource + from .azure_resource_manager_error_py3 import AzureResourceManagerError + from .assignment_job_created_resource_py3 import AssignmentJobCreatedResource + from .assignment_deployment_job_result_py3 import AssignmentDeploymentJobResult + from .assignment_deployment_job_py3 import AssignmentDeploymentJob + from .assignment_operation_py3 import AssignmentOperation +except (SyntaxError, ImportError): + from .blueprint import Blueprint + from .artifact import Artifact + from .published_blueprint import PublishedBlueprint + from .resource_provider_operation_display import ResourceProviderOperationDisplay + from .resource_provider_operation import ResourceProviderOperation + from .resource_provider_operation_list import ResourceProviderOperationList + from .blueprint_status import BlueprintStatus + from .parameter_definition import ParameterDefinition + from .resource_group_definition import ResourceGroupDefinition + from .parameter_value_base import ParameterValueBase + from .template_artifact import TemplateArtifact + from .role_assignment_artifact import RoleAssignmentArtifact + from .policy_assignment_artifact import PolicyAssignmentArtifact + from .parameter_value import ParameterValue + from .key_vault_reference import KeyVaultReference + from .secret_value_reference import SecretValueReference + from .secret_reference_parameter_value import SecretReferenceParameterValue + from .resource_group_value import ResourceGroupValue + from .azure_resource_base import AzureResourceBase + from .blueprint_resource_status_base import BlueprintResourceStatusBase + from .managed_service_identity import ManagedServiceIdentity + from .assignment_status import AssignmentStatus + from .assignment_lock_settings import AssignmentLockSettings + from .assignment import Assignment + from .tracked_resource import TrackedResource + from .azure_resource_manager_error import AzureResourceManagerError + from .assignment_job_created_resource import AssignmentJobCreatedResource + from .assignment_deployment_job_result import AssignmentDeploymentJobResult + from .assignment_deployment_job import AssignmentDeploymentJob + from .assignment_operation import AssignmentOperation +from .blueprint_paged import BlueprintPaged +from .artifact_paged import ArtifactPaged +from .published_blueprint_paged import PublishedBlueprintPaged +from .assignment_paged import AssignmentPaged +from .assignment_operation_paged import AssignmentOperationPaged +from .blueprint_management_client_enums import ( + BlueprintTargetScope, + TemplateParameterType, + ManagedServiceIdentityType, + AssignmentLockMode, + AssignmentProvisioningState, +) + +__all__ = [ + 'Blueprint', + 'Artifact', + 'PublishedBlueprint', + 'ResourceProviderOperationDisplay', + 'ResourceProviderOperation', + 'ResourceProviderOperationList', + 'BlueprintStatus', + 'ParameterDefinition', + 'ResourceGroupDefinition', + 'ParameterValueBase', + 'TemplateArtifact', + 'RoleAssignmentArtifact', + 'PolicyAssignmentArtifact', + 'ParameterValue', + 'KeyVaultReference', + 'SecretValueReference', + 'SecretReferenceParameterValue', + 'ResourceGroupValue', + 'AzureResourceBase', + 'BlueprintResourceStatusBase', + 'ManagedServiceIdentity', + 'AssignmentStatus', + 'AssignmentLockSettings', + 'Assignment', + 'TrackedResource', + 'AzureResourceManagerError', + 'AssignmentJobCreatedResource', + 'AssignmentDeploymentJobResult', + 'AssignmentDeploymentJob', + 'AssignmentOperation', + 'BlueprintPaged', + 'ArtifactPaged', + 'PublishedBlueprintPaged', + 'AssignmentPaged', + 'AssignmentOperationPaged', + 'BlueprintTargetScope', + 'TemplateParameterType', + 'ManagedServiceIdentityType', + 'AssignmentLockMode', + 'AssignmentProvisioningState', +] diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact.py new file mode 100644 index 000000000000..902d943cb1f0 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact.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 .azure_resource_base import AzureResourceBase + + +class Artifact(AzureResourceBase): + """Represents a Blueprint artifact. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: TemplateArtifact, RoleAssignmentArtifact, + PolicyAssignmentArtifact + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'template': 'TemplateArtifact', 'roleAssignment': 'RoleAssignmentArtifact', 'policyAssignment': 'PolicyAssignmentArtifact'} + } + + def __init__(self, **kwargs): + super(Artifact, self).__init__(**kwargs) + self.kind = None + self.kind = 'Artifact' diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact_paged.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact_paged.py new file mode 100644 index 000000000000..95da2a996886 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class ArtifactPaged(Paged): + """ + A paging container for iterating over a list of :class:`Artifact ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Artifact]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact_py3.py new file mode 100644 index 000000000000..2dff33fc6c5c --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact_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 .azure_resource_base_py3 import AzureResourceBase + + +class Artifact(AzureResourceBase): + """Represents a Blueprint artifact. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: TemplateArtifact, RoleAssignmentArtifact, + PolicyAssignmentArtifact + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'template': 'TemplateArtifact', 'roleAssignment': 'RoleAssignmentArtifact', 'policyAssignment': 'PolicyAssignmentArtifact'} + } + + def __init__(self, **kwargs) -> None: + super(Artifact, self).__init__(**kwargs) + self.kind = None + self.kind = 'Artifact' diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment.py new file mode 100644 index 000000000000..feb9d06cf6f3 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment.py @@ -0,0 +1,98 @@ +# 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 Assignment(TrackedResource): + """Represents a Blueprint assignment. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param location: Required. The location of this Blueprint assignment. + :type location: str + :param identity: Required. Managed Service Identity for this Blueprint + assignment + :type identity: ~azure.mgmt.blueprint.models.ManagedServiceIdentity + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :param blueprint_id: ID of the Blueprint definition resource. + :type blueprint_id: str + :param parameters: Required. Blueprint parameter values. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterValueBase] + :param resource_groups: Required. Names and locations of resource group + placeholders. + :type resource_groups: dict[str, + ~azure.mgmt.blueprint.models.ResourceGroupValue] + :ivar status: Status of Blueprint assignment. This field is readonly. + :vartype status: ~azure.mgmt.blueprint.models.AssignmentStatus + :param locks: Defines how Blueprint-managed resources will be locked. + :type locks: ~azure.mgmt.blueprint.models.AssignmentLockSettings + :ivar provisioning_state: State of the assignment. Possible values + include: 'creating', 'validating', 'waiting', 'deploying', 'cancelling', + 'locking', 'succeeded', 'failed', 'canceled', 'deleting' + :vartype provisioning_state: str or + ~azure.mgmt.blueprint.models.AssignmentProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'identity': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'parameters': {'required': True}, + 'resource_groups': {'required': True}, + 'status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'blueprint_id': {'key': 'properties.blueprintId', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterValueBase}'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '{ResourceGroupValue}'}, + 'status': {'key': 'properties.status', 'type': 'AssignmentStatus'}, + 'locks': {'key': 'properties.locks', 'type': 'AssignmentLockSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Assignment, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.blueprint_id = kwargs.get('blueprint_id', None) + self.parameters = kwargs.get('parameters', None) + self.resource_groups = kwargs.get('resource_groups', None) + self.status = None + self.locks = kwargs.get('locks', None) + self.provisioning_state = None diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job.py new file mode 100644 index 000000000000..7fc31cab9354 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job.py @@ -0,0 +1,53 @@ +# 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 AssignmentDeploymentJob(Model): + """Represents individual job in given assignment operation. + + :param kind: Kind of the job. + :type kind: str + :param action: Name of the action performed in this job. + :type action: str + :param job_id: Id of this job. + :type job_id: str + :param job_state: State of this job. + :type job_state: str + :param result: deployment job result. + :type result: ~azure.mgmt.blueprint.models.AssignmentDeploymentJobResult + :param history: result of this deployment job for each retry. + :type history: + list[~azure.mgmt.blueprint.models.AssignmentDeploymentJobResult] + :param request_uri: Reference to deployment job resource id. + :type request_uri: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'job_state': {'key': 'jobState', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'AssignmentDeploymentJobResult'}, + 'history': {'key': 'history', 'type': '[AssignmentDeploymentJobResult]'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssignmentDeploymentJob, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.action = kwargs.get('action', None) + self.job_id = kwargs.get('job_id', None) + self.job_state = kwargs.get('job_state', None) + self.result = kwargs.get('result', None) + self.history = kwargs.get('history', None) + self.request_uri = kwargs.get('request_uri', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_py3.py new file mode 100644 index 000000000000..52cd23b1895c --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_py3.py @@ -0,0 +1,53 @@ +# 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 AssignmentDeploymentJob(Model): + """Represents individual job in given assignment operation. + + :param kind: Kind of the job. + :type kind: str + :param action: Name of the action performed in this job. + :type action: str + :param job_id: Id of this job. + :type job_id: str + :param job_state: State of this job. + :type job_state: str + :param result: deployment job result. + :type result: ~azure.mgmt.blueprint.models.AssignmentDeploymentJobResult + :param history: result of this deployment job for each retry. + :type history: + list[~azure.mgmt.blueprint.models.AssignmentDeploymentJobResult] + :param request_uri: Reference to deployment job resource id. + :type request_uri: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'job_state': {'key': 'jobState', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'AssignmentDeploymentJobResult'}, + 'history': {'key': 'history', 'type': '[AssignmentDeploymentJobResult]'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, action: str=None, job_id: str=None, job_state: str=None, result=None, history=None, request_uri: str=None, **kwargs) -> None: + super(AssignmentDeploymentJob, self).__init__(**kwargs) + self.kind = kind + self.action = action + self.job_id = job_id + self.job_state = job_state + self.result = result + self.history = history + self.request_uri = request_uri diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result.py new file mode 100644 index 000000000000..efcee015c5bd --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result.py @@ -0,0 +1,33 @@ +# 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 AssignmentDeploymentJobResult(Model): + """result of each individual deployment in a blueprint assignment. + + :param error: contains error details if deployment job failed. + :type error: ~azure.mgmt.blueprint.models.AzureResourceManagerError + :param resources: resources created as result of the deployment job. + :type resources: + list[~azure.mgmt.blueprint.models.AssignmentJobCreatedResource] + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'AzureResourceManagerError'}, + 'resources': {'key': 'resources', 'type': '[AssignmentJobCreatedResource]'}, + } + + def __init__(self, **kwargs): + super(AssignmentDeploymentJobResult, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + self.resources = kwargs.get('resources', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result_py3.py new file mode 100644 index 000000000000..ab80ba247506 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result_py3.py @@ -0,0 +1,33 @@ +# 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 AssignmentDeploymentJobResult(Model): + """result of each individual deployment in a blueprint assignment. + + :param error: contains error details if deployment job failed. + :type error: ~azure.mgmt.blueprint.models.AzureResourceManagerError + :param resources: resources created as result of the deployment job. + :type resources: + list[~azure.mgmt.blueprint.models.AssignmentJobCreatedResource] + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'AzureResourceManagerError'}, + 'resources': {'key': 'resources', 'type': '[AssignmentJobCreatedResource]'}, + } + + def __init__(self, *, error=None, resources=None, **kwargs) -> None: + super(AssignmentDeploymentJobResult, self).__init__(**kwargs) + self.error = error + self.resources = resources diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py new file mode 100644 index 000000000000..d2a6f2525b6b --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py @@ -0,0 +1,46 @@ +# 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 .azure_resource_base import AzureResourceBase + + +class AssignmentJobCreatedResource(AzureResourceBase): + """Azure resource created from deployment job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param properties: + :type properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(AssignmentJobCreatedResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py new file mode 100644 index 000000000000..f41ba7b99152 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py @@ -0,0 +1,46 @@ +# 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 .azure_resource_base_py3 import AzureResourceBase + + +class AssignmentJobCreatedResource(AzureResourceBase): + """Azure resource created from deployment job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param properties: + :type properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AssignmentJobCreatedResource, self).__init__(**kwargs) + self.properties = properties diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_lock_settings.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_lock_settings.py new file mode 100644 index 000000000000..893eae5c5600 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_lock_settings.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 msrest.serialization import Model + + +class AssignmentLockSettings(Model): + """Defines how Blueprint-managed resources will be locked. + + :param mode: Lock mode. Possible values include: 'None', 'AllResources' + :type mode: str or ~azure.mgmt.blueprint.models.AssignmentLockMode + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssignmentLockSettings, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_lock_settings_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_lock_settings_py3.py new file mode 100644 index 000000000000..5b34b97f226d --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_lock_settings_py3.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 msrest.serialization import Model + + +class AssignmentLockSettings(Model): + """Defines how Blueprint-managed resources will be locked. + + :param mode: Lock mode. Possible values include: 'None', 'AllResources' + :type mode: str or ~azure.mgmt.blueprint.models.AssignmentLockMode + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__(self, *, mode=None, **kwargs) -> None: + super(AssignmentLockSettings, self).__init__(**kwargs) + self.mode = mode diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation.py new file mode 100644 index 000000000000..2d7aa7e614d2 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation.py @@ -0,0 +1,68 @@ +# 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 .azure_resource_base import AzureResourceBase + + +class AssignmentOperation(AzureResourceBase): + """Represents underlying deployment detail for each update to the assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param blueprint_version: The blueprint version used for the assignment + operation. + :type blueprint_version: str + :param assignment_state: State of this assignment operation. + :type assignment_state: str + :param time_created: Create time of this Assignment Operation. + :type time_created: str + :param time_started: Start time of the underlying deployment. + :type time_started: str + :param time_finished: Finish time of the overall underlying deployments. + :type time_finished: str + :param deployments: list of jobs in this assignment operation. + :type deployments: + list[~azure.mgmt.blueprint.models.AssignmentDeploymentJob] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'blueprint_version': {'key': 'properties.blueprintVersion', 'type': 'str'}, + 'assignment_state': {'key': 'properties.assignmentState', 'type': 'str'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'str'}, + 'time_started': {'key': 'properties.timeStarted', 'type': 'str'}, + 'time_finished': {'key': 'properties.timeFinished', 'type': 'str'}, + 'deployments': {'key': 'properties.deployments', 'type': '[AssignmentDeploymentJob]'}, + } + + def __init__(self, **kwargs): + super(AssignmentOperation, self).__init__(**kwargs) + self.blueprint_version = kwargs.get('blueprint_version', None) + self.assignment_state = kwargs.get('assignment_state', None) + self.time_created = kwargs.get('time_created', None) + self.time_started = kwargs.get('time_started', None) + self.time_finished = kwargs.get('time_finished', None) + self.deployments = kwargs.get('deployments', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_paged.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_paged.py new file mode 100644 index 000000000000..1166e70a3098 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class AssignmentOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`AssignmentOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AssignmentOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(AssignmentOperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_py3.py new file mode 100644 index 000000000000..78f11740852e --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_py3.py @@ -0,0 +1,68 @@ +# 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 .azure_resource_base_py3 import AzureResourceBase + + +class AssignmentOperation(AzureResourceBase): + """Represents underlying deployment detail for each update to the assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param blueprint_version: The blueprint version used for the assignment + operation. + :type blueprint_version: str + :param assignment_state: State of this assignment operation. + :type assignment_state: str + :param time_created: Create time of this Assignment Operation. + :type time_created: str + :param time_started: Start time of the underlying deployment. + :type time_started: str + :param time_finished: Finish time of the overall underlying deployments. + :type time_finished: str + :param deployments: list of jobs in this assignment operation. + :type deployments: + list[~azure.mgmt.blueprint.models.AssignmentDeploymentJob] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'blueprint_version': {'key': 'properties.blueprintVersion', 'type': 'str'}, + 'assignment_state': {'key': 'properties.assignmentState', 'type': 'str'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'str'}, + 'time_started': {'key': 'properties.timeStarted', 'type': 'str'}, + 'time_finished': {'key': 'properties.timeFinished', 'type': 'str'}, + 'deployments': {'key': 'properties.deployments', 'type': '[AssignmentDeploymentJob]'}, + } + + def __init__(self, *, blueprint_version: str=None, assignment_state: str=None, time_created: str=None, time_started: str=None, time_finished: str=None, deployments=None, **kwargs) -> None: + super(AssignmentOperation, self).__init__(**kwargs) + self.blueprint_version = blueprint_version + self.assignment_state = assignment_state + self.time_created = time_created + self.time_started = time_started + self.time_finished = time_finished + self.deployments = deployments diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_paged.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_paged.py new file mode 100644 index 000000000000..ae8fdad707b9 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class AssignmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`Assignment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Assignment]'} + } + + def __init__(self, *args, **kwargs): + + super(AssignmentPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_py3.py new file mode 100644 index 000000000000..4441c8550904 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_py3.py @@ -0,0 +1,98 @@ +# 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 Assignment(TrackedResource): + """Represents a Blueprint assignment. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param location: Required. The location of this Blueprint assignment. + :type location: str + :param identity: Required. Managed Service Identity for this Blueprint + assignment + :type identity: ~azure.mgmt.blueprint.models.ManagedServiceIdentity + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :param blueprint_id: ID of the Blueprint definition resource. + :type blueprint_id: str + :param parameters: Required. Blueprint parameter values. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterValueBase] + :param resource_groups: Required. Names and locations of resource group + placeholders. + :type resource_groups: dict[str, + ~azure.mgmt.blueprint.models.ResourceGroupValue] + :ivar status: Status of Blueprint assignment. This field is readonly. + :vartype status: ~azure.mgmt.blueprint.models.AssignmentStatus + :param locks: Defines how Blueprint-managed resources will be locked. + :type locks: ~azure.mgmt.blueprint.models.AssignmentLockSettings + :ivar provisioning_state: State of the assignment. Possible values + include: 'creating', 'validating', 'waiting', 'deploying', 'cancelling', + 'locking', 'succeeded', 'failed', 'canceled', 'deleting' + :vartype provisioning_state: str or + ~azure.mgmt.blueprint.models.AssignmentProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'identity': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'parameters': {'required': True}, + 'resource_groups': {'required': True}, + 'status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'blueprint_id': {'key': 'properties.blueprintId', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterValueBase}'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '{ResourceGroupValue}'}, + 'status': {'key': 'properties.status', 'type': 'AssignmentStatus'}, + 'locks': {'key': 'properties.locks', 'type': 'AssignmentLockSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, identity, parameters, resource_groups, display_name: str=None, description: str=None, blueprint_id: str=None, locks=None, **kwargs) -> None: + super(Assignment, self).__init__(location=location, **kwargs) + self.identity = identity + self.display_name = display_name + self.description = description + self.blueprint_id = blueprint_id + self.parameters = parameters + self.resource_groups = resource_groups + self.status = None + self.locks = locks + self.provisioning_state = None diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_status.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_status.py new file mode 100644 index 000000000000..bf12430f8332 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_status.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 .blueprint_resource_status_base import BlueprintResourceStatusBase + + +class AssignmentStatus(BlueprintResourceStatusBase): + """The status of Blueprint assignment. This field is readonly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_created: Creation time of this blueprint. + :vartype time_created: str + :ivar last_modified: Last modified time of this blueprint. + :vartype last_modified: str + """ + + _validation = { + 'time_created': {'readonly': True}, + 'last_modified': {'readonly': True}, + } + + _attribute_map = { + 'time_created': {'key': 'timeCreated', 'type': 'str'}, + 'last_modified': {'key': 'lastModified', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssignmentStatus, self).__init__(**kwargs) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_status_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_status_py3.py new file mode 100644 index 000000000000..04ac50546691 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_status_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 .blueprint_resource_status_base_py3 import BlueprintResourceStatusBase + + +class AssignmentStatus(BlueprintResourceStatusBase): + """The status of Blueprint assignment. This field is readonly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_created: Creation time of this blueprint. + :vartype time_created: str + :ivar last_modified: Last modified time of this blueprint. + :vartype last_modified: str + """ + + _validation = { + 'time_created': {'readonly': True}, + 'last_modified': {'readonly': True}, + } + + _attribute_map = { + 'time_created': {'key': 'timeCreated', 'type': 'str'}, + 'last_modified': {'key': 'lastModified', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AssignmentStatus, self).__init__(**kwargs) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_base.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_base.py new file mode 100644 index 000000000000..4ad4cca22d51 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_base.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 msrest.serialization import Model + + +class AzureResourceBase(Model): + """Common properties for all Azure resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureResourceBase, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_base_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_base_py3.py new file mode 100644 index 000000000000..f89df89ed01d --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_base_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 msrest.serialization import Model + + +class AzureResourceBase(Model): + """Common properties for all Azure resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureResourceBase, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_manager_error.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_manager_error.py new file mode 100644 index 000000000000..5629c39392d0 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_manager_error.py @@ -0,0 +1,32 @@ +# 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 AzureResourceManagerError(Model): + """Error code and message. + + :param code: Error code. + :type code: str + :param message: Error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureResourceManagerError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_manager_error_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_manager_error_py3.py new file mode 100644 index 000000000000..e6d69e7c0086 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/azure_resource_manager_error_py3.py @@ -0,0 +1,32 @@ +# 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 AzureResourceManagerError(Model): + """Error code and message. + + :param code: Error code. + :type code: str + :param message: Error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(AzureResourceManagerError, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint.py new file mode 100644 index 000000000000..a401e5ec6182 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint.py @@ -0,0 +1,82 @@ +# 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 .azure_resource_base import AzureResourceBase + + +class Blueprint(AzureResourceBase): + """Represents a Blueprint definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :ivar status: Status of the Blueprint. This field is readonly. + :vartype status: ~azure.mgmt.blueprint.models.BlueprintStatus + :param target_scope: The scope where this Blueprint can be applied. + Possible values include: 'subscription', 'managementGroup' + :type target_scope: str or + ~azure.mgmt.blueprint.models.BlueprintTargetScope + :param parameters: Parameters required by this Blueprint definition. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterDefinition] + :param resource_groups: Resource group placeholders defined by this + Blueprint definition. + :type resource_groups: dict[str, + ~azure.mgmt.blueprint.models.ResourceGroupDefinition] + :param versions: Published versions of this blueprint. + :type versions: object + :param layout: Layout view of the blueprint, for UI reference. + :type layout: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BlueprintStatus'}, + 'target_scope': {'key': 'properties.targetScope', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterDefinition}'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '{ResourceGroupDefinition}'}, + 'versions': {'key': 'properties.versions', 'type': 'object'}, + 'layout': {'key': 'properties.layout', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Blueprint, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.status = None + self.target_scope = kwargs.get('target_scope', None) + self.parameters = kwargs.get('parameters', None) + self.resource_groups = kwargs.get('resource_groups', None) + self.versions = kwargs.get('versions', None) + self.layout = kwargs.get('layout', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_management_client_enums.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_management_client_enums.py new file mode 100644 index 000000000000..0d0bc6277384 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_management_client_enums.py @@ -0,0 +1,56 @@ +# 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 BlueprintTargetScope(str, Enum): + + subscription = "subscription" + management_group = "managementGroup" + + +class TemplateParameterType(str, Enum): + + string = "string" + array = "array" + bool_enum = "bool" + int_enum = "int" + object_enum = "object" + secure_object = "secureObject" + secure_string = "secureString" + + +class ManagedServiceIdentityType(str, Enum): + + none = "None" + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + + +class AssignmentLockMode(str, Enum): + + none = "None" + all_resources = "AllResources" + + +class AssignmentProvisioningState(str, Enum): + + creating = "creating" + validating = "validating" + waiting = "waiting" + deploying = "deploying" + cancelling = "cancelling" + locking = "locking" + succeeded = "succeeded" + failed = "failed" + canceled = "canceled" + deleting = "deleting" diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_paged.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_paged.py new file mode 100644 index 000000000000..d38997f23395 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class BlueprintPaged(Paged): + """ + A paging container for iterating over a list of :class:`Blueprint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Blueprint]'} + } + + def __init__(self, *args, **kwargs): + + super(BlueprintPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_py3.py new file mode 100644 index 000000000000..cbe5cee9bf56 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_py3.py @@ -0,0 +1,82 @@ +# 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 .azure_resource_base_py3 import AzureResourceBase + + +class Blueprint(AzureResourceBase): + """Represents a Blueprint definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :ivar status: Status of the Blueprint. This field is readonly. + :vartype status: ~azure.mgmt.blueprint.models.BlueprintStatus + :param target_scope: The scope where this Blueprint can be applied. + Possible values include: 'subscription', 'managementGroup' + :type target_scope: str or + ~azure.mgmt.blueprint.models.BlueprintTargetScope + :param parameters: Parameters required by this Blueprint definition. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterDefinition] + :param resource_groups: Resource group placeholders defined by this + Blueprint definition. + :type resource_groups: dict[str, + ~azure.mgmt.blueprint.models.ResourceGroupDefinition] + :param versions: Published versions of this blueprint. + :type versions: object + :param layout: Layout view of the blueprint, for UI reference. + :type layout: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BlueprintStatus'}, + 'target_scope': {'key': 'properties.targetScope', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterDefinition}'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '{ResourceGroupDefinition}'}, + 'versions': {'key': 'properties.versions', 'type': 'object'}, + 'layout': {'key': 'properties.layout', 'type': 'object'}, + } + + def __init__(self, *, display_name: str=None, description: str=None, target_scope=None, parameters=None, resource_groups=None, versions=None, layout=None, **kwargs) -> None: + super(Blueprint, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.status = None + self.target_scope = target_scope + self.parameters = parameters + self.resource_groups = resource_groups + self.versions = versions + self.layout = layout diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_resource_status_base.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_resource_status_base.py new file mode 100644 index 000000000000..caf1769717fb --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_resource_status_base.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 BlueprintResourceStatusBase(Model): + """Shared status properties between all Blueprint resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_created: Creation time of this blueprint. + :vartype time_created: str + :ivar last_modified: Last modified time of this blueprint. + :vartype last_modified: str + """ + + _validation = { + 'time_created': {'readonly': True}, + 'last_modified': {'readonly': True}, + } + + _attribute_map = { + 'time_created': {'key': 'timeCreated', 'type': 'str'}, + 'last_modified': {'key': 'lastModified', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BlueprintResourceStatusBase, self).__init__(**kwargs) + self.time_created = None + self.last_modified = None diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_resource_status_base_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_resource_status_base_py3.py new file mode 100644 index 000000000000..b05c255d42dd --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_resource_status_base_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 BlueprintResourceStatusBase(Model): + """Shared status properties between all Blueprint resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_created: Creation time of this blueprint. + :vartype time_created: str + :ivar last_modified: Last modified time of this blueprint. + :vartype last_modified: str + """ + + _validation = { + 'time_created': {'readonly': True}, + 'last_modified': {'readonly': True}, + } + + _attribute_map = { + 'time_created': {'key': 'timeCreated', 'type': 'str'}, + 'last_modified': {'key': 'lastModified', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(BlueprintResourceStatusBase, self).__init__(**kwargs) + self.time_created = None + self.last_modified = None diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_status.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_status.py new file mode 100644 index 000000000000..5eb0cc9e004d --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_status.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 .blueprint_resource_status_base import BlueprintResourceStatusBase + + +class BlueprintStatus(BlueprintResourceStatusBase): + """The status of the blueprint. This field is readonly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_created: Creation time of this blueprint. + :vartype time_created: str + :ivar last_modified: Last modified time of this blueprint. + :vartype last_modified: str + """ + + _validation = { + 'time_created': {'readonly': True}, + 'last_modified': {'readonly': True}, + } + + _attribute_map = { + 'time_created': {'key': 'timeCreated', 'type': 'str'}, + 'last_modified': {'key': 'lastModified', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BlueprintStatus, self).__init__(**kwargs) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_status_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_status_py3.py new file mode 100644 index 000000000000..628b2a703de3 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/blueprint_status_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 .blueprint_resource_status_base_py3 import BlueprintResourceStatusBase + + +class BlueprintStatus(BlueprintResourceStatusBase): + """The status of the blueprint. This field is readonly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_created: Creation time of this blueprint. + :vartype time_created: str + :ivar last_modified: Last modified time of this blueprint. + :vartype last_modified: str + """ + + _validation = { + 'time_created': {'readonly': True}, + 'last_modified': {'readonly': True}, + } + + _attribute_map = { + 'time_created': {'key': 'timeCreated', 'type': 'str'}, + 'last_modified': {'key': 'lastModified', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(BlueprintStatus, self).__init__(**kwargs) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/key_vault_reference.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/key_vault_reference.py new file mode 100644 index 000000000000..c72555cc6a62 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/key_vault_reference.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 KeyVaultReference(Model): + """Specifies the link to a KeyVault. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Azure resource ID of the KeyVault. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/key_vault_reference_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/key_vault_reference_py3.py new file mode 100644 index 000000000000..348007e278bd --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/key_vault_reference_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 KeyVaultReference(Model): + """Specifies the link to a KeyVault. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Azure resource ID of the KeyVault. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(KeyVaultReference, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity.py new file mode 100644 index 000000000000..c802ecf3316e --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity.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 ManagedServiceIdentity(Model): + """Managed Service Identity. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of the Managed Service Identity. Possible + values include: 'None', 'SystemAssigned', 'UserAssigned' + :type type: str or ~azure.mgmt.blueprint.models.ManagedServiceIdentityType + :param principal_id: Azure Active Directory principal ID associated with + this Identity. + :type principal_id: str + :param tenant_id: ID of the Azure Active Directory. + :type tenant_id: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity_py3.py new file mode 100644 index 000000000000..190f320880c8 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity_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 ManagedServiceIdentity(Model): + """Managed Service Identity. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of the Managed Service Identity. Possible + values include: 'None', 'SystemAssigned', 'UserAssigned' + :type type: str or ~azure.mgmt.blueprint.models.ManagedServiceIdentityType + :param principal_id: Azure Active Directory principal ID associated with + this Identity. + :type principal_id: str + :param tenant_id: ID of the Azure Active Directory. + :type tenant_id: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type, principal_id: str=None, tenant_id: str=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_definition.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_definition.py new file mode 100644 index 000000000000..7d3a3ec550b5 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_definition.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 ParameterDefinition(Model): + """Represent a parameter with constrains and metadata. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Allowed data types for Azure Resource Manager + template parameters. Possible values include: 'string', 'array', 'bool', + 'int', 'object', 'secureObject', 'secureString' + :type type: str or ~azure.mgmt.blueprint.models.TemplateParameterType + :param display_name: DisplayName of this parameter/resourceGroup. + :type display_name: str + :param description: Description of this parameter/resourceGroup. + :type description: str + :param strong_type: StrongType for UI to render rich experience during + assignment time. + :type strong_type: str + :param default_value: Default Value for this parameter. + :type default_value: object + :param allowed_values: Array of allowed values for this parameter. + :type allowed_values: list[object] + """ + + _validation = { + 'type': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'strong_type': {'max_length': 64}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'metadata.displayName', 'type': 'str'}, + 'description': {'key': 'metadata.description', 'type': 'str'}, + 'strong_type': {'key': 'metadata.strongType', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'object'}, + 'allowed_values': {'key': 'allowedValues', 'type': '[object]'}, + } + + def __init__(self, **kwargs): + super(ParameterDefinition, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.strong_type = kwargs.get('strong_type', None) + self.default_value = kwargs.get('default_value', None) + self.allowed_values = kwargs.get('allowed_values', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_definition_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_definition_py3.py new file mode 100644 index 000000000000..ecc0acff4cd0 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_definition_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 ParameterDefinition(Model): + """Represent a parameter with constrains and metadata. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Allowed data types for Azure Resource Manager + template parameters. Possible values include: 'string', 'array', 'bool', + 'int', 'object', 'secureObject', 'secureString' + :type type: str or ~azure.mgmt.blueprint.models.TemplateParameterType + :param display_name: DisplayName of this parameter/resourceGroup. + :type display_name: str + :param description: Description of this parameter/resourceGroup. + :type description: str + :param strong_type: StrongType for UI to render rich experience during + assignment time. + :type strong_type: str + :param default_value: Default Value for this parameter. + :type default_value: object + :param allowed_values: Array of allowed values for this parameter. + :type allowed_values: list[object] + """ + + _validation = { + 'type': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'strong_type': {'max_length': 64}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'metadata.displayName', 'type': 'str'}, + 'description': {'key': 'metadata.description', 'type': 'str'}, + 'strong_type': {'key': 'metadata.strongType', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'object'}, + 'allowed_values': {'key': 'allowedValues', 'type': '[object]'}, + } + + def __init__(self, *, type, display_name: str=None, description: str=None, strong_type: str=None, default_value=None, allowed_values=None, **kwargs) -> None: + super(ParameterDefinition, self).__init__(**kwargs) + self.type = type + self.display_name = display_name + self.description = description + self.strong_type = strong_type + self.default_value = default_value + self.allowed_values = allowed_values diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value.py new file mode 100644 index 000000000000..228a62b9c22b --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value.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 .parameter_value_base import ParameterValueBase + + +class ParameterValue(ParameterValueBase): + """Value for the specified parameter. + + All required parameters must be populated in order to send to Azure. + + :param description: Optional property, just to establish + ParameterValueBase as a BaseClass. + :type description: str + :param value: Required. actual value. + :type value: object + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ParameterValue, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_base.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_base.py new file mode 100644 index 000000000000..e57843add18b --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_base.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 ParameterValueBase(Model): + """Base class for ParameterValue. + + :param description: Optional property, just to establish + ParameterValueBase as a BaseClass. + :type description: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ParameterValueBase, self).__init__(**kwargs) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_base_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_base_py3.py new file mode 100644 index 000000000000..7b03dd7edfd5 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_base_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 ParameterValueBase(Model): + """Base class for ParameterValue. + + :param description: Optional property, just to establish + ParameterValueBase as a BaseClass. + :type description: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, **kwargs) -> None: + super(ParameterValueBase, self).__init__(**kwargs) + self.description = description diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_py3.py new file mode 100644 index 000000000000..6a4243da9739 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/parameter_value_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 .parameter_value_base_py3 import ParameterValueBase + + +class ParameterValue(ParameterValueBase): + """Value for the specified parameter. + + All required parameters must be populated in order to send to Azure. + + :param description: Optional property, just to establish + ParameterValueBase as a BaseClass. + :type description: str + :param value: Required. actual value. + :type value: object + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, *, value, description: str=None, **kwargs) -> None: + super(ParameterValue, self).__init__(description=description, **kwargs) + self.value = value diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/policy_assignment_artifact.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/policy_assignment_artifact.py new file mode 100644 index 000000000000..04d5880b0712 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/policy_assignment_artifact.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 .artifact import Artifact + + +class PolicyAssignmentArtifact(Artifact): + """Blueprint artifact applies Policy assignments. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :param depends_on: Artifacts which need to be deployed before the + specified artifact. + :type depends_on: list[str] + :param policy_definition_id: Required. Azure resource ID of the policy + definition. + :type policy_definition_id: str + :param parameters: Required. Parameter values for the policy definition. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterValueBase] + :param resource_group: Name of the resource group placeholder to which the + policy will be assigned. + :type resource_group: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'policy_definition_id': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'}, + 'policy_definition_id': {'key': 'properties.policyDefinitionId', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterValueBase}'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyAssignmentArtifact, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.depends_on = kwargs.get('depends_on', None) + self.policy_definition_id = kwargs.get('policy_definition_id', None) + self.parameters = kwargs.get('parameters', None) + self.resource_group = kwargs.get('resource_group', None) + self.kind = 'policyAssignment' diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/policy_assignment_artifact_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/policy_assignment_artifact_py3.py new file mode 100644 index 000000000000..01178521c327 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/policy_assignment_artifact_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 .artifact_py3 import Artifact + + +class PolicyAssignmentArtifact(Artifact): + """Blueprint artifact applies Policy assignments. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :param depends_on: Artifacts which need to be deployed before the + specified artifact. + :type depends_on: list[str] + :param policy_definition_id: Required. Azure resource ID of the policy + definition. + :type policy_definition_id: str + :param parameters: Required. Parameter values for the policy definition. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterValueBase] + :param resource_group: Name of the resource group placeholder to which the + policy will be assigned. + :type resource_group: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'policy_definition_id': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'}, + 'policy_definition_id': {'key': 'properties.policyDefinitionId', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterValueBase}'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, policy_definition_id: str, parameters, display_name: str=None, description: str=None, depends_on=None, resource_group: str=None, **kwargs) -> None: + super(PolicyAssignmentArtifact, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.depends_on = depends_on + self.policy_definition_id = policy_definition_id + self.parameters = parameters + self.resource_group = resource_group + self.kind = 'policyAssignment' diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint.py new file mode 100644 index 000000000000..14bc16cba51c --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint.py @@ -0,0 +1,83 @@ +# 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 .azure_resource_base import AzureResourceBase + + +class PublishedBlueprint(AzureResourceBase): + """Represents a published Blueprint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :ivar status: Status of the Blueprint. This field is readonly. + :vartype status: ~azure.mgmt.blueprint.models.BlueprintStatus + :param target_scope: The scope where this Blueprint can be applied. + Possible values include: 'subscription', 'managementGroup' + :type target_scope: str or + ~azure.mgmt.blueprint.models.BlueprintTargetScope + :param parameters: Parameters required by this Blueprint definition. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterDefinition] + :param resource_groups: Resource group placeholders defined by this + Blueprint definition. + :type resource_groups: dict[str, + ~azure.mgmt.blueprint.models.ResourceGroupDefinition] + :param blueprint_name: Name of the Blueprint definition. + :type blueprint_name: str + :param change_notes: Version-specific change notes + :type change_notes: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'status': {'readonly': True}, + 'change_notes': {'max_length': 500}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BlueprintStatus'}, + 'target_scope': {'key': 'properties.targetScope', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterDefinition}'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '{ResourceGroupDefinition}'}, + 'blueprint_name': {'key': 'properties.blueprintName', 'type': 'str'}, + 'change_notes': {'key': 'properties.changeNotes', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PublishedBlueprint, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.status = None + self.target_scope = kwargs.get('target_scope', None) + self.parameters = kwargs.get('parameters', None) + self.resource_groups = kwargs.get('resource_groups', None) + self.blueprint_name = kwargs.get('blueprint_name', None) + self.change_notes = kwargs.get('change_notes', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint_paged.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint_paged.py new file mode 100644 index 000000000000..f50ceca242d9 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class PublishedBlueprintPaged(Paged): + """ + A paging container for iterating over a list of :class:`PublishedBlueprint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PublishedBlueprint]'} + } + + def __init__(self, *args, **kwargs): + + super(PublishedBlueprintPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint_py3.py new file mode 100644 index 000000000000..48064f278eb4 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/published_blueprint_py3.py @@ -0,0 +1,83 @@ +# 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 .azure_resource_base_py3 import AzureResourceBase + + +class PublishedBlueprint(AzureResourceBase): + """Represents a published Blueprint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :ivar status: Status of the Blueprint. This field is readonly. + :vartype status: ~azure.mgmt.blueprint.models.BlueprintStatus + :param target_scope: The scope where this Blueprint can be applied. + Possible values include: 'subscription', 'managementGroup' + :type target_scope: str or + ~azure.mgmt.blueprint.models.BlueprintTargetScope + :param parameters: Parameters required by this Blueprint definition. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterDefinition] + :param resource_groups: Resource group placeholders defined by this + Blueprint definition. + :type resource_groups: dict[str, + ~azure.mgmt.blueprint.models.ResourceGroupDefinition] + :param blueprint_name: Name of the Blueprint definition. + :type blueprint_name: str + :param change_notes: Version-specific change notes + :type change_notes: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'status': {'readonly': True}, + 'change_notes': {'max_length': 500}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BlueprintStatus'}, + 'target_scope': {'key': 'properties.targetScope', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterDefinition}'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '{ResourceGroupDefinition}'}, + 'blueprint_name': {'key': 'properties.blueprintName', 'type': 'str'}, + 'change_notes': {'key': 'properties.changeNotes', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, description: str=None, target_scope=None, parameters=None, resource_groups=None, blueprint_name: str=None, change_notes: str=None, **kwargs) -> None: + super(PublishedBlueprint, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.status = None + self.target_scope = target_scope + self.parameters = parameters + self.resource_groups = resource_groups + self.blueprint_name = blueprint_name + self.change_notes = change_notes diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_definition.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_definition.py new file mode 100644 index 000000000000..e29b432481d0 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_definition.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 ResourceGroupDefinition(Model): + """Represents an Azure resource group in a Blueprint definition. + + :param name: Name of this resourceGroup, leave empty if the resource group + name will be specified during the Blueprint assignment. + :type name: str + :param location: Location of this resourceGroup, leave empty if the + resource group location will be specified during the Blueprint assignment. + :type location: str + :param display_name: DisplayName of this parameter/resourceGroup. + :type display_name: str + :param description: Description of this parameter/resourceGroup. + :type description: str + :param strong_type: StrongType for UI to render rich experience during + assignment time. + :type strong_type: str + :param depends_on: Artifacts which need to be deployed before this + resource group. + :type depends_on: list[str] + """ + + _validation = { + 'name': {'max_length': 90, 'min_length': 1}, + 'location': {'max_length': 90}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'strong_type': {'max_length': 64}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'display_name': {'key': 'metadata.displayName', 'type': 'str'}, + 'description': {'key': 'metadata.description', 'type': 'str'}, + 'strong_type': {'key': 'metadata.strongType', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ResourceGroupDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.strong_type = kwargs.get('strong_type', None) + self.depends_on = kwargs.get('depends_on', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_definition_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_definition_py3.py new file mode 100644 index 000000000000..292795fab354 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_definition_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 ResourceGroupDefinition(Model): + """Represents an Azure resource group in a Blueprint definition. + + :param name: Name of this resourceGroup, leave empty if the resource group + name will be specified during the Blueprint assignment. + :type name: str + :param location: Location of this resourceGroup, leave empty if the + resource group location will be specified during the Blueprint assignment. + :type location: str + :param display_name: DisplayName of this parameter/resourceGroup. + :type display_name: str + :param description: Description of this parameter/resourceGroup. + :type description: str + :param strong_type: StrongType for UI to render rich experience during + assignment time. + :type strong_type: str + :param depends_on: Artifacts which need to be deployed before this + resource group. + :type depends_on: list[str] + """ + + _validation = { + 'name': {'max_length': 90, 'min_length': 1}, + 'location': {'max_length': 90}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'strong_type': {'max_length': 64}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'display_name': {'key': 'metadata.displayName', 'type': 'str'}, + 'description': {'key': 'metadata.description', 'type': 'str'}, + 'strong_type': {'key': 'metadata.strongType', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, location: str=None, display_name: str=None, description: str=None, strong_type: str=None, depends_on=None, **kwargs) -> None: + super(ResourceGroupDefinition, self).__init__(**kwargs) + self.name = name + self.location = location + self.display_name = display_name + self.description = description + self.strong_type = strong_type + self.depends_on = depends_on diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_value.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_value.py new file mode 100644 index 000000000000..eba84b23bf06 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_value.py @@ -0,0 +1,36 @@ +# 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 ResourceGroupValue(Model): + """Represents an Azure resource group. + + :param name: Name of the resource group + :type name: str + :param location: Location of the resource group + :type location: str + """ + + _validation = { + 'name': {'max_length': 90, 'min_length': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceGroupValue, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_value_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_value_py3.py new file mode 100644 index 000000000000..15603813554a --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_group_value_py3.py @@ -0,0 +1,36 @@ +# 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 ResourceGroupValue(Model): + """Represents an Azure resource group. + + :param name: Name of the resource group + :type name: str + :param location: Location of the resource group + :type location: str + """ + + _validation = { + 'name': {'max_length': 90, 'min_length': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, location: str=None, **kwargs) -> None: + super(ResourceGroupValue, self).__init__(**kwargs) + self.name = name + self.location = location diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation.py new file mode 100644 index 000000000000..6ea4a663be93 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation.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 ResourceProviderOperation(Model): + """Supported operation of this resource provider. + + :param name: Operation name, in format of + {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: + ~azure.mgmt.blueprint.models.ResourceProviderOperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + } + + def __init__(self, **kwargs): + super(ResourceProviderOperation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_display.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_display.py new file mode 100644 index 000000000000..2a85a8cad3c1 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_display.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 ResourceProviderOperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Resource provider: Microsoft Blueprint. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of this 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(ResourceProviderOperationDisplay, 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-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_display_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_display_py3.py new file mode 100644 index 000000000000..f1e860a88b60 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_display_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 ResourceProviderOperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Resource provider: Microsoft Blueprint. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of this 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(ResourceProviderOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_list.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_list.py new file mode 100644 index 000000000000..70292a30f32c --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_list.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 msrest.serialization import Model + + +class ResourceProviderOperationList(Model): + """Result of the request to list operations. + + :param value: List of operations supported by this resource provider. + :type value: list[~azure.mgmt.blueprint.models.ResourceProviderOperation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceProviderOperation]'}, + } + + def __init__(self, **kwargs): + super(ResourceProviderOperationList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_list_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_list_py3.py new file mode 100644 index 000000000000..73d3b2d3111a --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_list_py3.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 msrest.serialization import Model + + +class ResourceProviderOperationList(Model): + """Result of the request to list operations. + + :param value: List of operations supported by this resource provider. + :type value: list[~azure.mgmt.blueprint.models.ResourceProviderOperation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceProviderOperation]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ResourceProviderOperationList, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_py3.py new file mode 100644 index 000000000000..a515a907b9e7 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/resource_provider_operation_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 ResourceProviderOperation(Model): + """Supported operation of this resource provider. + + :param name: Operation name, in format of + {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: + ~azure.mgmt.blueprint.models.ResourceProviderOperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(ResourceProviderOperation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/role_assignment_artifact.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/role_assignment_artifact.py new file mode 100644 index 000000000000..26bc6902fbd1 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/role_assignment_artifact.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 .artifact import Artifact + + +class RoleAssignmentArtifact(Artifact): + """Blueprint artifact applies Azure role assignment. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :param depends_on: Artifacts which need to be deployed before the + specified artifact. + :type depends_on: list[str] + :param role_definition_id: Required. Azure resource ID of the + RoleDefinition. + :type role_definition_id: str + :param principal_ids: Required. Array of user or group identities in Azure + Active Directory. The roleDefinition will apply to these identity. + :type principal_ids: object + :param resource_group: RoleAssignment will be scope to this resourceGroup, + if left empty, it would scope to the subscription. + :type resource_group: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'role_definition_id': {'required': True}, + 'principal_ids': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'}, + 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, + 'principal_ids': {'key': 'properties.principalIds', 'type': 'object'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoleAssignmentArtifact, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.depends_on = kwargs.get('depends_on', None) + self.role_definition_id = kwargs.get('role_definition_id', None) + self.principal_ids = kwargs.get('principal_ids', None) + self.resource_group = kwargs.get('resource_group', None) + self.kind = 'roleAssignment' diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/role_assignment_artifact_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/role_assignment_artifact_py3.py new file mode 100644 index 000000000000..7ed27e5293c4 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/role_assignment_artifact_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 .artifact_py3 import Artifact + + +class RoleAssignmentArtifact(Artifact): + """Blueprint artifact applies Azure role assignment. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :param depends_on: Artifacts which need to be deployed before the + specified artifact. + :type depends_on: list[str] + :param role_definition_id: Required. Azure resource ID of the + RoleDefinition. + :type role_definition_id: str + :param principal_ids: Required. Array of user or group identities in Azure + Active Directory. The roleDefinition will apply to these identity. + :type principal_ids: object + :param resource_group: RoleAssignment will be scope to this resourceGroup, + if left empty, it would scope to the subscription. + :type resource_group: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'role_definition_id': {'required': True}, + 'principal_ids': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'}, + 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, + 'principal_ids': {'key': 'properties.principalIds', 'type': 'object'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, role_definition_id: str, principal_ids, display_name: str=None, description: str=None, depends_on=None, resource_group: str=None, **kwargs) -> None: + super(RoleAssignmentArtifact, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.depends_on = depends_on + self.role_definition_id = role_definition_id + self.principal_ids = principal_ids + self.resource_group = resource_group + self.kind = 'roleAssignment' diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_reference_parameter_value.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_reference_parameter_value.py new file mode 100644 index 000000000000..c8c7b36d9a99 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_reference_parameter_value.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 .parameter_value_base import ParameterValueBase + + +class SecretReferenceParameterValue(ParameterValueBase): + """The reference to a secret, if the parameter should be protected. + + All required parameters must be populated in order to send to Azure. + + :param description: Optional property, just to establish + ParameterValueBase as a BaseClass. + :type description: str + :param reference: Required. Specifies the reference. + :type reference: ~azure.mgmt.blueprint.models.SecretValueReference + """ + + _validation = { + 'reference': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'reference': {'key': 'reference', 'type': 'SecretValueReference'}, + } + + def __init__(self, **kwargs): + super(SecretReferenceParameterValue, self).__init__(**kwargs) + self.reference = kwargs.get('reference', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_reference_parameter_value_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_reference_parameter_value_py3.py new file mode 100644 index 000000000000..33136d292d0a --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_reference_parameter_value_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 .parameter_value_base_py3 import ParameterValueBase + + +class SecretReferenceParameterValue(ParameterValueBase): + """The reference to a secret, if the parameter should be protected. + + All required parameters must be populated in order to send to Azure. + + :param description: Optional property, just to establish + ParameterValueBase as a BaseClass. + :type description: str + :param reference: Required. Specifies the reference. + :type reference: ~azure.mgmt.blueprint.models.SecretValueReference + """ + + _validation = { + 'reference': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'reference': {'key': 'reference', 'type': 'SecretValueReference'}, + } + + def __init__(self, *, reference, description: str=None, **kwargs) -> None: + super(SecretReferenceParameterValue, self).__init__(description=description, **kwargs) + self.reference = reference diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_value_reference.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_value_reference.py new file mode 100644 index 000000000000..4c020dd09570 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_value_reference.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 msrest.serialization import Model + + +class SecretValueReference(Model): + """Reference to a KeyVault secret. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. Specifies the reference to a given Azure + KeyVault. + :type key_vault: ~azure.mgmt.blueprint.models.KeyVaultReference + :param secret_name: Required. Name of the secret. + :type secret_name: str + :param secret_version: Version of the secret, (if there are multiple + versions) + :type secret_version: str + """ + + _validation = { + 'key_vault': {'required': True}, + 'secret_name': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'secret_version': {'key': 'secretVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretValueReference, self).__init__(**kwargs) + self.key_vault = kwargs.get('key_vault', None) + self.secret_name = kwargs.get('secret_name', None) + self.secret_version = kwargs.get('secret_version', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_value_reference_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_value_reference_py3.py new file mode 100644 index 000000000000..5e44ef875d4e --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/secret_value_reference_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 msrest.serialization import Model + + +class SecretValueReference(Model): + """Reference to a KeyVault secret. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. Specifies the reference to a given Azure + KeyVault. + :type key_vault: ~azure.mgmt.blueprint.models.KeyVaultReference + :param secret_name: Required. Name of the secret. + :type secret_name: str + :param secret_version: Version of the secret, (if there are multiple + versions) + :type secret_version: str + """ + + _validation = { + 'key_vault': {'required': True}, + 'secret_name': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'secret_version': {'key': 'secretVersion', 'type': 'str'}, + } + + def __init__(self, *, key_vault, secret_name: str, secret_version: str=None, **kwargs) -> None: + super(SecretValueReference, self).__init__(**kwargs) + self.key_vault = key_vault + self.secret_name = secret_name + self.secret_version = secret_version diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/template_artifact.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/template_artifact.py new file mode 100644 index 000000000000..0892a9a0903a --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/template_artifact.py @@ -0,0 +1,80 @@ +# 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 .artifact import Artifact + + +class TemplateArtifact(Artifact): + """Blueprint artifact deploys Azure resource manager template. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :param depends_on: Artifacts which need to be deployed before the + specified artifact. + :type depends_on: list[str] + :param template: Required. The Azure Resource Manager template body. + :type template: object + :param resource_group: If applicable, the name of the resource group + placeholder to which the template will be deployed. + :type resource_group: str + :param parameters: Required. Template parameter values. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterValueBase] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'template': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'}, + 'template': {'key': 'properties.template', 'type': 'object'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterValueBase}'}, + } + + def __init__(self, **kwargs): + super(TemplateArtifact, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.depends_on = kwargs.get('depends_on', None) + self.template = kwargs.get('template', None) + self.resource_group = kwargs.get('resource_group', None) + self.parameters = kwargs.get('parameters', None) + self.kind = 'template' diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/template_artifact_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/template_artifact_py3.py new file mode 100644 index 000000000000..c36f449d006a --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/template_artifact_py3.py @@ -0,0 +1,80 @@ +# 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 .artifact_py3 import Artifact + + +class TemplateArtifact(Artifact): + """Blueprint artifact deploys Azure resource manager template. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param display_name: One-liner string explain this resource. + :type display_name: str + :param description: Multi-line explain this resource. + :type description: str + :param depends_on: Artifacts which need to be deployed before the + specified artifact. + :type depends_on: list[str] + :param template: Required. The Azure Resource Manager template body. + :type template: object + :param resource_group: If applicable, the name of the resource group + placeholder to which the template will be deployed. + :type resource_group: str + :param parameters: Required. Template parameter values. + :type parameters: dict[str, + ~azure.mgmt.blueprint.models.ParameterValueBase] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'required': True}, + 'display_name': {'max_length': 256}, + 'description': {'max_length': 500}, + 'template': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'}, + 'template': {'key': 'properties.template', 'type': 'object'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterValueBase}'}, + } + + def __init__(self, *, template, parameters, display_name: str=None, description: str=None, depends_on=None, resource_group: str=None, **kwargs) -> None: + super(TemplateArtifact, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.depends_on = depends_on + self.template = template + self.resource_group = resource_group + self.parameters = parameters + self.kind = 'template' diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/tracked_resource.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/tracked_resource.py new file mode 100644 index 000000000000..8c7c9256c706 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/tracked_resource.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 .azure_resource_base import AzureResourceBase + + +class TrackedResource(AzureResourceBase): + """Common properties for all Azure tracked resources. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param location: Required. The location of this Blueprint assignment. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/tracked_resource_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/tracked_resource_py3.py new file mode 100644 index 000000000000..b7860f694453 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/tracked_resource_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 .azure_resource_base_py3 import AzureResourceBase + + +class TrackedResource(AzureResourceBase): + """Common properties for all Azure tracked resources. + + 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: String Id used to locate any resource on Azure. + :vartype id: str + :ivar type: Type of this resource. + :vartype type: str + :ivar name: Name of this resource. + :vartype name: str + :param location: Required. The location of this Blueprint assignment. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/__init__.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/__init__.py new file mode 100644 index 000000000000..dd925cac4148 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/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 .blueprints_operations import BlueprintsOperations +from .artifacts_operations import ArtifactsOperations +from .published_blueprints_operations import PublishedBlueprintsOperations +from .published_artifacts_operations import PublishedArtifactsOperations +from .operations import Operations +from .assignments_operations import AssignmentsOperations +from .assignment_operations import AssignmentOperations + +__all__ = [ + 'BlueprintsOperations', + 'ArtifactsOperations', + 'PublishedBlueprintsOperations', + 'PublishedArtifactsOperations', + 'Operations', + 'AssignmentsOperations', + 'AssignmentOperations', +] diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/artifacts_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/artifacts_operations.py new file mode 100644 index 000000000000..6d6524ac9ddf --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/artifacts_operations.py @@ -0,0 +1,305 @@ +# 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 ArtifactsOperations(object): + """ArtifactsOperations 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: Client Api Version. Constant value: "2017-11-11-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-11-preview" + + self.config = config + + def create_or_update( + self, management_group_name, blueprint_name, artifact_name, artifact, custom_headers=None, raw=False, **operation_config): + """Create or update Blueprint artifact. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_name: str + :param artifact_name: name of the artifact. + :type artifact_name: str + :param artifact: Blueprint artifact to save. + :type artifact: ~azure.mgmt.blueprint.models.Artifact + :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: Artifact or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Artifact or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'), + 'artifactName': self._serialize.url("artifact_name", artifact_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(artifact, 'Artifact') + + # 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('Artifact', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}'} + + def get( + self, management_group_name, blueprint_name, artifact_name, custom_headers=None, raw=False, **operation_config): + """Get a Blueprint artifact. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_name: str + :param artifact_name: name of the artifact. + :type artifact_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: Artifact or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Artifact or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'), + 'artifactName': self._serialize.url("artifact_name", artifact_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('Artifact', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}'} + + def delete( + self, management_group_name, blueprint_name, artifact_name, custom_headers=None, raw=False, **operation_config): + """Delete a Blueprint artifact. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_name: str + :param artifact_name: name of the artifact. + :type artifact_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: Artifact or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Artifact or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'), + 'artifactName': self._serialize.url("artifact_name", artifact_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.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 + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Artifact', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}'} + + def list( + self, management_group_name, blueprint_name, custom_headers=None, raw=False, **operation_config): + """List artifacts for a given Blueprint. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_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: An iterator like instance of Artifact + :rtype: + ~azure.mgmt.blueprint.models.ArtifactPaged[~azure.mgmt.blueprint.models.Artifact] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts'} diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py new file mode 100644 index 000000000000..de84ea83c5f2 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py @@ -0,0 +1,173 @@ +# 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 AssignmentOperations(object): + """AssignmentOperations 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: Client Api Version. Constant value: "2018-11-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01-preview" + + self.config = config + + def list( + self, subscription_id, assignment_name, custom_headers=None, raw=False, **operation_config): + """List Operations for given blueprint assignment within a subscription. + + :param subscription_id: azure subscriptionId, which we assign the + blueprint to. + :type subscription_id: str + :param assignment_name: name of the assignment. + :type assignment_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: An iterator like instance of AssignmentOperation + :rtype: + ~azure.mgmt.blueprint.models.AssignmentOperationPaged[~azure.mgmt.blueprint.models.AssignmentOperation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'), + 'assignmentName': self._serialize.url("assignment_name", assignment_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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.AssignmentOperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AssignmentOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations'} + + def get( + self, subscription_id, assignment_name, assignment_operation_name, custom_headers=None, raw=False, **operation_config): + """Get a Blueprint assignment operation. + + :param subscription_id: azure subscriptionId, which we assign the + blueprint to. + :type subscription_id: str + :param assignment_name: name of the assignment. + :type assignment_name: str + :param assignment_operation_name: name of the assignment operation. + :type assignment_operation_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: AssignmentOperation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.AssignmentOperation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'), + 'assignmentName': self._serialize.url("assignment_name", assignment_name, 'str'), + 'assignmentOperationName': self._serialize.url("assignment_operation_name", assignment_operation_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('AssignmentOperation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations/{assignmentOperationName}'} diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignments_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignments_operations.py new file mode 100644 index 000000000000..bd5c72f1e8a9 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignments_operations.py @@ -0,0 +1,297 @@ +# 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 AssignmentsOperations(object): + """AssignmentsOperations 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: Client Api Version. Constant value: "2017-11-11-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-11-preview" + + self.config = config + + def create_or_update( + self, subscription_id, assignment_name, assignment, custom_headers=None, raw=False, **operation_config): + """Create or update a Blueprint assignment. + + :param subscription_id: azure subscriptionId, which we assign the + blueprint to. + :type subscription_id: str + :param assignment_name: name of the assignment. + :type assignment_name: str + :param assignment: assignment object to save. + :type assignment: ~azure.mgmt.blueprint.models.Assignment + :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: Assignment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Assignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'), + 'assignmentName': self._serialize.url("assignment_name", assignment_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(assignment, 'Assignment') + + # 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('Assignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}'} + + def get( + self, subscription_id, assignment_name, custom_headers=None, raw=False, **operation_config): + """Get a Blueprint assignment. + + :param subscription_id: azure subscriptionId, which we assign the + blueprint to. + :type subscription_id: str + :param assignment_name: name of the assignment. + :type assignment_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: Assignment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Assignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'), + 'assignmentName': self._serialize.url("assignment_name", assignment_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('Assignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}'} + + def delete( + self, subscription_id, assignment_name, custom_headers=None, raw=False, **operation_config): + """Delete a Blueprint assignment. + + :param subscription_id: azure subscriptionId, which we assign the + blueprint to. + :type subscription_id: str + :param assignment_name: name of the assignment. + :type assignment_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: Assignment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Assignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'), + 'assignmentName': self._serialize.url("assignment_name", assignment_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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 202: + deserialized = self._deserialize('Assignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}'} + + def list( + self, subscription_id, custom_headers=None, raw=False, **operation_config): + """List Blueprint assignments within a subscription. + + :param subscription_id: azure subscriptionId, which we assign the + blueprint to. + :type subscription_id: 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: An iterator like instance of Assignment + :rtype: + ~azure.mgmt.blueprint.models.AssignmentPaged[~azure.mgmt.blueprint.models.Assignment] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", 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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.AssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments'} diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/blueprints_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/blueprints_operations.py new file mode 100644 index 000000000000..7a74f6f320bb --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/blueprints_operations.py @@ -0,0 +1,293 @@ +# 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 BlueprintsOperations(object): + """BlueprintsOperations 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: Client Api Version. Constant value: "2017-11-11-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-11-preview" + + self.config = config + + def create_or_update( + self, management_group_name, blueprint_name, blueprint, custom_headers=None, raw=False, **operation_config): + """Create or update Blueprint definition. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_name: str + :param blueprint: Blueprint definition. + :type blueprint: ~azure.mgmt.blueprint.models.Blueprint + :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: Blueprint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Blueprint or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_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(blueprint, 'Blueprint') + + # 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('Blueprint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}'} + + def get( + self, management_group_name, blueprint_name, custom_headers=None, raw=False, **operation_config): + """Get a blueprint definition. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_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: Blueprint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Blueprint or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_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('Blueprint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}'} + + def delete( + self, management_group_name, blueprint_name, custom_headers=None, raw=False, **operation_config): + """Delete a blueprint definition. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_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: Blueprint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Blueprint or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_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.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 + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Blueprint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}'} + + def list( + self, management_group_name, custom_headers=None, raw=False, **operation_config): + """Create or update blueprint definition. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_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: An iterator like instance of Blueprint + :rtype: + ~azure.mgmt.blueprint.models.BlueprintPaged[~azure.mgmt.blueprint.models.Blueprint] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.BlueprintPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BlueprintPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints'} diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/operations.py new file mode 100644 index 000000000000..459550383605 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/operations.py @@ -0,0 +1,92 @@ +# 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: Client Api Version. Constant value: "2017-11-11-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-11-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all of the available operations the Blueprint resource provider + supports. + + :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: ResourceProviderOperationList or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.blueprint.models.ResourceProviderOperationList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + + # 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('ResourceProviderOperationList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Blueprint/operations'} diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/published_artifacts_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/published_artifacts_operations.py new file mode 100644 index 000000000000..314e488ee312 --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/published_artifacts_operations.py @@ -0,0 +1,177 @@ +# 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 PublishedArtifactsOperations(object): + """PublishedArtifactsOperations 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: Client Api Version. Constant value: "2017-11-11-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-11-preview" + + self.config = config + + def get( + self, management_group_name, blueprint_name, version_id, artifact_name, custom_headers=None, raw=False, **operation_config): + """Get an artifact for a published Blueprint. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_name: str + :param version_id: version of the published blueprint. + :type version_id: str + :param artifact_name: name of the artifact. + :type artifact_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: Artifact or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.Artifact or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'artifactName': self._serialize.url("artifact_name", artifact_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('Artifact', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}/artifacts/{artifactName}'} + + def list( + self, management_group_name, blueprint_name, version_id, custom_headers=None, raw=False, **operation_config): + """List artifacts for a published Blueprint. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_name: str + :param version_id: version of the published blueprint. + :type version_id: 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: An iterator like instance of Artifact + :rtype: + ~azure.mgmt.blueprint.models.ArtifactPaged[~azure.mgmt.blueprint.models.Artifact] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'), + 'versionId': self._serialize.url("version_id", version_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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}/artifacts'} diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/published_blueprints_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/published_blueprints_operations.py new file mode 100644 index 000000000000..1c3c19918e9c --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/published_blueprints_operations.py @@ -0,0 +1,300 @@ +# 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 PublishedBlueprintsOperations(object): + """PublishedBlueprintsOperations 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: Client Api Version. Constant value: "2017-11-11-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-11-preview" + + self.config = config + + def create( + self, management_group_name, blueprint_name, version_id, custom_headers=None, raw=False, **operation_config): + """Publish a new version of the Blueprint with the latest artifacts. + Published Blueprints are immutable. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_name: str + :param version_id: version of the published blueprint. + :type version_id: 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: PublishedBlueprint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.PublishedBlueprint or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'), + 'versionId': self._serialize.url("version_id", version_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.put(url, query_parameters, header_parameters) + 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('PublishedBlueprint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}'} + + def get( + self, management_group_name, blueprint_name, version_id, custom_headers=None, raw=False, **operation_config): + """Get a published Blueprint. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_name: str + :param version_id: version of the published blueprint. + :type version_id: 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: PublishedBlueprint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.PublishedBlueprint or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'), + 'versionId': self._serialize.url("version_id", version_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('PublishedBlueprint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}'} + + def delete( + self, management_group_name, blueprint_name, version_id, custom_headers=None, raw=False, **operation_config): + """Delete a published Blueprint. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_name: str + :param version_id: version of the published blueprint. + :type version_id: 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: PublishedBlueprint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.blueprint.models.PublishedBlueprint or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'), + 'versionId': self._serialize.url("version_id", version_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.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 + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PublishedBlueprint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}'} + + def list( + self, management_group_name, blueprint_name, custom_headers=None, raw=False, **operation_config): + """List published versions of given Blueprint. + + :param management_group_name: ManagementGroup where blueprint stores. + :type management_group_name: str + :param blueprint_name: name of the blueprint. + :type blueprint_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: An iterator like instance of PublishedBlueprint + :rtype: + ~azure.mgmt.blueprint.models.PublishedBlueprintPaged[~azure.mgmt.blueprint.models.PublishedBlueprint] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'), + 'blueprintName': self._serialize.url("blueprint_name", blueprint_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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.PublishedBlueprintPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PublishedBlueprintPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions'} diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/version.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/version.py new file mode 100644 index 000000000000..53a203f32aaf --- /dev/null +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/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 = "" + From 2a75f8fc8ffffc02de634623a76d42510b8919b2 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Fri, 30 Nov 2018 00:55:18 +0000 Subject: [PATCH 2/6] Packaging update of azure-mgmt-blueprint --- azure-mgmt-blueprint/HISTORY.rst | 9 +++ azure-mgmt-blueprint/MANIFEST.in | 4 + azure-mgmt-blueprint/README.rst | 49 ++++++++++++ azure-mgmt-blueprint/azure/__init__.py | 1 + azure-mgmt-blueprint/azure/mgmt/__init__.py | 1 + azure-mgmt-blueprint/sdk_packaging.toml | 8 ++ azure-mgmt-blueprint/setup.cfg | 2 + azure-mgmt-blueprint/setup.py | 87 +++++++++++++++++++++ 8 files changed, 161 insertions(+) create mode 100644 azure-mgmt-blueprint/HISTORY.rst create mode 100644 azure-mgmt-blueprint/MANIFEST.in create mode 100644 azure-mgmt-blueprint/README.rst create mode 100644 azure-mgmt-blueprint/azure/__init__.py create mode 100644 azure-mgmt-blueprint/azure/mgmt/__init__.py create mode 100644 azure-mgmt-blueprint/sdk_packaging.toml create mode 100644 azure-mgmt-blueprint/setup.cfg create mode 100644 azure-mgmt-blueprint/setup.py diff --git a/azure-mgmt-blueprint/HISTORY.rst b/azure-mgmt-blueprint/HISTORY.rst new file mode 100644 index 000000000000..8924d5d6c445 --- /dev/null +++ b/azure-mgmt-blueprint/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (1970-01-01) +++++++++++++++++++ + +* Initial Release diff --git a/azure-mgmt-blueprint/MANIFEST.in b/azure-mgmt-blueprint/MANIFEST.in new file mode 100644 index 000000000000..6ceb27f7a96e --- /dev/null +++ b/azure-mgmt-blueprint/MANIFEST.in @@ -0,0 +1,4 @@ +include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-blueprint/README.rst b/azure-mgmt-blueprint/README.rst new file mode 100644 index 000000000000..45de4e6b43dd --- /dev/null +++ b/azure-mgmt-blueprint/README.rst @@ -0,0 +1,49 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure MyService Management 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. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `MyService Management +`__ +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. diff --git a/azure-mgmt-blueprint/azure/__init__.py b/azure-mgmt-blueprint/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-mgmt-blueprint/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-blueprint/azure/mgmt/__init__.py b/azure-mgmt-blueprint/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-mgmt-blueprint/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-blueprint/sdk_packaging.toml b/azure-mgmt-blueprint/sdk_packaging.toml new file mode 100644 index 000000000000..571a6c93d8cd --- /dev/null +++ b/azure-mgmt-blueprint/sdk_packaging.toml @@ -0,0 +1,8 @@ +[packaging] +package_name = "azure-mgmt-blueprint" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "MyService Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = true diff --git a/azure-mgmt-blueprint/setup.cfg b/azure-mgmt-blueprint/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/azure-mgmt-blueprint/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/azure-mgmt-blueprint/setup.py b/azure-mgmt-blueprint/setup.py new file mode 100644 index 000000000000..15c987860b9a --- /dev/null +++ b/azure-mgmt-blueprint/setup.py @@ -0,0 +1,87 @@ +#!/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-blueprint" +PACKAGE_PPRINT_NAME = "MyService Management" + +# 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, + 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'], + } +) From 7aa90cd94fa6b7a7512d7c6c2dfdd172902116ba Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 3 Dec 2018 21:47:51 +0000 Subject: [PATCH 3/6] Generated from b4efdc8a9200cf75cda290568d63a436afc6e51d add title and description, fix old apiversion in examples --- .../mgmt/blueprint/models/assignment_job_created_resource.py | 2 +- .../blueprint/models/assignment_job_created_resource_py3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py index d2a6f2525b6b..1e8f7a3713f3 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py @@ -24,7 +24,7 @@ class AssignmentJobCreatedResource(AzureResourceBase): :vartype type: str :ivar name: Name of this resource. :vartype name: str - :param properties: + :param properties: additional properties in a dictionary. :type properties: dict[str, str] """ diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py index f41ba7b99152..e78fe727504e 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py @@ -24,7 +24,7 @@ class AssignmentJobCreatedResource(AzureResourceBase): :vartype type: str :ivar name: Name of this resource. :vartype name: str - :param properties: + :param properties: additional properties in a dictionary. :type properties: dict[str, str] """ From 911d2b247ddc5367a12b8346db8a42b03384e22c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 5 Dec 2018 20:17:01 +0000 Subject: [PATCH 4/6] Generated from 5086de150b203b1f3a1b59817ddc98b2055ab29a update assignmentOperation use scope for more flexbility --- .../operations/assignment_operations.py | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py index de84ea83c5f2..ca701b31d9c1 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py @@ -38,12 +38,14 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, subscription_id, assignment_name, custom_headers=None, raw=False, **operation_config): + self, scope, assignment_name, custom_headers=None, raw=False, **operation_config): """List Operations for given blueprint assignment within a subscription. - :param subscription_id: azure subscriptionId, which we assign the - blueprint to. - :type subscription_id: str + :param scope: The scope of the resource. Valid scopes are: management + group (format: + '/providers/Microsoft.Management/managementGroups/{managementGroup}'), + subscription (format: '/subscriptions/{subscriptionId}'). + :type scope: str :param assignment_name: name of the assignment. :type assignment_name: str :param dict custom_headers: headers that will be added to the request @@ -62,7 +64,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'assignmentName': self._serialize.url("assignment_name", assignment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -105,15 +107,17 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations'} + list.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations'} def get( - self, subscription_id, assignment_name, assignment_operation_name, custom_headers=None, raw=False, **operation_config): + self, scope, assignment_name, assignment_operation_name, custom_headers=None, raw=False, **operation_config): """Get a Blueprint assignment operation. - :param subscription_id: azure subscriptionId, which we assign the - blueprint to. - :type subscription_id: str + :param scope: The scope of the resource. Valid scopes are: management + group (format: + '/providers/Microsoft.Management/managementGroups/{managementGroup}'), + subscription (format: '/subscriptions/{subscriptionId}'). + :type scope: str :param assignment_name: name of the assignment. :type assignment_name: str :param assignment_operation_name: name of the assignment operation. @@ -131,7 +135,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'assignmentName': self._serialize.url("assignment_name", assignment_name, 'str'), 'assignmentOperationName': self._serialize.url("assignment_operation_name", assignment_operation_name, 'str') } @@ -170,4 +174,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations/{assignmentOperationName}'} + get.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations/{assignmentOperationName}'} From 8b173453f07aa93707c55f682a091ce3b1229c54 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 12 Dec 2018 23:48:43 +0000 Subject: [PATCH 5/6] Generated from 1208b90b526f3872c07ae9d9a91646102b94e0a3 rename blueprintAssignments/operations to blueprintAssignments/assignmentOperations --- .../azure/mgmt/blueprint/operations/assignment_operations.py | 4 ++-- .../azure/mgmt/blueprint/operations/blueprints_operations.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py index ca701b31d9c1..92135e4e3fdf 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py @@ -107,7 +107,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations'} + list.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations'} def get( self, scope, assignment_name, assignment_operation_name, custom_headers=None, raw=False, **operation_config): @@ -174,4 +174,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations/{assignmentOperationName}'} + get.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations/{assignmentOperationName}'} diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/blueprints_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/blueprints_operations.py index 7a74f6f320bb..88812bbf7ffd 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/blueprints_operations.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/blueprints_operations.py @@ -228,7 +228,7 @@ def delete( def list( self, management_group_name, custom_headers=None, raw=False, **operation_config): - """Create or update blueprint definition. + """List Blueprint definitions within a Management Group. :param management_group_name: ManagementGroup where blueprint stores. :type management_group_name: str From ddae2e3b0825f898f9ebd1f957024e9b822ca1d3 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 13 Dec 2018 19:41:39 +0000 Subject: [PATCH 6/6] Generated from f109377c4dae2ce265085f02cfcb36956a65e1eb werid casing error --- .../mgmt/blueprint/models/assignment_deployment_job.py | 4 ++-- .../mgmt/blueprint/models/assignment_deployment_job_py3.py | 4 ++-- .../blueprint/models/assignment_deployment_job_result.py | 6 +++--- .../models/assignment_deployment_job_result_py3.py | 6 +++--- .../blueprint/models/assignment_job_created_resource.py | 2 +- .../blueprint/models/assignment_job_created_resource_py3.py | 2 +- .../azure/mgmt/blueprint/models/assignment_operation.py | 2 +- .../azure/mgmt/blueprint/models/assignment_operation_py3.py | 2 +- .../mgmt/blueprint/operations/assignment_operations.py | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job.py index 7fc31cab9354..f183d5ecfdeb 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job.py @@ -23,9 +23,9 @@ class AssignmentDeploymentJob(Model): :type job_id: str :param job_state: State of this job. :type job_state: str - :param result: deployment job result. + :param result: Deployment job result. :type result: ~azure.mgmt.blueprint.models.AssignmentDeploymentJobResult - :param history: result of this deployment job for each retry. + :param history: Result of this deployment job for each retry. :type history: list[~azure.mgmt.blueprint.models.AssignmentDeploymentJobResult] :param request_uri: Reference to deployment job resource id. diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_py3.py index 52cd23b1895c..7068c96f4042 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_py3.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_py3.py @@ -23,9 +23,9 @@ class AssignmentDeploymentJob(Model): :type job_id: str :param job_state: State of this job. :type job_state: str - :param result: deployment job result. + :param result: Deployment job result. :type result: ~azure.mgmt.blueprint.models.AssignmentDeploymentJobResult - :param history: result of this deployment job for each retry. + :param history: Result of this deployment job for each retry. :type history: list[~azure.mgmt.blueprint.models.AssignmentDeploymentJobResult] :param request_uri: Reference to deployment job resource id. diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result.py index efcee015c5bd..856a3085edcd 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result.py @@ -13,11 +13,11 @@ class AssignmentDeploymentJobResult(Model): - """result of each individual deployment in a blueprint assignment. + """Result of each individual deployment in a blueprint assignment. - :param error: contains error details if deployment job failed. + :param error: Contains error details if deployment job failed. :type error: ~azure.mgmt.blueprint.models.AzureResourceManagerError - :param resources: resources created as result of the deployment job. + :param resources: Resources created as result of the deployment job. :type resources: list[~azure.mgmt.blueprint.models.AssignmentJobCreatedResource] """ diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result_py3.py index ab80ba247506..52b07be3a07c 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result_py3.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_deployment_job_result_py3.py @@ -13,11 +13,11 @@ class AssignmentDeploymentJobResult(Model): - """result of each individual deployment in a blueprint assignment. + """Result of each individual deployment in a blueprint assignment. - :param error: contains error details if deployment job failed. + :param error: Contains error details if deployment job failed. :type error: ~azure.mgmt.blueprint.models.AzureResourceManagerError - :param resources: resources created as result of the deployment job. + :param resources: Resources created as result of the deployment job. :type resources: list[~azure.mgmt.blueprint.models.AssignmentJobCreatedResource] """ diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py index 1e8f7a3713f3..b819138c53b6 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource.py @@ -24,7 +24,7 @@ class AssignmentJobCreatedResource(AzureResourceBase): :vartype type: str :ivar name: Name of this resource. :vartype name: str - :param properties: additional properties in a dictionary. + :param properties: Additional properties in a dictionary. :type properties: dict[str, str] """ diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py index e78fe727504e..13271cafde04 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_job_created_resource_py3.py @@ -24,7 +24,7 @@ class AssignmentJobCreatedResource(AzureResourceBase): :vartype type: str :ivar name: Name of this resource. :vartype name: str - :param properties: additional properties in a dictionary. + :param properties: Additional properties in a dictionary. :type properties: dict[str, str] """ diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation.py index 2d7aa7e614d2..af3a3130455b 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation.py @@ -35,7 +35,7 @@ class AssignmentOperation(AzureResourceBase): :type time_started: str :param time_finished: Finish time of the overall underlying deployments. :type time_finished: str - :param deployments: list of jobs in this assignment operation. + :param deployments: List of jobs in this assignment operation. :type deployments: list[~azure.mgmt.blueprint.models.AssignmentDeploymentJob] """ diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_py3.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_py3.py index 78f11740852e..53dd597496a9 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_py3.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/models/assignment_operation_py3.py @@ -35,7 +35,7 @@ class AssignmentOperation(AzureResourceBase): :type time_started: str :param time_finished: Finish time of the overall underlying deployments. :type time_finished: str - :param deployments: list of jobs in this assignment operation. + :param deployments: List of jobs in this assignment operation. :type deployments: list[~azure.mgmt.blueprint.models.AssignmentDeploymentJob] """ diff --git a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py index 92135e4e3fdf..d56b3b1617e3 100644 --- a/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py +++ b/azure-mgmt-blueprint/azure/mgmt/blueprint/operations/assignment_operations.py @@ -120,7 +120,7 @@ def get( :type scope: str :param assignment_name: name of the assignment. :type assignment_name: str - :param assignment_operation_name: name of the assignment operation. + :param assignment_operation_name: Name of the assignment operation. :type assignment_operation_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the