From 880b17a759ea91c292ff8b29988159f24cff5107 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 29 Oct 2019 00:13:34 +0000 Subject: [PATCH] Generated from 202c280ac47ce63c6d4480d4c271da833821378b bump python sdk version to 0.3.0 --- .../azure/mgmt/imagebuilder/__init__.py | 7 +- .../azure/mgmt/imagebuilder/_configuration.py | 50 + ...der_client.py => _image_builder_client.py} | 42 +- .../mgmt/imagebuilder/models/__init__.py | 167 +-- .../models/_image_builder_client_enums.py | 59 + .../azure/mgmt/imagebuilder/models/_models.py | 1075 +++++++++++++++++ .../mgmt/imagebuilder/models/_models_py3.py | 1075 +++++++++++++++++ ...age_template_paged.py => _paged_models.py} | 26 + .../mgmt/imagebuilder/models/api_error.py | 57 - .../imagebuilder/models/api_error_base.py | 36 - .../imagebuilder/models/api_error_base_py3.py | 36 - .../mgmt/imagebuilder/models/api_error_py3.py | 57 - .../models/image_builder_client_enums.py | 18 - .../imagebuilder/models/image_template.py | 99 -- .../models/image_template_customizer.py | 48 - .../models/image_template_customizer_py3.py | 48 - .../models/image_template_distributor.py | 53 - .../models/image_template_distributor_py3.py | 53 - .../models/image_template_file_customizer.py | 50 - .../image_template_file_customizer_py3.py | 50 - .../models/image_template_identity.py | 38 - .../models/image_template_identity_py3.py | 38 - ...identity_user_assigned_identities_value.py | 40 - ...tity_user_assigned_identities_value_py3.py | 40 - .../models/image_template_iso_source.py | 47 - .../models/image_template_iso_source_py3.py | 47 - .../models/image_template_last_run_status.py | 46 - .../image_template_last_run_status_py3.py | 46 - ...mage_template_managed_image_distributor.py | 54 - ..._template_managed_image_distributor_py3.py | 54 - .../image_template_managed_image_source.py | 40 - ...image_template_managed_image_source_py3.py | 40 - .../image_template_platform_image_source.py | 55 - ...mage_template_platform_image_source_py3.py | 55 - .../image_template_power_shell_customizer.py | 54 - ...age_template_power_shell_customizer_py3.py | 54 - .../imagebuilder/models/image_template_py3.py | 99 -- .../image_template_restart_customizer.py | 54 - .../image_template_restart_customizer_py3.py | 54 - ...image_template_shared_image_distributor.py | 54 - ...e_template_shared_image_distributor_py3.py | 54 - ...ge_template_shared_image_version_source.py | 41 - ...emplate_shared_image_version_source_py3.py | 41 - .../models/image_template_shell_customizer.py | 49 - .../image_template_shell_customizer_py3.py | 49 - .../models/image_template_source.py | 42 - .../models/image_template_source_py3.py | 42 - .../image_template_update_parameters.py | 32 - .../image_template_update_parameters_py3.py | 32 - .../models/image_template_vhd_distributor.py | 43 - .../image_template_vhd_distributor_py3.py | 43 - .../mgmt/imagebuilder/models/inner_error.py | 32 - .../imagebuilder/models/inner_error_py3.py | 32 - .../mgmt/imagebuilder/models/operation.py | 41 - .../imagebuilder/models/operation_display.py | 41 - .../models/operation_display_py3.py | 41 - .../imagebuilder/models/operation_paged.py | 27 - .../mgmt/imagebuilder/models/operation_py3.py | 41 - .../imagebuilder/models/provisioning_error.py | 36 - .../models/provisioning_error_py3.py | 36 - .../mgmt/imagebuilder/models/resource.py | 56 - .../mgmt/imagebuilder/models/resource_py3.py | 56 - .../mgmt/imagebuilder/models/run_output.py | 58 - .../imagebuilder/models/run_output_paged.py | 27 - .../imagebuilder/models/run_output_py3.py | 58 - .../mgmt/imagebuilder/models/sub_resource.py | 47 - .../imagebuilder/models/sub_resource_py3.py | 47 - .../mgmt/imagebuilder/operations/__init__.py | 4 +- .../{operations.py => _operations.py} | 16 +- ...ual_machine_image_templates_operations.py} | 46 +- 70 files changed, 2420 insertions(+), 2905 deletions(-) create mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_configuration.py rename sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/{image_builder_client.py => _image_builder_client.py} (60%) create mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_image_builder_client_enums.py create mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_models.py create mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_models_py3.py rename sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/{image_template_paged.py => _paged_models.py} (52%) delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_base.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_base_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_builder_client_enums.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_file_customizer.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_file_customizer_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_user_assigned_identities_value.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_user_assigned_identities_value_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_platform_image_source.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_platform_image_source_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_version_source.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_version_source_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_update_parameters.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_update_parameters_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_display.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_display_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_paged.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/resource.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/resource_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_paged.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_py3.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/sub_resource.py delete mode 100644 sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/sub_resource_py3.py rename sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/{operations.py => _operations.py} (90%) rename sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/{virtual_machine_image_templates_operations.py => _virtual_machine_image_templates_operations.py} (97%) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/__init__.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/__init__.py index 189e6692b1d9..b3ddd5dc4cc6 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/__init__.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .image_builder_client import ImageBuilderClient -from .version import VERSION +from ._configuration import ImageBuilderClientConfiguration +from ._image_builder_client import ImageBuilderClient +__all__ = ['ImageBuilderClient', 'ImageBuilderClientConfiguration'] -__all__ = ['ImageBuilderClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_configuration.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_configuration.py new file mode 100644 index 000000000000..99d2333d31c5 --- /dev/null +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ImageBuilderClientConfiguration(AzureConfiguration): + """Configuration for ImageBuilderClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription Id forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ImageBuilderClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-imagebuilder/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/image_builder_client.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_image_builder_client.py similarity index 60% rename from sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/image_builder_client.py rename to sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_image_builder_client.py index 307838e6392f..608c1b752f11 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/image_builder_client.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_image_builder_client.py @@ -11,45 +11,11 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.virtual_machine_image_templates_operations import VirtualMachineImageTemplatesOperations -from .operations.operations import Operations -from . import models - - -class ImageBuilderClientConfiguration(AzureConfiguration): - """Configuration for ImageBuilderClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription Id forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ImageBuilderClientConfiguration, self).__init__(base_url) - self.add_user_agent('azure-mgmt-imagebuilder/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import ImageBuilderClientConfiguration +from .operations import VirtualMachineImageTemplatesOperations +from .operations import Operations +from . import models class ImageBuilderClient(SDKClient): diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py index b44235892b63..9d60a3c0656e 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py @@ -10,101 +10,112 @@ # -------------------------------------------------------------------------- try: - from .image_template_source_py3 import ImageTemplateSource - from .image_template_customizer_py3 import ImageTemplateCustomizer - from .image_template_distributor_py3 import ImageTemplateDistributor - from .provisioning_error_py3 import ProvisioningError - from .image_template_last_run_status_py3 import ImageTemplateLastRunStatus - from .image_template_identity_user_assigned_identities_value_py3 import ImageTemplateIdentityUserAssignedIdentitiesValue - from .image_template_identity_py3 import ImageTemplateIdentity - from .image_template_py3 import ImageTemplate - from .image_template_iso_source_py3 import ImageTemplateIsoSource - from .image_template_platform_image_source_py3 import ImageTemplatePlatformImageSource - from .image_template_managed_image_source_py3 import ImageTemplateManagedImageSource - from .image_template_shared_image_version_source_py3 import ImageTemplateSharedImageVersionSource - from .image_template_shell_customizer_py3 import ImageTemplateShellCustomizer - from .image_template_restart_customizer_py3 import ImageTemplateRestartCustomizer - from .image_template_power_shell_customizer_py3 import ImageTemplatePowerShellCustomizer - from .image_template_file_customizer_py3 import ImageTemplateFileCustomizer - from .image_template_managed_image_distributor_py3 import ImageTemplateManagedImageDistributor - from .image_template_shared_image_distributor_py3 import ImageTemplateSharedImageDistributor - from .image_template_vhd_distributor_py3 import ImageTemplateVhdDistributor - from .image_template_update_parameters_py3 import ImageTemplateUpdateParameters - from .run_output_py3 import RunOutput - from .resource_py3 import Resource - from .sub_resource_py3 import SubResource - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError, ApiErrorException + from ._models_py3 import ApiError, ApiErrorException + from ._models_py3 import ApiErrorBase + from ._models_py3 import ImageTemplate + from ._models_py3 import ImageTemplateCustomizer + from ._models_py3 import ImageTemplateDistributor + from ._models_py3 import ImageTemplateFileCustomizer + from ._models_py3 import ImageTemplateIdentity + from ._models_py3 import ImageTemplateIdentityUserAssignedIdentitiesValue + from ._models_py3 import ImageTemplateIsoSource + from ._models_py3 import ImageTemplateLastRunStatus + from ._models_py3 import ImageTemplateManagedImageDistributor + from ._models_py3 import ImageTemplateManagedImageSource + from ._models_py3 import ImageTemplatePlatformImageSource + from ._models_py3 import ImageTemplatePowerShellCustomizer + from ._models_py3 import ImageTemplateRestartCustomizer + from ._models_py3 import ImageTemplateSharedImageDistributor + from ._models_py3 import ImageTemplateSharedImageVersionSource + from ._models_py3 import ImageTemplateShellCustomizer + from ._models_py3 import ImageTemplateSource + from ._models_py3 import ImageTemplateUpdateParameters + from ._models_py3 import ImageTemplateVhdDistributor + from ._models_py3 import ImageTemplateVmProfile + from ._models_py3 import InnerError + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import ProvisioningError + from ._models_py3 import Resource + from ._models_py3 import RunOutput + from ._models_py3 import SubResource except (SyntaxError, ImportError): - from .image_template_source import ImageTemplateSource - from .image_template_customizer import ImageTemplateCustomizer - from .image_template_distributor import ImageTemplateDistributor - from .provisioning_error import ProvisioningError - from .image_template_last_run_status import ImageTemplateLastRunStatus - from .image_template_identity_user_assigned_identities_value import ImageTemplateIdentityUserAssignedIdentitiesValue - from .image_template_identity import ImageTemplateIdentity - from .image_template import ImageTemplate - from .image_template_iso_source import ImageTemplateIsoSource - from .image_template_platform_image_source import ImageTemplatePlatformImageSource - from .image_template_managed_image_source import ImageTemplateManagedImageSource - from .image_template_shared_image_version_source import ImageTemplateSharedImageVersionSource - from .image_template_shell_customizer import ImageTemplateShellCustomizer - from .image_template_restart_customizer import ImageTemplateRestartCustomizer - from .image_template_power_shell_customizer import ImageTemplatePowerShellCustomizer - from .image_template_file_customizer import ImageTemplateFileCustomizer - from .image_template_managed_image_distributor import ImageTemplateManagedImageDistributor - from .image_template_shared_image_distributor import ImageTemplateSharedImageDistributor - from .image_template_vhd_distributor import ImageTemplateVhdDistributor - from .image_template_update_parameters import ImageTemplateUpdateParameters - from .run_output import RunOutput - from .resource import Resource - from .sub_resource import SubResource - from .operation_display import OperationDisplay - from .operation import Operation - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError, ApiErrorException -from .image_template_paged import ImageTemplatePaged -from .run_output_paged import RunOutputPaged -from .operation_paged import OperationPaged -from .image_builder_client_enums import ( + from ._models import ApiError, ApiErrorException + from ._models import ApiErrorBase + from ._models import ImageTemplate + from ._models import ImageTemplateCustomizer + from ._models import ImageTemplateDistributor + from ._models import ImageTemplateFileCustomizer + from ._models import ImageTemplateIdentity + from ._models import ImageTemplateIdentityUserAssignedIdentitiesValue + from ._models import ImageTemplateIsoSource + from ._models import ImageTemplateLastRunStatus + from ._models import ImageTemplateManagedImageDistributor + from ._models import ImageTemplateManagedImageSource + from ._models import ImageTemplatePlatformImageSource + from ._models import ImageTemplatePowerShellCustomizer + from ._models import ImageTemplateRestartCustomizer + from ._models import ImageTemplateSharedImageDistributor + from ._models import ImageTemplateSharedImageVersionSource + from ._models import ImageTemplateShellCustomizer + from ._models import ImageTemplateSource + from ._models import ImageTemplateUpdateParameters + from ._models import ImageTemplateVhdDistributor + from ._models import ImageTemplateVmProfile + from ._models import InnerError + from ._models import Operation + from ._models import OperationDisplay + from ._models import ProvisioningError + from ._models import Resource + from ._models import RunOutput + from ._models import SubResource +from ._paged_models import ImageTemplatePaged +from ._paged_models import OperationPaged +from ._paged_models import RunOutputPaged +from ._image_builder_client_enums import ( + ProvisioningState, + ProvisioningErrorCode, + RunState, + RunSubState, ResourceIdentityType, ) __all__ = [ - 'ImageTemplateSource', + 'ApiError', 'ApiErrorException', + 'ApiErrorBase', + 'ImageTemplate', 'ImageTemplateCustomizer', 'ImageTemplateDistributor', - 'ProvisioningError', - 'ImageTemplateLastRunStatus', - 'ImageTemplateIdentityUserAssignedIdentitiesValue', + 'ImageTemplateFileCustomizer', 'ImageTemplateIdentity', - 'ImageTemplate', + 'ImageTemplateIdentityUserAssignedIdentitiesValue', 'ImageTemplateIsoSource', - 'ImageTemplatePlatformImageSource', + 'ImageTemplateLastRunStatus', + 'ImageTemplateManagedImageDistributor', 'ImageTemplateManagedImageSource', - 'ImageTemplateSharedImageVersionSource', - 'ImageTemplateShellCustomizer', - 'ImageTemplateRestartCustomizer', + 'ImageTemplatePlatformImageSource', 'ImageTemplatePowerShellCustomizer', - 'ImageTemplateFileCustomizer', - 'ImageTemplateManagedImageDistributor', + 'ImageTemplateRestartCustomizer', 'ImageTemplateSharedImageDistributor', - 'ImageTemplateVhdDistributor', + 'ImageTemplateSharedImageVersionSource', + 'ImageTemplateShellCustomizer', + 'ImageTemplateSource', 'ImageTemplateUpdateParameters', - 'RunOutput', + 'ImageTemplateVhdDistributor', + 'ImageTemplateVmProfile', + 'InnerError', + 'Operation', + 'OperationDisplay', + 'ProvisioningError', 'Resource', + 'RunOutput', 'SubResource', - 'OperationDisplay', - 'Operation', - 'ApiErrorBase', - 'InnerError', - 'ApiError', 'ApiErrorException', 'ImageTemplatePaged', 'RunOutputPaged', 'OperationPaged', + 'ProvisioningState', + 'ProvisioningErrorCode', + 'RunState', + 'RunSubState', 'ResourceIdentityType', ] diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_image_builder_client_enums.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_image_builder_client_enums.py new file mode 100644 index 000000000000..ef566c6fa713 --- /dev/null +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_image_builder_client_enums.py @@ -0,0 +1,59 @@ +# 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 ProvisioningState(str, Enum): + + creating = "Creating" + updating = "Updating" + succeeded = "Succeeded" + failed = "Failed" + deleting = "Deleting" + + +class ProvisioningErrorCode(str, Enum): + + bad_source_type = "BadSourceType" + bad_pir_source = "BadPIRSource" + bad_iso_source = "BadISOSource" + bad_managed_image_source = "BadManagedImageSource" + bad_shared_image_version_source = "BadSharedImageVersionSource" + bad_customizer_type = "BadCustomizerType" + unsupported_customizer_type = "UnsupportedCustomizerType" + no_customizer_script = "NoCustomizerScript" + bad_distribute_type = "BadDistributeType" + bad_shared_image_distribute = "BadSharedImageDistribute" + server_error = "ServerError" + other = "Other" + + +class RunState(str, Enum): + + running = "Running" + succeeded = "Succeeded" + partially_succeeded = "PartiallySucceeded" + failed = "Failed" + + +class RunSubState(str, Enum): + + queued = "Queued" + building = "Building" + customizing = "Customizing" + distributing = "Distributing" + + +class ResourceIdentityType(str, Enum): + + user_assigned = "UserAssigned" + none = "None" diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_models.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_models.py new file mode 100644 index 000000000000..6e3a2b8ddcce --- /dev/null +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_models.py @@ -0,0 +1,1075 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.imagebuilder.models.ApiErrorBase] + :param inner_error: The Api inner error + :type inner_error: ~azure.mgmt.imagebuilder.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.inner_error = kwargs.get('inner_error', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorException(HttpOperationError): + """Server responsed with exception of type: 'ApiError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Resource(Model): + """The Resource model definition. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ImageTemplate(Resource): + """Image template is an ARM resource managed by Microsoft.VirtualMachineImages + provider. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source: Required. Specifies the properties used to describe the + source image. + :type source: ~azure.mgmt.imagebuilder.models.ImageTemplateSource + :param customize: Specifies the properties used to describe the + customization steps of the image, like Image source etc + :type customize: + list[~azure.mgmt.imagebuilder.models.ImageTemplateCustomizer] + :param distribute: Required. The distribution targets where the image + output needs to go to. + :type distribute: + list[~azure.mgmt.imagebuilder.models.ImageTemplateDistributor] + :ivar provisioning_state: Provisioning state of the resource. Possible + values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.imagebuilder.models.ProvisioningState + :ivar provisioning_error: Provisioning error, if any + :vartype provisioning_error: + ~azure.mgmt.imagebuilder.models.ProvisioningError + :ivar last_run_status: State of 'run' that is currently executing or was + last executed. + :vartype last_run_status: + ~azure.mgmt.imagebuilder.models.ImageTemplateLastRunStatus + :param build_timeout_in_minutes: Maximum duration to wait while building + the image template. Omit or specify 0 to use the default (4 hours). + :type build_timeout_in_minutes: int + :param vm_profile: Describes how virtual machine is set up to build images + :type vm_profile: ~azure.mgmt.imagebuilder.models.ImageTemplateVmProfile + :param identity: The identity of the image template, if configured. + :type identity: ~azure.mgmt.imagebuilder.models.ImageTemplateIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'source': {'required': True}, + 'distribute': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_error': {'readonly': True}, + 'last_run_status': {'readonly': True}, + 'build_timeout_in_minutes': {'maximum': 960, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ImageTemplateSource'}, + 'customize': {'key': 'properties.customize', 'type': '[ImageTemplateCustomizer]'}, + 'distribute': {'key': 'properties.distribute', 'type': '[ImageTemplateDistributor]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'provisioning_error': {'key': 'properties.provisioningError', 'type': 'ProvisioningError'}, + 'last_run_status': {'key': 'properties.lastRunStatus', 'type': 'ImageTemplateLastRunStatus'}, + 'build_timeout_in_minutes': {'key': 'properties.buildTimeoutInMinutes', 'type': 'int'}, + 'vm_profile': {'key': 'properties.vmProfile', 'type': 'ImageTemplateVmProfile'}, + 'identity': {'key': 'identity', 'type': 'ImageTemplateIdentity'}, + } + + def __init__(self, **kwargs): + super(ImageTemplate, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.customize = kwargs.get('customize', None) + self.distribute = kwargs.get('distribute', None) + self.provisioning_state = None + self.provisioning_error = None + self.last_run_status = None + self.build_timeout_in_minutes = kwargs.get('build_timeout_in_minutes', None) + self.vm_profile = kwargs.get('vm_profile', None) + self.identity = kwargs.get('identity', None) + + +class ImageTemplateCustomizer(Model): + """Describes a unit of image customization. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageTemplateShellCustomizer, + ImageTemplateRestartCustomizer, ImageTemplatePowerShellCustomizer, + ImageTemplateFileCustomizer + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Shell': 'ImageTemplateShellCustomizer', 'WindowsRestart': 'ImageTemplateRestartCustomizer', 'PowerShell': 'ImageTemplatePowerShellCustomizer', 'File': 'ImageTemplateFileCustomizer'} + } + + def __init__(self, **kwargs): + super(ImageTemplateCustomizer, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None + + +class ImageTemplateDistributor(Model): + """Generic distribution object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageTemplateManagedImageDistributor, + ImageTemplateSharedImageDistributor, ImageTemplateVhdDistributor + + All required parameters must be populated in order to send to Azure. + + :param run_output_name: Required. The name to be used for the associated + RunOutput. + :type run_output_name: str + :param artifact_tags: Tags that will be applied to the artifact once it + has been created/updated by the distributor. + :type artifact_tags: dict[str, str] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, + 'type': {'required': True}, + } + + _attribute_map = { + 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, + 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ManagedImage': 'ImageTemplateManagedImageDistributor', 'SharedImage': 'ImageTemplateSharedImageDistributor', 'VHD': 'ImageTemplateVhdDistributor'} + } + + def __init__(self, **kwargs): + super(ImageTemplateDistributor, self).__init__(**kwargs) + self.run_output_name = kwargs.get('run_output_name', None) + self.artifact_tags = kwargs.get('artifact_tags', None) + self.type = None + + +class ImageTemplateFileCustomizer(ImageTemplateCustomizer): + """Uploads files to VMs (Linux, Windows). Corresponds to Packer file + provisioner. + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + :param source_uri: The URI of the file to be uploaded for customizing the + VM. It can be a github link, SAS URI for Azure Storage, etc + :type source_uri: str + :param sha256_checksum: SHA256 checksum of the file provided in the + sourceUri field above + :type sha256_checksum: str + :param destination: The absolute path to a file (with nested directory + structures already created) where the file (from sourceUri) will be + uploaded to in the VM + :type destination: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, + 'destination': {'key': 'destination', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateFileCustomizer, self).__init__(**kwargs) + self.source_uri = kwargs.get('source_uri', None) + self.sha256_checksum = kwargs.get('sha256_checksum', None) + self.destination = kwargs.get('destination', None) + self.type = 'File' + + +class ImageTemplateIdentity(Model): + """Identity for the image template. + + :param type: The type of identity used for the image template. The type + 'None' will remove any identities from the image template. Possible values + include: 'UserAssigned', 'None' + :type type: str or ~azure.mgmt.imagebuilder.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the image template. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.imagebuilder.models.ImageTemplateIdentityUserAssignedIdentitiesValue] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ImageTemplateIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class ImageTemplateIdentityUserAssignedIdentitiesValue(Model): + """ImageTemplateIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class ImageTemplateSource(Model): + """Describes a virtual machine image source for building, customizing and + distributing. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageTemplateIsoSource, ImageTemplatePlatformImageSource, + ImageTemplateManagedImageSource, ImageTemplateSharedImageVersionSource + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ISO': 'ImageTemplateIsoSource', 'PlatformImage': 'ImageTemplatePlatformImageSource', 'ManagedImage': 'ImageTemplateManagedImageSource', 'SharedImageVersion': 'ImageTemplateSharedImageVersionSource'} + } + + def __init__(self, **kwargs): + super(ImageTemplateSource, self).__init__(**kwargs) + self.type = None + + +class ImageTemplateIsoSource(ImageTemplateSource): + """Describes an image source that is an installation ISO. Currently only + supports Red Hat Enterprise Linux 7.2-7.5 ISO's. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param source_uri: Required. URI to get the ISO image. This URI has to be + accessible to the resource provider at the time of the image template + creation. + :type source_uri: str + :param sha256_checksum: Required. SHA256 Checksum of the ISO image. + :type sha256_checksum: str + """ + + _validation = { + 'type': {'required': True}, + 'source_uri': {'required': True}, + 'sha256_checksum': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateIsoSource, self).__init__(**kwargs) + self.source_uri = kwargs.get('source_uri', None) + self.sha256_checksum = kwargs.get('sha256_checksum', None) + self.type = 'ISO' + + +class ImageTemplateLastRunStatus(Model): + """Describes the latest status of running an image template. + + :param start_time: Start time of the last run (UTC) + :type start_time: datetime + :param end_time: End time of the last run (UTC) + :type end_time: datetime + :param run_state: State of the last run. Possible values include: + 'Running', 'Succeeded', 'PartiallySucceeded', 'Failed' + :type run_state: str or ~azure.mgmt.imagebuilder.models.RunState + :param run_sub_state: Sub-state of the last run. Possible values include: + 'Queued', 'Building', 'Customizing', 'Distributing' + :type run_sub_state: str or ~azure.mgmt.imagebuilder.models.RunSubState + :param message: Verbose information about the last run state + :type message: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'run_state': {'key': 'runState', 'type': 'RunState'}, + 'run_sub_state': {'key': 'runSubState', 'type': 'RunSubState'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateLastRunStatus, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.run_state = kwargs.get('run_state', None) + self.run_sub_state = kwargs.get('run_sub_state', None) + self.message = kwargs.get('message', None) + + +class ImageTemplateManagedImageDistributor(ImageTemplateDistributor): + """Distribute as a Managed Disk Image. + + All required parameters must be populated in order to send to Azure. + + :param run_output_name: Required. The name to be used for the associated + RunOutput. + :type run_output_name: str + :param artifact_tags: Tags that will be applied to the artifact once it + has been created/updated by the distributor. + :type artifact_tags: dict[str, str] + :param type: Required. Constant filled by server. + :type type: str + :param image_id: Required. Resource Id of the Managed Disk Image + :type image_id: str + :param location: Required. Azure location for the image, should match if + image already exists + :type location: str + """ + + _validation = { + 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, + 'type': {'required': True}, + 'image_id': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, + 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'image_id': {'key': 'imageId', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateManagedImageDistributor, self).__init__(**kwargs) + self.image_id = kwargs.get('image_id', None) + self.location = kwargs.get('location', None) + self.type = 'ManagedImage' + + +class ImageTemplateManagedImageSource(ImageTemplateSource): + """Describes an image source that is a managed image in customer subscription. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param image_id: Required. ARM resource id of the managed image in + customer subscription + :type image_id: str + """ + + _validation = { + 'type': {'required': True}, + 'image_id': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'image_id': {'key': 'imageId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateManagedImageSource, self).__init__(**kwargs) + self.image_id = kwargs.get('image_id', None) + self.type = 'ManagedImage' + + +class ImageTemplatePlatformImageSource(ImageTemplateSource): + """Describes an image source from [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param publisher: Image Publisher in [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + :type publisher: str + :param offer: Image offer from the [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + :type offer: str + :param sku: Image sku from the [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + :type sku: str + :param version: Image version from the [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + :type version: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplatePlatformImageSource, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + self.type = 'PlatformImage' + + +class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer): + """Runs the specified PowerShell on the VM (Windows). Corresponds to Packer + powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be + specified. + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + :param script_uri: URI of the PowerShell script to be run for customizing. + It can be a github link, SAS URI for Azure Storage, etc + :type script_uri: str + :param sha256_checksum: SHA256 checksum of the power shell script provided + in the scriptUri field above + :type sha256_checksum: str + :param inline: Array of PowerShell commands to execute + :type inline: list[str] + :param run_elevated: If specified, the PowerShell script will be run with + elevated privileges + :type run_elevated: bool + :param valid_exit_codes: Valid exit codes for the PowerShell script. + [Default: 0] + :type valid_exit_codes: list[int] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'script_uri': {'key': 'scriptUri', 'type': 'str'}, + 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, + 'inline': {'key': 'inline', 'type': '[str]'}, + 'run_elevated': {'key': 'runElevated', 'type': 'bool'}, + 'valid_exit_codes': {'key': 'validExitCodes', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(ImageTemplatePowerShellCustomizer, self).__init__(**kwargs) + self.script_uri = kwargs.get('script_uri', None) + self.sha256_checksum = kwargs.get('sha256_checksum', None) + self.inline = kwargs.get('inline', None) + self.run_elevated = kwargs.get('run_elevated', None) + self.valid_exit_codes = kwargs.get('valid_exit_codes', None) + self.type = 'PowerShell' + + +class ImageTemplateRestartCustomizer(ImageTemplateCustomizer): + """Reboots a VM and waits for it to come back online (Windows). Corresponds to + Packer windows-restart provisioner. + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + :param restart_command: Command to execute the restart [Default: 'shutdown + /r /f /t 0 /c "packer restart"'] + :type restart_command: str + :param restart_check_command: Command to check if restart succeeded + [Default: ''] + :type restart_check_command: str + :param restart_timeout: Restart timeout specified as a string of magnitude + and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m'] + :type restart_timeout: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'restart_command': {'key': 'restartCommand', 'type': 'str'}, + 'restart_check_command': {'key': 'restartCheckCommand', 'type': 'str'}, + 'restart_timeout': {'key': 'restartTimeout', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateRestartCustomizer, self).__init__(**kwargs) + self.restart_command = kwargs.get('restart_command', None) + self.restart_check_command = kwargs.get('restart_check_command', None) + self.restart_timeout = kwargs.get('restart_timeout', None) + self.type = 'WindowsRestart' + + +class ImageTemplateSharedImageDistributor(ImageTemplateDistributor): + """Distribute via Shared Image Gallery. + + All required parameters must be populated in order to send to Azure. + + :param run_output_name: Required. The name to be used for the associated + RunOutput. + :type run_output_name: str + :param artifact_tags: Tags that will be applied to the artifact once it + has been created/updated by the distributor. + :type artifact_tags: dict[str, str] + :param type: Required. Constant filled by server. + :type type: str + :param gallery_image_id: Required. Resource Id of the Shared Image Gallery + image + :type gallery_image_id: str + :param replication_regions: Required. A list of regions that the image + will be replicated to + :type replication_regions: list[str] + """ + + _validation = { + 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, + 'type': {'required': True}, + 'gallery_image_id': {'required': True}, + 'replication_regions': {'required': True}, + } + + _attribute_map = { + 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, + 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'gallery_image_id': {'key': 'galleryImageId', 'type': 'str'}, + 'replication_regions': {'key': 'replicationRegions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateSharedImageDistributor, self).__init__(**kwargs) + self.gallery_image_id = kwargs.get('gallery_image_id', None) + self.replication_regions = kwargs.get('replication_regions', None) + self.type = 'SharedImage' + + +class ImageTemplateSharedImageVersionSource(ImageTemplateSource): + """Describes an image source that is an image version in a shared image + gallery. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param image_version_id: Required. ARM resource id of the image version in + the shared image gallery + :type image_version_id: str + """ + + _validation = { + 'type': {'required': True}, + 'image_version_id': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'image_version_id': {'key': 'imageVersionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateSharedImageVersionSource, self).__init__(**kwargs) + self.image_version_id = kwargs.get('image_version_id', None) + self.type = 'SharedImageVersion' + + +class ImageTemplateShellCustomizer(ImageTemplateCustomizer): + """Runs a shell script during the customization phase (Linux). Corresponds to + Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be + specified. + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + :param script_uri: URI of the shell script to be run for customizing. It + can be a github link, SAS URI for Azure Storage, etc + :type script_uri: str + :param sha256_checksum: SHA256 checksum of the shell script provided in + the scriptUri field + :type sha256_checksum: str + :param inline: Array of shell commands to execute + :type inline: list[str] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'script_uri': {'key': 'scriptUri', 'type': 'str'}, + 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, + 'inline': {'key': 'inline', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateShellCustomizer, self).__init__(**kwargs) + self.script_uri = kwargs.get('script_uri', None) + self.sha256_checksum = kwargs.get('sha256_checksum', None) + self.inline = kwargs.get('inline', None) + self.type = 'Shell' + + +class ImageTemplateUpdateParameters(Model): + """Parameters for updating an image template. + + :param identity: The identity of the image template, if configured. + :type identity: ~azure.mgmt.imagebuilder.models.ImageTemplateIdentity + :param tags: The user-specified tags associated with the image template. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ImageTemplateIdentity'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateUpdateParameters, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.tags = kwargs.get('tags', None) + + +class ImageTemplateVhdDistributor(ImageTemplateDistributor): + """Distribute via VHD in a storage account. + + All required parameters must be populated in order to send to Azure. + + :param run_output_name: Required. The name to be used for the associated + RunOutput. + :type run_output_name: str + :param artifact_tags: Tags that will be applied to the artifact once it + has been created/updated by the distributor. + :type artifact_tags: dict[str, str] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, + 'type': {'required': True}, + } + + _attribute_map = { + 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, + 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateVhdDistributor, self).__init__(**kwargs) + self.type = 'VHD' + + +class ImageTemplateVmProfile(Model): + """Describes the virtual machine used to build, customize and capture images. + + :param vm_size: Size of the virtual machine used to build, customize and + capture images. Omit or specify empty string to use the default + (Standard_D1_v2). + :type vm_size: str + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageTemplateVmProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class InnerError(Model): + """Inner error details. + + :param exception_type: The exception type. + :type exception_type: str + :param error_detail: The internal error message or exception dump. + :type error_detail: str + """ + + _attribute_map = { + 'exception_type': {'key': 'exceptionType', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exception_type = kwargs.get('exception_type', None) + self.error_detail = kwargs.get('error_detail', None) + + +class Operation(Model): + """A REST API operation. + + :param name: The operation name. This is of the format + {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operation. + :type display: ~azure.mgmt.imagebuilder.models.OperationDisplay + :param origin: The intended executor of the operation. + :type origin: str + :param properties: Properties of the operation. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationDisplay(Model): + """The object that describes the operation. + + :param provider: Friendly name of the resource provider. + :type provider: str + :param operation: The operation type. For example: read, write, delete, or + listKeys/action + :type operation: str + :param resource: The resource type on which the operation is performed. + :type resource: str + :param description: The friendly name of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) + + +class ProvisioningError(Model): + """Describes the error happened when create or update an image template. + + :param provisioning_error_code: Error code of the provisioning failure. + Possible values include: 'BadSourceType', 'BadPIRSource', 'BadISOSource', + 'BadManagedImageSource', 'BadSharedImageVersionSource', + 'BadCustomizerType', 'UnsupportedCustomizerType', 'NoCustomizerScript', + 'BadDistributeType', 'BadSharedImageDistribute', 'ServerError', 'Other' + :type provisioning_error_code: str or + ~azure.mgmt.imagebuilder.models.ProvisioningErrorCode + :param message: Verbose error message about the provisioning failure + :type message: str + """ + + _attribute_map = { + 'provisioning_error_code': {'key': 'provisioningErrorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProvisioningError, self).__init__(**kwargs) + self.provisioning_error_code = kwargs.get('provisioning_error_code', None) + self.message = kwargs.get('message', None) + + +class SubResource(Model): + """The Sub Resource model definition. + + 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: Resource Id + :vartype id: str + :param name: Required. Resource name + :type name: str + :ivar type: Resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'required': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = kwargs.get('name', None) + self.type = None + + +class RunOutput(SubResource): + """Represents an output that was created by running an image 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: Resource Id + :vartype id: str + :param name: Required. Resource name + :type name: str + :ivar type: Resource type + :vartype type: str + :param artifact_id: The resource id of the artifact. + :type artifact_id: str + :param artifact_uri: The location URI of the artifact. + :type artifact_uri: str + :ivar provisioning_state: Provisioning state of the resource. Possible + values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.imagebuilder.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'artifact_id': {'key': 'properties.artifactId', 'type': 'str'}, + 'artifact_uri': {'key': 'properties.artifactUri', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + } + + def __init__(self, **kwargs): + super(RunOutput, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_uri = kwargs.get('artifact_uri', None) + self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_models_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_models_py3.py new file mode 100644 index 000000000000..5751a4708a80 --- /dev/null +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_models_py3.py @@ -0,0 +1,1075 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.imagebuilder.models.ApiErrorBase] + :param inner_error: The Api inner error + :type inner_error: ~azure.mgmt.imagebuilder.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, inner_error=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.inner_error = inner_error + self.code = code + self.target = target + self.message = message + + +class ApiErrorException(HttpOperationError): + """Server responsed with exception of type: 'ApiError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Resource(Model): + """The Resource model definition. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ImageTemplate(Resource): + """Image template is an ARM resource managed by Microsoft.VirtualMachineImages + provider. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source: Required. Specifies the properties used to describe the + source image. + :type source: ~azure.mgmt.imagebuilder.models.ImageTemplateSource + :param customize: Specifies the properties used to describe the + customization steps of the image, like Image source etc + :type customize: + list[~azure.mgmt.imagebuilder.models.ImageTemplateCustomizer] + :param distribute: Required. The distribution targets where the image + output needs to go to. + :type distribute: + list[~azure.mgmt.imagebuilder.models.ImageTemplateDistributor] + :ivar provisioning_state: Provisioning state of the resource. Possible + values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.imagebuilder.models.ProvisioningState + :ivar provisioning_error: Provisioning error, if any + :vartype provisioning_error: + ~azure.mgmt.imagebuilder.models.ProvisioningError + :ivar last_run_status: State of 'run' that is currently executing or was + last executed. + :vartype last_run_status: + ~azure.mgmt.imagebuilder.models.ImageTemplateLastRunStatus + :param build_timeout_in_minutes: Maximum duration to wait while building + the image template. Omit or specify 0 to use the default (4 hours). + :type build_timeout_in_minutes: int + :param vm_profile: Describes how virtual machine is set up to build images + :type vm_profile: ~azure.mgmt.imagebuilder.models.ImageTemplateVmProfile + :param identity: The identity of the image template, if configured. + :type identity: ~azure.mgmt.imagebuilder.models.ImageTemplateIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'source': {'required': True}, + 'distribute': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_error': {'readonly': True}, + 'last_run_status': {'readonly': True}, + 'build_timeout_in_minutes': {'maximum': 960, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ImageTemplateSource'}, + 'customize': {'key': 'properties.customize', 'type': '[ImageTemplateCustomizer]'}, + 'distribute': {'key': 'properties.distribute', 'type': '[ImageTemplateDistributor]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'provisioning_error': {'key': 'properties.provisioningError', 'type': 'ProvisioningError'}, + 'last_run_status': {'key': 'properties.lastRunStatus', 'type': 'ImageTemplateLastRunStatus'}, + 'build_timeout_in_minutes': {'key': 'properties.buildTimeoutInMinutes', 'type': 'int'}, + 'vm_profile': {'key': 'properties.vmProfile', 'type': 'ImageTemplateVmProfile'}, + 'identity': {'key': 'identity', 'type': 'ImageTemplateIdentity'}, + } + + def __init__(self, *, location: str, source, distribute, tags=None, customize=None, build_timeout_in_minutes: int=None, vm_profile=None, identity=None, **kwargs) -> None: + super(ImageTemplate, self).__init__(location=location, tags=tags, **kwargs) + self.source = source + self.customize = customize + self.distribute = distribute + self.provisioning_state = None + self.provisioning_error = None + self.last_run_status = None + self.build_timeout_in_minutes = build_timeout_in_minutes + self.vm_profile = vm_profile + self.identity = identity + + +class ImageTemplateCustomizer(Model): + """Describes a unit of image customization. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageTemplateShellCustomizer, + ImageTemplateRestartCustomizer, ImageTemplatePowerShellCustomizer, + ImageTemplateFileCustomizer + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Shell': 'ImageTemplateShellCustomizer', 'WindowsRestart': 'ImageTemplateRestartCustomizer', 'PowerShell': 'ImageTemplatePowerShellCustomizer', 'File': 'ImageTemplateFileCustomizer'} + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(ImageTemplateCustomizer, self).__init__(**kwargs) + self.name = name + self.type = None + + +class ImageTemplateDistributor(Model): + """Generic distribution object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageTemplateManagedImageDistributor, + ImageTemplateSharedImageDistributor, ImageTemplateVhdDistributor + + All required parameters must be populated in order to send to Azure. + + :param run_output_name: Required. The name to be used for the associated + RunOutput. + :type run_output_name: str + :param artifact_tags: Tags that will be applied to the artifact once it + has been created/updated by the distributor. + :type artifact_tags: dict[str, str] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, + 'type': {'required': True}, + } + + _attribute_map = { + 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, + 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ManagedImage': 'ImageTemplateManagedImageDistributor', 'SharedImage': 'ImageTemplateSharedImageDistributor', 'VHD': 'ImageTemplateVhdDistributor'} + } + + def __init__(self, *, run_output_name: str, artifact_tags=None, **kwargs) -> None: + super(ImageTemplateDistributor, self).__init__(**kwargs) + self.run_output_name = run_output_name + self.artifact_tags = artifact_tags + self.type = None + + +class ImageTemplateFileCustomizer(ImageTemplateCustomizer): + """Uploads files to VMs (Linux, Windows). Corresponds to Packer file + provisioner. + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + :param source_uri: The URI of the file to be uploaded for customizing the + VM. It can be a github link, SAS URI for Azure Storage, etc + :type source_uri: str + :param sha256_checksum: SHA256 checksum of the file provided in the + sourceUri field above + :type sha256_checksum: str + :param destination: The absolute path to a file (with nested directory + structures already created) where the file (from sourceUri) will be + uploaded to in the VM + :type destination: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, + 'destination': {'key': 'destination', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, source_uri: str=None, sha256_checksum: str=None, destination: str=None, **kwargs) -> None: + super(ImageTemplateFileCustomizer, self).__init__(name=name, **kwargs) + self.source_uri = source_uri + self.sha256_checksum = sha256_checksum + self.destination = destination + self.type = 'File' + + +class ImageTemplateIdentity(Model): + """Identity for the image template. + + :param type: The type of identity used for the image template. The type + 'None' will remove any identities from the image template. Possible values + include: 'UserAssigned', 'None' + :type type: str or ~azure.mgmt.imagebuilder.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the image template. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.imagebuilder.models.ImageTemplateIdentityUserAssignedIdentitiesValue] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ImageTemplateIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ImageTemplateIdentity, self).__init__(**kwargs) + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class ImageTemplateIdentityUserAssignedIdentitiesValue(Model): + """ImageTemplateIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageTemplateIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class ImageTemplateSource(Model): + """Describes a virtual machine image source for building, customizing and + distributing. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageTemplateIsoSource, ImageTemplatePlatformImageSource, + ImageTemplateManagedImageSource, ImageTemplateSharedImageVersionSource + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ISO': 'ImageTemplateIsoSource', 'PlatformImage': 'ImageTemplatePlatformImageSource', 'ManagedImage': 'ImageTemplateManagedImageSource', 'SharedImageVersion': 'ImageTemplateSharedImageVersionSource'} + } + + def __init__(self, **kwargs) -> None: + super(ImageTemplateSource, self).__init__(**kwargs) + self.type = None + + +class ImageTemplateIsoSource(ImageTemplateSource): + """Describes an image source that is an installation ISO. Currently only + supports Red Hat Enterprise Linux 7.2-7.5 ISO's. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param source_uri: Required. URI to get the ISO image. This URI has to be + accessible to the resource provider at the time of the image template + creation. + :type source_uri: str + :param sha256_checksum: Required. SHA256 Checksum of the ISO image. + :type sha256_checksum: str + """ + + _validation = { + 'type': {'required': True}, + 'source_uri': {'required': True}, + 'sha256_checksum': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, + } + + def __init__(self, *, source_uri: str, sha256_checksum: str, **kwargs) -> None: + super(ImageTemplateIsoSource, self).__init__(**kwargs) + self.source_uri = source_uri + self.sha256_checksum = sha256_checksum + self.type = 'ISO' + + +class ImageTemplateLastRunStatus(Model): + """Describes the latest status of running an image template. + + :param start_time: Start time of the last run (UTC) + :type start_time: datetime + :param end_time: End time of the last run (UTC) + :type end_time: datetime + :param run_state: State of the last run. Possible values include: + 'Running', 'Succeeded', 'PartiallySucceeded', 'Failed' + :type run_state: str or ~azure.mgmt.imagebuilder.models.RunState + :param run_sub_state: Sub-state of the last run. Possible values include: + 'Queued', 'Building', 'Customizing', 'Distributing' + :type run_sub_state: str or ~azure.mgmt.imagebuilder.models.RunSubState + :param message: Verbose information about the last run state + :type message: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'run_state': {'key': 'runState', 'type': 'RunState'}, + 'run_sub_state': {'key': 'runSubState', 'type': 'RunSubState'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, start_time=None, end_time=None, run_state=None, run_sub_state=None, message: str=None, **kwargs) -> None: + super(ImageTemplateLastRunStatus, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.run_state = run_state + self.run_sub_state = run_sub_state + self.message = message + + +class ImageTemplateManagedImageDistributor(ImageTemplateDistributor): + """Distribute as a Managed Disk Image. + + All required parameters must be populated in order to send to Azure. + + :param run_output_name: Required. The name to be used for the associated + RunOutput. + :type run_output_name: str + :param artifact_tags: Tags that will be applied to the artifact once it + has been created/updated by the distributor. + :type artifact_tags: dict[str, str] + :param type: Required. Constant filled by server. + :type type: str + :param image_id: Required. Resource Id of the Managed Disk Image + :type image_id: str + :param location: Required. Azure location for the image, should match if + image already exists + :type location: str + """ + + _validation = { + 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, + 'type': {'required': True}, + 'image_id': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, + 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'image_id': {'key': 'imageId', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, run_output_name: str, image_id: str, location: str, artifact_tags=None, **kwargs) -> None: + super(ImageTemplateManagedImageDistributor, self).__init__(run_output_name=run_output_name, artifact_tags=artifact_tags, **kwargs) + self.image_id = image_id + self.location = location + self.type = 'ManagedImage' + + +class ImageTemplateManagedImageSource(ImageTemplateSource): + """Describes an image source that is a managed image in customer subscription. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param image_id: Required. ARM resource id of the managed image in + customer subscription + :type image_id: str + """ + + _validation = { + 'type': {'required': True}, + 'image_id': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'image_id': {'key': 'imageId', 'type': 'str'}, + } + + def __init__(self, *, image_id: str, **kwargs) -> None: + super(ImageTemplateManagedImageSource, self).__init__(**kwargs) + self.image_id = image_id + self.type = 'ManagedImage' + + +class ImageTemplatePlatformImageSource(ImageTemplateSource): + """Describes an image source from [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param publisher: Image Publisher in [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + :type publisher: str + :param offer: Image offer from the [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + :type offer: str + :param sku: Image sku from the [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + :type sku: str + :param version: Image version from the [Azure Gallery + Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). + :type version: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageTemplatePlatformImageSource, self).__init__(**kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + self.type = 'PlatformImage' + + +class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer): + """Runs the specified PowerShell on the VM (Windows). Corresponds to Packer + powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be + specified. + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + :param script_uri: URI of the PowerShell script to be run for customizing. + It can be a github link, SAS URI for Azure Storage, etc + :type script_uri: str + :param sha256_checksum: SHA256 checksum of the power shell script provided + in the scriptUri field above + :type sha256_checksum: str + :param inline: Array of PowerShell commands to execute + :type inline: list[str] + :param run_elevated: If specified, the PowerShell script will be run with + elevated privileges + :type run_elevated: bool + :param valid_exit_codes: Valid exit codes for the PowerShell script. + [Default: 0] + :type valid_exit_codes: list[int] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'script_uri': {'key': 'scriptUri', 'type': 'str'}, + 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, + 'inline': {'key': 'inline', 'type': '[str]'}, + 'run_elevated': {'key': 'runElevated', 'type': 'bool'}, + 'valid_exit_codes': {'key': 'validExitCodes', 'type': '[int]'}, + } + + def __init__(self, *, name: str=None, script_uri: str=None, sha256_checksum: str=None, inline=None, run_elevated: bool=None, valid_exit_codes=None, **kwargs) -> None: + super(ImageTemplatePowerShellCustomizer, self).__init__(name=name, **kwargs) + self.script_uri = script_uri + self.sha256_checksum = sha256_checksum + self.inline = inline + self.run_elevated = run_elevated + self.valid_exit_codes = valid_exit_codes + self.type = 'PowerShell' + + +class ImageTemplateRestartCustomizer(ImageTemplateCustomizer): + """Reboots a VM and waits for it to come back online (Windows). Corresponds to + Packer windows-restart provisioner. + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + :param restart_command: Command to execute the restart [Default: 'shutdown + /r /f /t 0 /c "packer restart"'] + :type restart_command: str + :param restart_check_command: Command to check if restart succeeded + [Default: ''] + :type restart_check_command: str + :param restart_timeout: Restart timeout specified as a string of magnitude + and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m'] + :type restart_timeout: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'restart_command': {'key': 'restartCommand', 'type': 'str'}, + 'restart_check_command': {'key': 'restartCheckCommand', 'type': 'str'}, + 'restart_timeout': {'key': 'restartTimeout', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, restart_command: str=None, restart_check_command: str=None, restart_timeout: str=None, **kwargs) -> None: + super(ImageTemplateRestartCustomizer, self).__init__(name=name, **kwargs) + self.restart_command = restart_command + self.restart_check_command = restart_check_command + self.restart_timeout = restart_timeout + self.type = 'WindowsRestart' + + +class ImageTemplateSharedImageDistributor(ImageTemplateDistributor): + """Distribute via Shared Image Gallery. + + All required parameters must be populated in order to send to Azure. + + :param run_output_name: Required. The name to be used for the associated + RunOutput. + :type run_output_name: str + :param artifact_tags: Tags that will be applied to the artifact once it + has been created/updated by the distributor. + :type artifact_tags: dict[str, str] + :param type: Required. Constant filled by server. + :type type: str + :param gallery_image_id: Required. Resource Id of the Shared Image Gallery + image + :type gallery_image_id: str + :param replication_regions: Required. A list of regions that the image + will be replicated to + :type replication_regions: list[str] + """ + + _validation = { + 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, + 'type': {'required': True}, + 'gallery_image_id': {'required': True}, + 'replication_regions': {'required': True}, + } + + _attribute_map = { + 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, + 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'gallery_image_id': {'key': 'galleryImageId', 'type': 'str'}, + 'replication_regions': {'key': 'replicationRegions', 'type': '[str]'}, + } + + def __init__(self, *, run_output_name: str, gallery_image_id: str, replication_regions, artifact_tags=None, **kwargs) -> None: + super(ImageTemplateSharedImageDistributor, self).__init__(run_output_name=run_output_name, artifact_tags=artifact_tags, **kwargs) + self.gallery_image_id = gallery_image_id + self.replication_regions = replication_regions + self.type = 'SharedImage' + + +class ImageTemplateSharedImageVersionSource(ImageTemplateSource): + """Describes an image source that is an image version in a shared image + gallery. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param image_version_id: Required. ARM resource id of the image version in + the shared image gallery + :type image_version_id: str + """ + + _validation = { + 'type': {'required': True}, + 'image_version_id': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'image_version_id': {'key': 'imageVersionId', 'type': 'str'}, + } + + def __init__(self, *, image_version_id: str, **kwargs) -> None: + super(ImageTemplateSharedImageVersionSource, self).__init__(**kwargs) + self.image_version_id = image_version_id + self.type = 'SharedImageVersion' + + +class ImageTemplateShellCustomizer(ImageTemplateCustomizer): + """Runs a shell script during the customization phase (Linux). Corresponds to + Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be + specified. + + All required parameters must be populated in order to send to Azure. + + :param name: Friendly Name to provide context on what this customization + step does + :type name: str + :param type: Required. Constant filled by server. + :type type: str + :param script_uri: URI of the shell script to be run for customizing. It + can be a github link, SAS URI for Azure Storage, etc + :type script_uri: str + :param sha256_checksum: SHA256 checksum of the shell script provided in + the scriptUri field + :type sha256_checksum: str + :param inline: Array of shell commands to execute + :type inline: list[str] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'script_uri': {'key': 'scriptUri', 'type': 'str'}, + 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, + 'inline': {'key': 'inline', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, script_uri: str=None, sha256_checksum: str=None, inline=None, **kwargs) -> None: + super(ImageTemplateShellCustomizer, self).__init__(name=name, **kwargs) + self.script_uri = script_uri + self.sha256_checksum = sha256_checksum + self.inline = inline + self.type = 'Shell' + + +class ImageTemplateUpdateParameters(Model): + """Parameters for updating an image template. + + :param identity: The identity of the image template, if configured. + :type identity: ~azure.mgmt.imagebuilder.models.ImageTemplateIdentity + :param tags: The user-specified tags associated with the image template. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ImageTemplateIdentity'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, identity=None, tags=None, **kwargs) -> None: + super(ImageTemplateUpdateParameters, self).__init__(**kwargs) + self.identity = identity + self.tags = tags + + +class ImageTemplateVhdDistributor(ImageTemplateDistributor): + """Distribute via VHD in a storage account. + + All required parameters must be populated in order to send to Azure. + + :param run_output_name: Required. The name to be used for the associated + RunOutput. + :type run_output_name: str + :param artifact_tags: Tags that will be applied to the artifact once it + has been created/updated by the distributor. + :type artifact_tags: dict[str, str] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, + 'type': {'required': True}, + } + + _attribute_map = { + 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, + 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, run_output_name: str, artifact_tags=None, **kwargs) -> None: + super(ImageTemplateVhdDistributor, self).__init__(run_output_name=run_output_name, artifact_tags=artifact_tags, **kwargs) + self.type = 'VHD' + + +class ImageTemplateVmProfile(Model): + """Describes the virtual machine used to build, customize and capture images. + + :param vm_size: Size of the virtual machine used to build, customize and + capture images. Omit or specify empty string to use the default + (Standard_D1_v2). + :type vm_size: str + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size: str=None, **kwargs) -> None: + super(ImageTemplateVmProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class InnerError(Model): + """Inner error details. + + :param exception_type: The exception type. + :type exception_type: str + :param error_detail: The internal error message or exception dump. + :type error_detail: str + """ + + _attribute_map = { + 'exception_type': {'key': 'exceptionType', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'str'}, + } + + def __init__(self, *, exception_type: str=None, error_detail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exception_type = exception_type + self.error_detail = error_detail + + +class Operation(Model): + """A REST API operation. + + :param name: The operation name. This is of the format + {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operation. + :type display: ~azure.mgmt.imagebuilder.models.OperationDisplay + :param origin: The intended executor of the operation. + :type origin: str + :param properties: Properties of the operation. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class OperationDisplay(Model): + """The object that describes the operation. + + :param provider: Friendly name of the resource provider. + :type provider: str + :param operation: The operation type. For example: read, write, delete, or + listKeys/action + :type operation: str + :param resource: The resource type on which the operation is performed. + :type resource: str + :param description: The friendly name of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.operation = operation + self.resource = resource + self.description = description + + +class ProvisioningError(Model): + """Describes the error happened when create or update an image template. + + :param provisioning_error_code: Error code of the provisioning failure. + Possible values include: 'BadSourceType', 'BadPIRSource', 'BadISOSource', + 'BadManagedImageSource', 'BadSharedImageVersionSource', + 'BadCustomizerType', 'UnsupportedCustomizerType', 'NoCustomizerScript', + 'BadDistributeType', 'BadSharedImageDistribute', 'ServerError', 'Other' + :type provisioning_error_code: str or + ~azure.mgmt.imagebuilder.models.ProvisioningErrorCode + :param message: Verbose error message about the provisioning failure + :type message: str + """ + + _attribute_map = { + 'provisioning_error_code': {'key': 'provisioningErrorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, provisioning_error_code=None, message: str=None, **kwargs) -> None: + super(ProvisioningError, self).__init__(**kwargs) + self.provisioning_error_code = provisioning_error_code + self.message = message + + +class SubResource(Model): + """The Sub Resource model definition. + + 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: Resource Id + :vartype id: str + :param name: Required. Resource name + :type name: str + :ivar type: Resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'required': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = name + self.type = None + + +class RunOutput(SubResource): + """Represents an output that was created by running an image 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: Resource Id + :vartype id: str + :param name: Required. Resource name + :type name: str + :ivar type: Resource type + :vartype type: str + :param artifact_id: The resource id of the artifact. + :type artifact_id: str + :param artifact_uri: The location URI of the artifact. + :type artifact_uri: str + :ivar provisioning_state: Provisioning state of the resource. Possible + values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.imagebuilder.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'artifact_id': {'key': 'properties.artifactId', 'type': 'str'}, + 'artifact_uri': {'key': 'properties.artifactUri', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + } + + def __init__(self, *, name: str, artifact_id: str=None, artifact_uri: str=None, **kwargs) -> None: + super(RunOutput, self).__init__(name=name, **kwargs) + self.artifact_id = artifact_id + self.artifact_uri = artifact_uri + self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_paged.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_paged_models.py similarity index 52% rename from sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_paged.py rename to sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_paged_models.py index 2d31d6dd90d5..b5df98f1db25 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_paged.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_paged_models.py @@ -25,3 +25,29 @@ class ImageTemplatePaged(Paged): def __init__(self, *args, **kwargs): super(ImageTemplatePaged, self).__init__(*args, **kwargs) +class RunOutputPaged(Paged): + """ + A paging container for iterating over a list of :class:`RunOutput ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RunOutput]'} + } + + def __init__(self, *args, **kwargs): + + super(RunOutputPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error.py deleted file mode 100644 index e6754a67e1e5..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 -from msrest.exceptions import HttpOperationError - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.imagebuilder.models.ApiErrorBase] - :param inner_error: The Api inner error - :type inner_error: ~azure.mgmt.imagebuilder.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'inner_error': {'key': 'innerError', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.inner_error = kwargs.get('inner_error', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) - - -class ApiErrorException(HttpOperationError): - """Server responsed with exception of type: 'ApiError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_base.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_py3.py deleted file mode 100644 index 1c24d98b1982..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 -from msrest.exceptions import HttpOperationError - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.imagebuilder.models.ApiErrorBase] - :param inner_error: The Api inner error - :type inner_error: ~azure.mgmt.imagebuilder.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'inner_error': {'key': 'innerError', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, inner_error=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.inner_error = inner_error - self.code = code - self.target = target - self.message = message - - -class ApiErrorException(HttpOperationError): - """Server responsed with exception of type: 'ApiError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_builder_client_enums.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_builder_client_enums.py deleted file mode 100644 index aef91b6b5a8d..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_builder_client_enums.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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 ResourceIdentityType(str, Enum): - - user_assigned = "UserAssigned" - none = "None" diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template.py deleted file mode 100644 index 79efc1d08b75..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ImageTemplate(Resource): - """ImageTemplate. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source: Required. Specifies the properties used to describe the - source image. - :type source: ~azure.mgmt.imagebuilder.models.ImageTemplateSource - :param customize: Specifies the properties used to describe the - customization steps of the image, like Image source etc - :type customize: - list[~azure.mgmt.imagebuilder.models.ImageTemplateCustomizer] - :param distribute: Required. The distribution targets where the image - output needs to go to. - :type distribute: - list[~azure.mgmt.imagebuilder.models.ImageTemplateDistributor] - :ivar provisioning_state: Provisioning state of the resource. Possible - values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' - :vartype provisioning_state: str or ~azure.mgmt.imagebuilder.models.enum - :ivar provisioning_error: Provisioning error, if any - :vartype provisioning_error: - ~azure.mgmt.imagebuilder.models.ProvisioningError - :ivar last_run_status: State of 'run' that is currently executing or was - last executed. - :vartype last_run_status: - ~azure.mgmt.imagebuilder.models.ImageTemplateLastRunStatus - :param build_timeout_in_minutes: Maximum duration to wait while building - the image template. Omit or specify 0 to use the default (60 minutes). - :type build_timeout_in_minutes: int - :param identity: The identity of the image template, if configured. - :type identity: ~azure.mgmt.imagebuilder.models.ImageTemplateIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'source': {'required': True}, - 'distribute': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_error': {'readonly': True}, - 'last_run_status': {'readonly': True}, - 'build_timeout_in_minutes': {'maximum': 960, 'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source': {'key': 'properties.source', 'type': 'ImageTemplateSource'}, - 'customize': {'key': 'properties.customize', 'type': '[ImageTemplateCustomizer]'}, - 'distribute': {'key': 'properties.distribute', 'type': '[ImageTemplateDistributor]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provisioning_error': {'key': 'properties.provisioningError', 'type': 'ProvisioningError'}, - 'last_run_status': {'key': 'properties.lastRunStatus', 'type': 'ImageTemplateLastRunStatus'}, - 'build_timeout_in_minutes': {'key': 'properties.buildTimeoutInMinutes', 'type': 'int'}, - 'identity': {'key': 'identity', 'type': 'ImageTemplateIdentity'}, - } - - def __init__(self, **kwargs): - super(ImageTemplate, self).__init__(**kwargs) - self.source = kwargs.get('source', None) - self.customize = kwargs.get('customize', None) - self.distribute = kwargs.get('distribute', None) - self.provisioning_state = None - self.provisioning_error = None - self.last_run_status = None - self.build_timeout_in_minutes = kwargs.get('build_timeout_in_minutes', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer.py deleted file mode 100644 index 42e7896e8f61..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 ImageTemplateCustomizer(Model): - """ImageTemplateCustomizer. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateShellCustomizer, - ImageTemplateRestartCustomizer, ImageTemplatePowerShellCustomizer, - ImageTemplateFileCustomizer - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Shell': 'ImageTemplateShellCustomizer', 'WindowsRestart': 'ImageTemplateRestartCustomizer', 'PowerShell': 'ImageTemplatePowerShellCustomizer', 'File': 'ImageTemplateFileCustomizer'} - } - - def __init__(self, **kwargs): - super(ImageTemplateCustomizer, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer_py3.py deleted file mode 100644 index ee075d9afea9..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 ImageTemplateCustomizer(Model): - """ImageTemplateCustomizer. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateShellCustomizer, - ImageTemplateRestartCustomizer, ImageTemplatePowerShellCustomizer, - ImageTemplateFileCustomizer - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Shell': 'ImageTemplateShellCustomizer', 'WindowsRestart': 'ImageTemplateRestartCustomizer', 'PowerShell': 'ImageTemplatePowerShellCustomizer', 'File': 'ImageTemplateFileCustomizer'} - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(ImageTemplateCustomizer, self).__init__(**kwargs) - self.name = name - self.type = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor.py deleted file mode 100644 index f17033325c22..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 ImageTemplateDistributor(Model): - """Generic distribution object. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateManagedImageDistributor, - ImageTemplateSharedImageDistributor, ImageTemplateVhdDistributor - - All required parameters must be populated in order to send to Azure. - - :param run_output_name: Required. The name to be used for the associated - RunOutput. - :type run_output_name: str - :param artifact_tags: Tags that will be applied to the artifact once it - has been created/updated by the distributor. - :type artifact_tags: dict[str, str] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, - 'type': {'required': True}, - } - - _attribute_map = { - 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, - 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ManagedImage': 'ImageTemplateManagedImageDistributor', 'SharedImage': 'ImageTemplateSharedImageDistributor', 'VHD': 'ImageTemplateVhdDistributor'} - } - - def __init__(self, **kwargs): - super(ImageTemplateDistributor, self).__init__(**kwargs) - self.run_output_name = kwargs.get('run_output_name', None) - self.artifact_tags = kwargs.get('artifact_tags', None) - self.type = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor_py3.py deleted file mode 100644 index 83e5803e3375..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 ImageTemplateDistributor(Model): - """Generic distribution object. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateManagedImageDistributor, - ImageTemplateSharedImageDistributor, ImageTemplateVhdDistributor - - All required parameters must be populated in order to send to Azure. - - :param run_output_name: Required. The name to be used for the associated - RunOutput. - :type run_output_name: str - :param artifact_tags: Tags that will be applied to the artifact once it - has been created/updated by the distributor. - :type artifact_tags: dict[str, str] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, - 'type': {'required': True}, - } - - _attribute_map = { - 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, - 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ManagedImage': 'ImageTemplateManagedImageDistributor', 'SharedImage': 'ImageTemplateSharedImageDistributor', 'VHD': 'ImageTemplateVhdDistributor'} - } - - def __init__(self, *, run_output_name: str, artifact_tags=None, **kwargs) -> None: - super(ImageTemplateDistributor, self).__init__(**kwargs) - self.run_output_name = run_output_name - self.artifact_tags = artifact_tags - self.type = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_file_customizer.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_file_customizer.py deleted file mode 100644 index de591f7fb5fb..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_file_customizer.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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 .image_template_customizer import ImageTemplateCustomizer - - -class ImageTemplateFileCustomizer(ImageTemplateCustomizer): - """Uploads files to VMs (Linux, Windows). Corresponds to Packer file - provisioner. - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - :param source_uri: The URI of the file to be uploaded for customizing the - VM. It can be a github link, SAS URI for Azure Storage, etc - :type source_uri: str - :param destination: The absolute path to a file (with nested directory - structures already created) where the file (from sourceUri) will be - uploaded to in the VM - :type destination: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'destination': {'key': 'destination', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateFileCustomizer, self).__init__(**kwargs) - self.source_uri = kwargs.get('source_uri', None) - self.destination = kwargs.get('destination', None) - self.type = 'File' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_file_customizer_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_file_customizer_py3.py deleted file mode 100644 index a9d6d048d595..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_file_customizer_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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 .image_template_customizer_py3 import ImageTemplateCustomizer - - -class ImageTemplateFileCustomizer(ImageTemplateCustomizer): - """Uploads files to VMs (Linux, Windows). Corresponds to Packer file - provisioner. - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - :param source_uri: The URI of the file to be uploaded for customizing the - VM. It can be a github link, SAS URI for Azure Storage, etc - :type source_uri: str - :param destination: The absolute path to a file (with nested directory - structures already created) where the file (from sourceUri) will be - uploaded to in the VM - :type destination: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'destination': {'key': 'destination', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, source_uri: str=None, destination: str=None, **kwargs) -> None: - super(ImageTemplateFileCustomizer, self).__init__(name=name, **kwargs) - self.source_uri = source_uri - self.destination = destination - self.type = 'File' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity.py deleted file mode 100644 index c062dd37993d..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 ImageTemplateIdentity(Model): - """Identity for the image template. - - :param type: The type of identity used for the image template. The type - 'None' will remove any identities from the image template. Possible values - include: 'UserAssigned', 'None' - :type type: str or ~azure.mgmt.imagebuilder.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the image template. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.imagebuilder.models.ImageTemplateIdentityUserAssignedIdentitiesValue] - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ImageTemplateIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_py3.py deleted file mode 100644 index 79b308d7cb24..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 ImageTemplateIdentity(Model): - """Identity for the image template. - - :param type: The type of identity used for the image template. The type - 'None' will remove any identities from the image template. Possible values - include: 'UserAssigned', 'None' - :type type: str or ~azure.mgmt.imagebuilder.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the image template. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.imagebuilder.models.ImageTemplateIdentityUserAssignedIdentitiesValue] - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ImageTemplateIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ImageTemplateIdentity, self).__init__(**kwargs) - self.type = type - self.user_assigned_identities = user_assigned_identities diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_user_assigned_identities_value.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_user_assigned_identities_value.py deleted file mode 100644 index 018a2492a54a..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_user_assigned_identities_value.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 ImageTemplateIdentityUserAssignedIdentitiesValue(Model): - """ImageTemplateIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_user_assigned_identities_value_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_user_assigned_identities_value_py3.py deleted file mode 100644 index 906373e8c49d..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_identity_user_assigned_identities_value_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 ImageTemplateIdentityUserAssignedIdentitiesValue(Model): - """ImageTemplateIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageTemplateIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source.py deleted file mode 100644 index 66ef6def91bb..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 .image_template_source import ImageTemplateSource - - -class ImageTemplateIsoSource(ImageTemplateSource): - """Describes an image source that is an installation ISO. Currently only - supports Red Hat Enterprise Linux 7.2-7.5 ISO's. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param source_uri: Required. URI to get the ISO image. This URI has to be - accessible to the resource provider at the time of the image template - creation. - :type source_uri: str - :param sha256_checksum: Required. SHA256 Checksum of the ISO image. - :type sha256_checksum: str - """ - - _validation = { - 'type': {'required': True}, - 'source_uri': {'required': True}, - 'sha256_checksum': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateIsoSource, self).__init__(**kwargs) - self.source_uri = kwargs.get('source_uri', None) - self.sha256_checksum = kwargs.get('sha256_checksum', None) - self.type = 'ISO' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source_py3.py deleted file mode 100644 index 174dea8fb688..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 .image_template_source_py3 import ImageTemplateSource - - -class ImageTemplateIsoSource(ImageTemplateSource): - """Describes an image source that is an installation ISO. Currently only - supports Red Hat Enterprise Linux 7.2-7.5 ISO's. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param source_uri: Required. URI to get the ISO image. This URI has to be - accessible to the resource provider at the time of the image template - creation. - :type source_uri: str - :param sha256_checksum: Required. SHA256 Checksum of the ISO image. - :type sha256_checksum: str - """ - - _validation = { - 'type': {'required': True}, - 'source_uri': {'required': True}, - 'sha256_checksum': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'sha256_checksum': {'key': 'sha256Checksum', 'type': 'str'}, - } - - def __init__(self, *, source_uri: str, sha256_checksum: str, **kwargs) -> None: - super(ImageTemplateIsoSource, self).__init__(**kwargs) - self.source_uri = source_uri - self.sha256_checksum = sha256_checksum - self.type = 'ISO' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status.py deleted file mode 100644 index aad6a13dcc0d..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 ImageTemplateLastRunStatus(Model): - """ImageTemplateLastRunStatus. - - :param start_time: Start time of the last run (UTC) - :type start_time: datetime - :param end_time: End time of the last run (UTC) - :type end_time: datetime - :param run_state: State of the last run. Possible values include: - 'Running', 'Succeeded', 'PartiallySucceeded', 'Failed' - :type run_state: str or ~azure.mgmt.imagebuilder.models.enum - :param run_sub_state: Sub-state of the last run. Possible values include: - 'Queued', 'Building', 'Customizing', 'Distributing' - :type run_sub_state: str or ~azure.mgmt.imagebuilder.models.enum - :param message: Verbose information about the last run state - :type message: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'run_state': {'key': 'runState', 'type': 'str'}, - 'run_sub_state': {'key': 'runSubState', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateLastRunStatus, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.run_state = kwargs.get('run_state', None) - self.run_sub_state = kwargs.get('run_sub_state', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status_py3.py deleted file mode 100644 index b88a746b2bc4..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 ImageTemplateLastRunStatus(Model): - """ImageTemplateLastRunStatus. - - :param start_time: Start time of the last run (UTC) - :type start_time: datetime - :param end_time: End time of the last run (UTC) - :type end_time: datetime - :param run_state: State of the last run. Possible values include: - 'Running', 'Succeeded', 'PartiallySucceeded', 'Failed' - :type run_state: str or ~azure.mgmt.imagebuilder.models.enum - :param run_sub_state: Sub-state of the last run. Possible values include: - 'Queued', 'Building', 'Customizing', 'Distributing' - :type run_sub_state: str or ~azure.mgmt.imagebuilder.models.enum - :param message: Verbose information about the last run state - :type message: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'run_state': {'key': 'runState', 'type': 'str'}, - 'run_sub_state': {'key': 'runSubState', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, start_time=None, end_time=None, run_state=None, run_sub_state=None, message: str=None, **kwargs) -> None: - super(ImageTemplateLastRunStatus, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.run_state = run_state - self.run_sub_state = run_sub_state - self.message = message diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor.py deleted file mode 100644 index 25e3c82716f1..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 .image_template_distributor import ImageTemplateDistributor - - -class ImageTemplateManagedImageDistributor(ImageTemplateDistributor): - """Distribute as a Managed Disk Image. - - All required parameters must be populated in order to send to Azure. - - :param run_output_name: Required. The name to be used for the associated - RunOutput. - :type run_output_name: str - :param artifact_tags: Tags that will be applied to the artifact once it - has been created/updated by the distributor. - :type artifact_tags: dict[str, str] - :param type: Required. Constant filled by server. - :type type: str - :param image_id: Required. Resource Id of the Managed Disk Image - :type image_id: str - :param location: Required. Azure location for the image, should match if - image already exists - :type location: str - """ - - _validation = { - 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, - 'type': {'required': True}, - 'image_id': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, - 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'image_id': {'key': 'imageId', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateManagedImageDistributor, self).__init__(**kwargs) - self.image_id = kwargs.get('image_id', None) - self.location = kwargs.get('location', None) - self.type = 'ManagedImage' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor_py3.py deleted file mode 100644 index 9532f0f2e5a2..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 .image_template_distributor_py3 import ImageTemplateDistributor - - -class ImageTemplateManagedImageDistributor(ImageTemplateDistributor): - """Distribute as a Managed Disk Image. - - All required parameters must be populated in order to send to Azure. - - :param run_output_name: Required. The name to be used for the associated - RunOutput. - :type run_output_name: str - :param artifact_tags: Tags that will be applied to the artifact once it - has been created/updated by the distributor. - :type artifact_tags: dict[str, str] - :param type: Required. Constant filled by server. - :type type: str - :param image_id: Required. Resource Id of the Managed Disk Image - :type image_id: str - :param location: Required. Azure location for the image, should match if - image already exists - :type location: str - """ - - _validation = { - 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, - 'type': {'required': True}, - 'image_id': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, - 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'image_id': {'key': 'imageId', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, run_output_name: str, image_id: str, location: str, artifact_tags=None, **kwargs) -> None: - super(ImageTemplateManagedImageDistributor, self).__init__(run_output_name=run_output_name, artifact_tags=artifact_tags, **kwargs) - self.image_id = image_id - self.location = location - self.type = 'ManagedImage' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source.py deleted file mode 100644 index f2ec8e78ba5c..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 .image_template_source import ImageTemplateSource - - -class ImageTemplateManagedImageSource(ImageTemplateSource): - """Describes an image source that is a managed image in customer subscription. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param image_id: Required. ARM resource id of the managed image in - customer subscription - :type image_id: str - """ - - _validation = { - 'type': {'required': True}, - 'image_id': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'image_id': {'key': 'imageId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateManagedImageSource, self).__init__(**kwargs) - self.image_id = kwargs.get('image_id', None) - self.type = 'ManagedImage' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source_py3.py deleted file mode 100644 index b7a79424ec96..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 .image_template_source_py3 import ImageTemplateSource - - -class ImageTemplateManagedImageSource(ImageTemplateSource): - """Describes an image source that is a managed image in customer subscription. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param image_id: Required. ARM resource id of the managed image in - customer subscription - :type image_id: str - """ - - _validation = { - 'type': {'required': True}, - 'image_id': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'image_id': {'key': 'imageId', 'type': 'str'}, - } - - def __init__(self, *, image_id: str, **kwargs) -> None: - super(ImageTemplateManagedImageSource, self).__init__(**kwargs) - self.image_id = image_id - self.type = 'ManagedImage' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_platform_image_source.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_platform_image_source.py deleted file mode 100644 index ba6d93aee67c..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_platform_image_source.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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 .image_template_source import ImageTemplateSource - - -class ImageTemplatePlatformImageSource(ImageTemplateSource): - """Describes an image source from [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param publisher: Image Publisher in [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - :type publisher: str - :param offer: Image offer from the [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - :type offer: str - :param sku: Image sku from the [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - :type sku: str - :param version: Image version from the [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - :type version: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplatePlatformImageSource, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) - self.type = 'PlatformImage' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_platform_image_source_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_platform_image_source_py3.py deleted file mode 100644 index 62aae38b92c0..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_platform_image_source_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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 .image_template_source_py3 import ImageTemplateSource - - -class ImageTemplatePlatformImageSource(ImageTemplateSource): - """Describes an image source from [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param publisher: Image Publisher in [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - :type publisher: str - :param offer: Image offer from the [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - :type offer: str - :param sku: Image sku from the [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - :type sku: str - :param version: Image version from the [Azure Gallery - Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). - :type version: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageTemplatePlatformImageSource, self).__init__(**kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version - self.type = 'PlatformImage' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer.py deleted file mode 100644 index 03403ab95e82..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 .image_template_customizer import ImageTemplateCustomizer - - -class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer): - """Runs the specified PowerShell on the VM (Windows). Corresponds to Packer - powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be - specified. - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - :param script_uri: URI of the PowerShell script to be run for customizing. - It can be a github link, SAS URI for Azure Storage, etc - :type script_uri: str - :param inline: Array of PowerShell commands to execute - :type inline: list[str] - :param valid_exit_codes: Valid exit codes for the PowerShell script. - [Default: 0] - :type valid_exit_codes: list[int] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'script_uri': {'key': 'scriptUri', 'type': 'str'}, - 'inline': {'key': 'inline', 'type': '[str]'}, - 'valid_exit_codes': {'key': 'validExitCodes', 'type': '[int]'}, - } - - def __init__(self, **kwargs): - super(ImageTemplatePowerShellCustomizer, self).__init__(**kwargs) - self.script_uri = kwargs.get('script_uri', None) - self.inline = kwargs.get('inline', None) - self.valid_exit_codes = kwargs.get('valid_exit_codes', None) - self.type = 'PowerShell' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer_py3.py deleted file mode 100644 index 65f0b071bd0b..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 .image_template_customizer_py3 import ImageTemplateCustomizer - - -class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer): - """Runs the specified PowerShell on the VM (Windows). Corresponds to Packer - powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be - specified. - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - :param script_uri: URI of the PowerShell script to be run for customizing. - It can be a github link, SAS URI for Azure Storage, etc - :type script_uri: str - :param inline: Array of PowerShell commands to execute - :type inline: list[str] - :param valid_exit_codes: Valid exit codes for the PowerShell script. - [Default: 0] - :type valid_exit_codes: list[int] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'script_uri': {'key': 'scriptUri', 'type': 'str'}, - 'inline': {'key': 'inline', 'type': '[str]'}, - 'valid_exit_codes': {'key': 'validExitCodes', 'type': '[int]'}, - } - - def __init__(self, *, name: str=None, script_uri: str=None, inline=None, valid_exit_codes=None, **kwargs) -> None: - super(ImageTemplatePowerShellCustomizer, self).__init__(name=name, **kwargs) - self.script_uri = script_uri - self.inline = inline - self.valid_exit_codes = valid_exit_codes - self.type = 'PowerShell' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_py3.py deleted file mode 100644 index 5216f5776dcf..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ImageTemplate(Resource): - """ImageTemplate. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source: Required. Specifies the properties used to describe the - source image. - :type source: ~azure.mgmt.imagebuilder.models.ImageTemplateSource - :param customize: Specifies the properties used to describe the - customization steps of the image, like Image source etc - :type customize: - list[~azure.mgmt.imagebuilder.models.ImageTemplateCustomizer] - :param distribute: Required. The distribution targets where the image - output needs to go to. - :type distribute: - list[~azure.mgmt.imagebuilder.models.ImageTemplateDistributor] - :ivar provisioning_state: Provisioning state of the resource. Possible - values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' - :vartype provisioning_state: str or ~azure.mgmt.imagebuilder.models.enum - :ivar provisioning_error: Provisioning error, if any - :vartype provisioning_error: - ~azure.mgmt.imagebuilder.models.ProvisioningError - :ivar last_run_status: State of 'run' that is currently executing or was - last executed. - :vartype last_run_status: - ~azure.mgmt.imagebuilder.models.ImageTemplateLastRunStatus - :param build_timeout_in_minutes: Maximum duration to wait while building - the image template. Omit or specify 0 to use the default (60 minutes). - :type build_timeout_in_minutes: int - :param identity: The identity of the image template, if configured. - :type identity: ~azure.mgmt.imagebuilder.models.ImageTemplateIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'source': {'required': True}, - 'distribute': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_error': {'readonly': True}, - 'last_run_status': {'readonly': True}, - 'build_timeout_in_minutes': {'maximum': 960, 'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source': {'key': 'properties.source', 'type': 'ImageTemplateSource'}, - 'customize': {'key': 'properties.customize', 'type': '[ImageTemplateCustomizer]'}, - 'distribute': {'key': 'properties.distribute', 'type': '[ImageTemplateDistributor]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provisioning_error': {'key': 'properties.provisioningError', 'type': 'ProvisioningError'}, - 'last_run_status': {'key': 'properties.lastRunStatus', 'type': 'ImageTemplateLastRunStatus'}, - 'build_timeout_in_minutes': {'key': 'properties.buildTimeoutInMinutes', 'type': 'int'}, - 'identity': {'key': 'identity', 'type': 'ImageTemplateIdentity'}, - } - - def __init__(self, *, location: str, source, distribute, tags=None, customize=None, build_timeout_in_minutes: int=None, identity=None, **kwargs) -> None: - super(ImageTemplate, self).__init__(location=location, tags=tags, **kwargs) - self.source = source - self.customize = customize - self.distribute = distribute - self.provisioning_state = None - self.provisioning_error = None - self.last_run_status = None - self.build_timeout_in_minutes = build_timeout_in_minutes - self.identity = identity diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer.py deleted file mode 100644 index 1f49dde7cdc2..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 .image_template_customizer import ImageTemplateCustomizer - - -class ImageTemplateRestartCustomizer(ImageTemplateCustomizer): - """Reboots a VM and waits for it to come back online (Windows). Corresponds to - Packer windows-restart provisioner. - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - :param restart_command: Command to execute the restart [Default: 'shutdown - /r /f /t 0 /c "packer restart"'] - :type restart_command: str - :param restart_check_command: Command to check if restart succeeded - [Default: ''] - :type restart_check_command: str - :param restart_timeout: Restart timeout specified as a string of magnitude - and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m'] - :type restart_timeout: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'restart_command': {'key': 'restartCommand', 'type': 'str'}, - 'restart_check_command': {'key': 'restartCheckCommand', 'type': 'str'}, - 'restart_timeout': {'key': 'restartTimeout', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateRestartCustomizer, self).__init__(**kwargs) - self.restart_command = kwargs.get('restart_command', None) - self.restart_check_command = kwargs.get('restart_check_command', None) - self.restart_timeout = kwargs.get('restart_timeout', None) - self.type = 'WindowsRestart' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer_py3.py deleted file mode 100644 index 5efe8be5055d..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 .image_template_customizer_py3 import ImageTemplateCustomizer - - -class ImageTemplateRestartCustomizer(ImageTemplateCustomizer): - """Reboots a VM and waits for it to come back online (Windows). Corresponds to - Packer windows-restart provisioner. - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - :param restart_command: Command to execute the restart [Default: 'shutdown - /r /f /t 0 /c "packer restart"'] - :type restart_command: str - :param restart_check_command: Command to check if restart succeeded - [Default: ''] - :type restart_check_command: str - :param restart_timeout: Restart timeout specified as a string of magnitude - and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m'] - :type restart_timeout: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'restart_command': {'key': 'restartCommand', 'type': 'str'}, - 'restart_check_command': {'key': 'restartCheckCommand', 'type': 'str'}, - 'restart_timeout': {'key': 'restartTimeout', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, restart_command: str=None, restart_check_command: str=None, restart_timeout: str=None, **kwargs) -> None: - super(ImageTemplateRestartCustomizer, self).__init__(name=name, **kwargs) - self.restart_command = restart_command - self.restart_check_command = restart_check_command - self.restart_timeout = restart_timeout - self.type = 'WindowsRestart' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor.py deleted file mode 100644 index 0880e43b7b3a..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 .image_template_distributor import ImageTemplateDistributor - - -class ImageTemplateSharedImageDistributor(ImageTemplateDistributor): - """Distribute via Shared Image Gallery. - - All required parameters must be populated in order to send to Azure. - - :param run_output_name: Required. The name to be used for the associated - RunOutput. - :type run_output_name: str - :param artifact_tags: Tags that will be applied to the artifact once it - has been created/updated by the distributor. - :type artifact_tags: dict[str, str] - :param type: Required. Constant filled by server. - :type type: str - :param gallery_image_id: Required. Resource Id of the Shared Image Gallery - image - :type gallery_image_id: str - :param replication_regions: Required. - :type replication_regions: list[str] - """ - - _validation = { - 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, - 'type': {'required': True}, - 'gallery_image_id': {'required': True}, - 'replication_regions': {'required': True}, - } - - _attribute_map = { - 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, - 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'gallery_image_id': {'key': 'galleryImageId', 'type': 'str'}, - 'replication_regions': {'key': 'replicationRegions', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateSharedImageDistributor, self).__init__(**kwargs) - self.gallery_image_id = kwargs.get('gallery_image_id', None) - self.replication_regions = kwargs.get('replication_regions', None) - self.type = 'SharedImage' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor_py3.py deleted file mode 100644 index 4dfd93aea2f7..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 .image_template_distributor_py3 import ImageTemplateDistributor - - -class ImageTemplateSharedImageDistributor(ImageTemplateDistributor): - """Distribute via Shared Image Gallery. - - All required parameters must be populated in order to send to Azure. - - :param run_output_name: Required. The name to be used for the associated - RunOutput. - :type run_output_name: str - :param artifact_tags: Tags that will be applied to the artifact once it - has been created/updated by the distributor. - :type artifact_tags: dict[str, str] - :param type: Required. Constant filled by server. - :type type: str - :param gallery_image_id: Required. Resource Id of the Shared Image Gallery - image - :type gallery_image_id: str - :param replication_regions: Required. - :type replication_regions: list[str] - """ - - _validation = { - 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, - 'type': {'required': True}, - 'gallery_image_id': {'required': True}, - 'replication_regions': {'required': True}, - } - - _attribute_map = { - 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, - 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'gallery_image_id': {'key': 'galleryImageId', 'type': 'str'}, - 'replication_regions': {'key': 'replicationRegions', 'type': '[str]'}, - } - - def __init__(self, *, run_output_name: str, gallery_image_id: str, replication_regions, artifact_tags=None, **kwargs) -> None: - super(ImageTemplateSharedImageDistributor, self).__init__(run_output_name=run_output_name, artifact_tags=artifact_tags, **kwargs) - self.gallery_image_id = gallery_image_id - self.replication_regions = replication_regions - self.type = 'SharedImage' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_version_source.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_version_source.py deleted file mode 100644 index ed01f8219499..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_version_source.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 .image_template_source import ImageTemplateSource - - -class ImageTemplateSharedImageVersionSource(ImageTemplateSource): - """Describes an image source that is an image version in a shared image - gallery. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param image_version_id: Required. ARM resource id of the image version in - the shared image gallery - :type image_version_id: str - """ - - _validation = { - 'type': {'required': True}, - 'image_version_id': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'image_version_id': {'key': 'imageVersionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateSharedImageVersionSource, self).__init__(**kwargs) - self.image_version_id = kwargs.get('image_version_id', None) - self.type = 'SharedImageVersion' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_version_source_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_version_source_py3.py deleted file mode 100644 index a9d536e81348..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_version_source_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 .image_template_source_py3 import ImageTemplateSource - - -class ImageTemplateSharedImageVersionSource(ImageTemplateSource): - """Describes an image source that is an image version in a shared image - gallery. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param image_version_id: Required. ARM resource id of the image version in - the shared image gallery - :type image_version_id: str - """ - - _validation = { - 'type': {'required': True}, - 'image_version_id': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'image_version_id': {'key': 'imageVersionId', 'type': 'str'}, - } - - def __init__(self, *, image_version_id: str, **kwargs) -> None: - super(ImageTemplateSharedImageVersionSource, self).__init__(**kwargs) - self.image_version_id = image_version_id - self.type = 'SharedImageVersion' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer.py deleted file mode 100644 index fdf6a7abc573..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 .image_template_customizer import ImageTemplateCustomizer - - -class ImageTemplateShellCustomizer(ImageTemplateCustomizer): - """Runs a shell script during the customization phase (Linux). Corresponds to - Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be - specified. - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - :param script_uri: URI of the shell script to be run for customizing. It - can be a github link, SAS URI for Azure Storage, etc - :type script_uri: str - :param inline: Array of shell commands to execute - :type inline: list[str] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'script_uri': {'key': 'scriptUri', 'type': 'str'}, - 'inline': {'key': 'inline', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateShellCustomizer, self).__init__(**kwargs) - self.script_uri = kwargs.get('script_uri', None) - self.inline = kwargs.get('inline', None) - self.type = 'Shell' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer_py3.py deleted file mode 100644 index f19ef8a2f609..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 .image_template_customizer_py3 import ImageTemplateCustomizer - - -class ImageTemplateShellCustomizer(ImageTemplateCustomizer): - """Runs a shell script during the customization phase (Linux). Corresponds to - Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be - specified. - - All required parameters must be populated in order to send to Azure. - - :param name: Friendly Name to provide context on what this customization - step does - :type name: str - :param type: Required. Constant filled by server. - :type type: str - :param script_uri: URI of the shell script to be run for customizing. It - can be a github link, SAS URI for Azure Storage, etc - :type script_uri: str - :param inline: Array of shell commands to execute - :type inline: list[str] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'script_uri': {'key': 'scriptUri', 'type': 'str'}, - 'inline': {'key': 'inline', 'type': '[str]'}, - } - - def __init__(self, *, name: str=None, script_uri: str=None, inline=None, **kwargs) -> None: - super(ImageTemplateShellCustomizer, self).__init__(name=name, **kwargs) - self.script_uri = script_uri - self.inline = inline - self.type = 'Shell' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source.py deleted file mode 100644 index 8a2442877d96..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 ImageTemplateSource(Model): - """ImageTemplateSource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateIsoSource, ImageTemplatePlatformImageSource, - ImageTemplateManagedImageSource, ImageTemplateSharedImageVersionSource - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ISO': 'ImageTemplateIsoSource', 'PlatformImage': 'ImageTemplatePlatformImageSource', 'ManagedImage': 'ImageTemplateManagedImageSource', 'SharedImageVersion': 'ImageTemplateSharedImageVersionSource'} - } - - def __init__(self, **kwargs): - super(ImageTemplateSource, self).__init__(**kwargs) - self.type = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source_py3.py deleted file mode 100644 index 65dd23cca393..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 ImageTemplateSource(Model): - """ImageTemplateSource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateIsoSource, ImageTemplatePlatformImageSource, - ImageTemplateManagedImageSource, ImageTemplateSharedImageVersionSource - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ISO': 'ImageTemplateIsoSource', 'PlatformImage': 'ImageTemplatePlatformImageSource', 'ManagedImage': 'ImageTemplateManagedImageSource', 'SharedImageVersion': 'ImageTemplateSharedImageVersionSource'} - } - - def __init__(self, **kwargs) -> None: - super(ImageTemplateSource, self).__init__(**kwargs) - self.type = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_update_parameters.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_update_parameters.py deleted file mode 100644 index cc25bf25a753..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_update_parameters.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 ImageTemplateUpdateParameters(Model): - """Parameters for updating an image template. - - :param identity: The identity of the image template, if configured. - :type identity: ~azure.mgmt.imagebuilder.models.ImageTemplateIdentity - :param tags: The user-specified tags associated with the image template. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ImageTemplateIdentity'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateUpdateParameters, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_update_parameters_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_update_parameters_py3.py deleted file mode 100644 index 37a8859d7bf3..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_update_parameters_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 ImageTemplateUpdateParameters(Model): - """Parameters for updating an image template. - - :param identity: The identity of the image template, if configured. - :type identity: ~azure.mgmt.imagebuilder.models.ImageTemplateIdentity - :param tags: The user-specified tags associated with the image template. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ImageTemplateIdentity'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, identity=None, tags=None, **kwargs) -> None: - super(ImageTemplateUpdateParameters, self).__init__(**kwargs) - self.identity = identity - self.tags = tags diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor.py deleted file mode 100644 index 091ec3d17c15..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 .image_template_distributor import ImageTemplateDistributor - - -class ImageTemplateVhdDistributor(ImageTemplateDistributor): - """Distribute via VHD in a storage account. - - All required parameters must be populated in order to send to Azure. - - :param run_output_name: Required. The name to be used for the associated - RunOutput. - :type run_output_name: str - :param artifact_tags: Tags that will be applied to the artifact once it - has been created/updated by the distributor. - :type artifact_tags: dict[str, str] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, - 'type': {'required': True}, - } - - _attribute_map = { - 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, - 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageTemplateVhdDistributor, self).__init__(**kwargs) - self.type = 'VHD' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor_py3.py deleted file mode 100644 index ca9cd3368d8e..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 .image_template_distributor_py3 import ImageTemplateDistributor - - -class ImageTemplateVhdDistributor(ImageTemplateDistributor): - """Distribute via VHD in a storage account. - - All required parameters must be populated in order to send to Azure. - - :param run_output_name: Required. The name to be used for the associated - RunOutput. - :type run_output_name: str - :param artifact_tags: Tags that will be applied to the artifact once it - has been created/updated by the distributor. - :type artifact_tags: dict[str, str] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'run_output_name': {'required': True, 'pattern': r'^[A-Za-z0-9-_.]{1,64}$'}, - 'type': {'required': True}, - } - - _attribute_map = { - 'run_output_name': {'key': 'runOutputName', 'type': 'str'}, - 'artifact_tags': {'key': 'artifactTags', 'type': '{str}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, run_output_name: str, artifact_tags=None, **kwargs) -> None: - super(ImageTemplateVhdDistributor, self).__init__(run_output_name=run_output_name, artifact_tags=artifact_tags, **kwargs) - self.type = 'VHD' diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error.py deleted file mode 100644 index 3582f2a763fb..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 InnerError(Model): - """Inner error details. - - :param exception_type: The exception type. - :type exception_type: str - :param error_detail: The internal error message or exception dump. - :type error_detail: str - """ - - _attribute_map = { - 'exception_type': {'key': 'exceptionType', 'type': 'str'}, - 'error_detail': {'key': 'errorDetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exception_type = kwargs.get('exception_type', None) - self.error_detail = kwargs.get('error_detail', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error_py3.py deleted file mode 100644 index a33ea33c1356..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 InnerError(Model): - """Inner error details. - - :param exception_type: The exception type. - :type exception_type: str - :param error_detail: The internal error message or exception dump. - :type error_detail: str - """ - - _attribute_map = { - 'exception_type': {'key': 'exceptionType', 'type': 'str'}, - 'error_detail': {'key': 'errorDetail', 'type': 'str'}, - } - - def __init__(self, *, exception_type: str=None, error_detail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exception_type = exception_type - self.error_detail = error_detail diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation.py deleted file mode 100644 index b6dc0f4b1cd6..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A REST API operation. - - :param name: The operation name. This is of the format - {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.imagebuilder.models.OperationDisplay - :param origin: The intended executor of the operation. - :type origin: str - :param properties: Properties of the operation. - :type properties: object - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_display.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_display.py deleted file mode 100644 index 99487e3cb825..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_display.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 OperationDisplay(Model): - """The object that describes the operation. - - :param provider: Friendly name of the resource provider. - :type provider: str - :param operation: The operation type. For example: read, write, delete, or - listKeys/action - :type operation: str - :param resource: The resource type on which the operation is performed. - :type resource: str - :param description: The friendly name of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.operation = kwargs.get('operation', None) - self.resource = kwargs.get('resource', None) - self.description = kwargs.get('description', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_display_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_display_py3.py deleted file mode 100644 index ce54ece35d47..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_display_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 OperationDisplay(Model): - """The object that describes the operation. - - :param provider: Friendly name of the resource provider. - :type provider: str - :param operation: The operation type. For example: read, write, delete, or - listKeys/action - :type operation: str - :param resource: The resource type on which the operation is performed. - :type resource: str - :param description: The friendly name of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_paged.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_paged.py deleted file mode 100644 index 6a0f78681626..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_py3.py deleted file mode 100644 index b4b93307f1ba..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/operation_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A REST API operation. - - :param name: The operation name. This is of the format - {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.imagebuilder.models.OperationDisplay - :param origin: The intended executor of the operation. - :type origin: str - :param properties: Properties of the operation. - :type properties: object - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error.py deleted file mode 100644 index a60e75487daa..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 ProvisioningError(Model): - """ProvisioningError. - - :param provisioning_error_code: Error code of the provisioning failure. - Possible values include: 'BadSourceType', 'BadPIRSource', 'BadISOSource', - 'BadManagedImageSource', 'BadSharedImageVersionSource', - 'BadCustomizerType', 'UnsupportedCustomizerType', 'NoCustomizerScript', - 'BadDistributeType', 'BadSharedImageDistribute', 'ServerError', 'Other' - :type provisioning_error_code: str or ~azure.mgmt.imagebuilder.models.enum - :param message: Verbose error message about the provisioning failure - :type message: str - """ - - _attribute_map = { - 'provisioning_error_code': {'key': 'provisioningErrorCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProvisioningError, self).__init__(**kwargs) - self.provisioning_error_code = kwargs.get('provisioning_error_code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error_py3.py deleted file mode 100644 index 99dc2a93291f..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 ProvisioningError(Model): - """ProvisioningError. - - :param provisioning_error_code: Error code of the provisioning failure. - Possible values include: 'BadSourceType', 'BadPIRSource', 'BadISOSource', - 'BadManagedImageSource', 'BadSharedImageVersionSource', - 'BadCustomizerType', 'UnsupportedCustomizerType', 'NoCustomizerScript', - 'BadDistributeType', 'BadSharedImageDistribute', 'ServerError', 'Other' - :type provisioning_error_code: str or ~azure.mgmt.imagebuilder.models.enum - :param message: Verbose error message about the provisioning failure - :type message: str - """ - - _attribute_map = { - 'provisioning_error_code': {'key': 'provisioningErrorCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, provisioning_error_code=None, message: str=None, **kwargs) -> None: - super(ProvisioningError, self).__init__(**kwargs) - self.provisioning_error_code = provisioning_error_code - self.message = message diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/resource.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/resource_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output.py deleted file mode 100644 index 6e2ca49c58c5..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 .sub_resource import SubResource - - -class RunOutput(SubResource): - """Represents an output that was created by running an image 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: Resource Id - :vartype id: str - :param name: Required. Resource name - :type name: str - :ivar type: Resource type - :vartype type: str - :param artifact_id: The resource id of the artifact. - :type artifact_id: str - :param artifact_uri: The location URI of the artifact. - :type artifact_uri: str - :ivar provisioning_state: Provisioning state of the resource. Possible - values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' - :vartype provisioning_state: str or ~azure.mgmt.imagebuilder.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'required': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'artifact_id': {'key': 'properties.artifactId', 'type': 'str'}, - 'artifact_uri': {'key': 'properties.artifactUri', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunOutput, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_uri = kwargs.get('artifact_uri', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_paged.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_paged.py deleted file mode 100644 index 701bb19d95fc..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 RunOutputPaged(Paged): - """ - A paging container for iterating over a list of :class:`RunOutput ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RunOutput]'} - } - - def __init__(self, *args, **kwargs): - - super(RunOutputPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_py3.py deleted file mode 100644 index c9f1f16c04b6..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 .sub_resource_py3 import SubResource - - -class RunOutput(SubResource): - """Represents an output that was created by running an image 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: Resource Id - :vartype id: str - :param name: Required. Resource name - :type name: str - :ivar type: Resource type - :vartype type: str - :param artifact_id: The resource id of the artifact. - :type artifact_id: str - :param artifact_uri: The location URI of the artifact. - :type artifact_uri: str - :ivar provisioning_state: Provisioning state of the resource. Possible - values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' - :vartype provisioning_state: str or ~azure.mgmt.imagebuilder.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'required': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'artifact_id': {'key': 'properties.artifactId', 'type': 'str'}, - 'artifact_uri': {'key': 'properties.artifactUri', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, name: str, artifact_id: str=None, artifact_uri: str=None, **kwargs) -> None: - super(RunOutput, self).__init__(name=name, **kwargs) - self.artifact_id = artifact_id - self.artifact_uri = artifact_uri - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/sub_resource.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/sub_resource.py deleted file mode 100644 index b9a7d67022ee..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/sub_resource.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 SubResource(Model): - """The Sub Resource model definition. - - 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: Resource Id - :vartype id: str - :param name: Required. Resource name - :type name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'required': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = kwargs.get('name', None) - self.type = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/sub_resource_py3.py deleted file mode 100644 index dde286893db0..000000000000 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/sub_resource_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 SubResource(Model): - """The Sub Resource model definition. - - 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: Resource Id - :vartype id: str - :param name: Required. Resource name - :type name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'required': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = name - self.type = None diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/__init__.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/__init__.py index c33bd5d27ebb..6c4b698e8187 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/__init__.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/__init__.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from .virtual_machine_image_templates_operations import VirtualMachineImageTemplatesOperations -from .operations import Operations +from ._virtual_machine_image_templates_operations import VirtualMachineImageTemplatesOperations +from ._operations import Operations __all__ = [ 'VirtualMachineImageTemplatesOperations', diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/operations.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_operations.py similarity index 90% rename from sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/operations.py rename to sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_operations.py index 03423782dc42..cda96e0326f0 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/operations.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_operations.py @@ -18,6 +18,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -52,8 +54,7 @@ def list( :raises: :class:`ApiErrorException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -78,6 +79,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -86,12 +92,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.VirtualMachineImages/operations'} diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/virtual_machine_image_templates_operations.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_virtual_machine_image_templates_operations.py similarity index 97% rename from sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/virtual_machine_image_templates_operations.py rename to sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_virtual_machine_image_templates_operations.py index 1ea0444e99e1..f63b5e51599e 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/virtual_machine_image_templates_operations.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_virtual_machine_image_templates_operations.py @@ -20,6 +20,8 @@ class VirtualMachineImageTemplatesOperations(object): """VirtualMachineImageTemplatesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,8 +56,7 @@ def list( :raises: :class:`ApiErrorException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -84,6 +85,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -92,12 +98,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ImageTemplatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ImageTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ImageTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VirtualMachineImages/imageTemplates'} @@ -120,8 +124,7 @@ def list_by_resource_group( :raises: :class:`ApiErrorException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -151,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -159,12 +167,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ImageTemplatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ImageTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ImageTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates'} @@ -426,7 +432,6 @@ def get( raise models.ApiErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ImageTemplate', response) @@ -612,8 +617,7 @@ def list_run_outputs( :raises: :class:`ApiErrorException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_run_outputs.metadata['url'] @@ -644,6 +648,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -652,12 +661,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RunOutputPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RunOutputPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RunOutputPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_run_outputs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs'} @@ -715,7 +722,6 @@ def get_run_output( raise models.ApiErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RunOutput', response)