diff --git a/azure-mgmt-imagebuilder/MANIFEST.in b/azure-mgmt-imagebuilder/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/azure-mgmt-imagebuilder/MANIFEST.in +++ b/azure-mgmt-imagebuilder/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/azure-mgmt-imagebuilder/README.rst b/azure-mgmt-imagebuilder/README.rst index d0429ebc7565..8b6ee8ad4468 100644 --- a/azure-mgmt-imagebuilder/README.rst +++ b/azure-mgmt-imagebuilder/README.rst @@ -28,3 +28,6 @@ Provide Feedback If you encounter any bugs or have suggestions, please file an issue in the `Issues `__ section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-imagebuilder%2FREADME.png diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/image_builder_client.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/image_builder_client.py index 5ae8501f640d..e37f721ab45e 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/image_builder_client.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/image_builder_client.py @@ -13,7 +13,7 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.virtual_machine_image_template_operations import VirtualMachineImageTemplateOperations +from .operations.virtual_machine_image_templates_operations import VirtualMachineImageTemplatesOperations from .operations.operations import Operations from . import models @@ -27,7 +27,7 @@ class ImageBuilderClientConfiguration(AzureConfiguration): :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 + 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 @@ -58,8 +58,8 @@ class ImageBuilderClient(SDKClient): :ivar config: Configuration for client. :vartype config: ImageBuilderClientConfiguration - :ivar virtual_machine_image_template: VirtualMachineImageTemplate operations - :vartype virtual_machine_image_template: azure.mgmt.imagebuilder.operations.VirtualMachineImageTemplateOperations + :ivar virtual_machine_image_templates: VirtualMachineImageTemplates operations + :vartype virtual_machine_image_templates: azure.mgmt.imagebuilder.operations.VirtualMachineImageTemplatesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.imagebuilder.operations.Operations @@ -67,7 +67,7 @@ class ImageBuilderClient(SDKClient): :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 + 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 @@ -80,11 +80,11 @@ def __init__( super(ImageBuilderClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-02-01-preview' + self.api_version = '2019-02-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.virtual_machine_image_template = VirtualMachineImageTemplateOperations( + self.virtual_machine_image_templates = VirtualMachineImageTemplatesOperations( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py index 3525c495a847..bca636e5d480 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py @@ -18,9 +18,13 @@ 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_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_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 @@ -39,9 +43,13 @@ 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_shell_customizer import ImageTemplateShellCustomizer + from .image_template_restart_customizer import ImageTemplateRestartCustomizer + from .image_template_power_shell_customizer import ImageTemplatePowerShellCustomizer 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 @@ -64,9 +72,13 @@ 'ImageTemplate', 'ImageTemplateIsoSource', 'ImageTemplatePlatformImageSource', + 'ImageTemplateManagedImageSource', 'ImageTemplateShellCustomizer', + 'ImageTemplateRestartCustomizer', + 'ImageTemplatePowerShellCustomizer', 'ImageTemplateManagedImageDistributor', 'ImageTemplateSharedImageDistributor', + 'ImageTemplateVhdDistributor', 'ImageTemplateUpdateParameters', 'RunOutput', 'Resource', diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error.py index fc288451407e..e6754a67e1e5 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error.py @@ -18,8 +18,8 @@ class ApiError(Model): :param details: The Api error details :type details: list[~azure.mgmt.imagebuilder.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.imagebuilder.models.InnerError + :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. @@ -30,7 +30,7 @@ class ApiError(Model): _attribute_map = { 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerError'}, 'code': {'key': 'code', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, @@ -39,7 +39,7 @@ class ApiError(Model): def __init__(self, **kwargs): super(ApiError, self).__init__(**kwargs) self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', 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) diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_py3.py index 6480fc81a0db..1c24d98b1982 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/api_error_py3.py @@ -18,8 +18,8 @@ class ApiError(Model): :param details: The Api error details :type details: list[~azure.mgmt.imagebuilder.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.imagebuilder.models.InnerError + :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. @@ -30,16 +30,16 @@ class ApiError(Model): _attribute_map = { 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + '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, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + 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.innererror = innererror + self.inner_error = inner_error self.code = code self.target = target self.message = message diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer.py index 500a60243269..fceaf88ab196 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer.py @@ -16,7 +16,8 @@ class ImageTemplateCustomizer(Model): """ImageTemplateCustomizer. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateShellCustomizer + sub-classes are: ImageTemplateShellCustomizer, + ImageTemplateRestartCustomizer, ImageTemplatePowerShellCustomizer All required parameters must be populated in order to send to Azure. @@ -37,7 +38,7 @@ class ImageTemplateCustomizer(Model): } _subtype_map = { - 'type': {'shell': 'ImageTemplateShellCustomizer'} + 'type': {'Shell': 'ImageTemplateShellCustomizer', 'WindowsRestart': 'ImageTemplateRestartCustomizer', 'PowerShell': 'ImageTemplatePowerShellCustomizer'} } def __init__(self, **kwargs): diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer_py3.py index 14430427bf74..2caa991a5e68 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_customizer_py3.py @@ -16,7 +16,8 @@ class ImageTemplateCustomizer(Model): """ImageTemplateCustomizer. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateShellCustomizer + sub-classes are: ImageTemplateShellCustomizer, + ImageTemplateRestartCustomizer, ImageTemplatePowerShellCustomizer All required parameters must be populated in order to send to Azure. @@ -37,7 +38,7 @@ class ImageTemplateCustomizer(Model): } _subtype_map = { - 'type': {'shell': 'ImageTemplateShellCustomizer'} + 'type': {'Shell': 'ImageTemplateShellCustomizer', 'WindowsRestart': 'ImageTemplateRestartCustomizer', 'PowerShell': 'ImageTemplatePowerShellCustomizer'} } def __init__(self, *, name: str=None, **kwargs) -> None: diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor.py index f16fc5a613ca..25ef3016973f 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor.py @@ -17,7 +17,7 @@ class ImageTemplateDistributor(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: ImageTemplateManagedImageDistributor, - ImageTemplateSharedImageDistributor + ImageTemplateSharedImageDistributor, ImageTemplateVhdDistributor All required parameters must be populated in order to send to Azure. @@ -43,7 +43,7 @@ class ImageTemplateDistributor(Model): } _subtype_map = { - 'type': {'managedImage': 'ImageTemplateManagedImageDistributor', 'sharedImage': 'ImageTemplateSharedImageDistributor'} + 'type': {'ManagedImage': 'ImageTemplateManagedImageDistributor', 'SharedImage': 'ImageTemplateSharedImageDistributor', 'VHD': 'ImageTemplateVhdDistributor'} } def __init__(self, **kwargs): diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor_py3.py index 423c07471521..763a9323b20c 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_distributor_py3.py @@ -17,7 +17,7 @@ class ImageTemplateDistributor(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: ImageTemplateManagedImageDistributor, - ImageTemplateSharedImageDistributor + ImageTemplateSharedImageDistributor, ImageTemplateVhdDistributor All required parameters must be populated in order to send to Azure. @@ -43,7 +43,7 @@ class ImageTemplateDistributor(Model): } _subtype_map = { - 'type': {'managedImage': 'ImageTemplateManagedImageDistributor', 'sharedImage': 'ImageTemplateSharedImageDistributor'} + 'type': {'ManagedImage': 'ImageTemplateManagedImageDistributor', 'SharedImage': 'ImageTemplateSharedImageDistributor', 'VHD': 'ImageTemplateVhdDistributor'} } def __init__(self, *, run_output_name: str, artifact_tags=None, **kwargs) -> None: diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source.py index 0bfec6f10ccc..7ec45be07123 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source.py @@ -20,8 +20,8 @@ class ImageTemplateIsoSource(ImageTemplateSource): :param type: Required. Constant filled by server. :type type: str - :param source_uri: Required. URL to get the ISO image. This URL has to be - accessible to the resource provider at the time of the imageTemplate + :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. diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source_py3.py index b0f686009978..dd5221aef8cd 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_iso_source_py3.py @@ -20,8 +20,8 @@ class ImageTemplateIsoSource(ImageTemplateSource): :param type: Required. Constant filled by server. :type type: str - :param source_uri: Required. URL to get the ISO image. This URL has to be - accessible to the resource provider at the time of the imageTemplate + :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. diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status.py index 933c325e4da9..aad6a13dcc0d 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status.py @@ -19,11 +19,11 @@ class ImageTemplateLastRunStatus(Model): :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: 'ready', - 'running', 'succeeded', 'partiallySucceeded', 'failed' + :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' + :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 diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status_py3.py index 39cf294d7126..b88a746b2bc4 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_last_run_status_py3.py @@ -19,11 +19,11 @@ class ImageTemplateLastRunStatus(Model): :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: 'ready', - 'running', 'succeeded', 'partiallySucceeded', 'failed' + :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' + :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 diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor.py index e46c94eb1f46..89cab09288cd 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor.py @@ -51,4 +51,4 @@ 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' + self.type = 'ManagedImage' diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor_py3.py index e65d46742f87..47a2543dec1a 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_distributor_py3.py @@ -51,4 +51,4 @@ def __init__(self, *, run_output_name: str, image_id: str, location: str, artifa 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' + self.type = 'ManagedImage' diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source.py new file mode 100644 index 000000000000..f2ec8e78ba5c --- /dev/null +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .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/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source_py3.py new file mode 100644 index 000000000000..b7a79424ec96 --- /dev/null +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_managed_image_source_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .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/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer.py new file mode 100644 index 000000000000..dd33cf642e28 --- /dev/null +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .image_template_customizer import ImageTemplateCustomizer + + +class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer): + """Runs the specified PowerShell on the VM (Windows). Corresponds to Packer + powershell 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 script: The PowerShell script to be run for customizing. It can be + a github link, SAS URI for Azure Storage, etc + :type script: str + :param valid_exit_codes: + :type valid_exit_codes: list[int] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'script': {'key': 'script', 'type': 'str'}, + 'valid_exit_codes': {'key': 'validExitCodes', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(ImageTemplatePowerShellCustomizer, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.valid_exit_codes = kwargs.get('valid_exit_codes', None) + self.type = 'PowerShell' diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer_py3.py new file mode 100644 index 000000000000..7f992f6d9279 --- /dev/null +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .image_template_customizer_py3 import ImageTemplateCustomizer + + +class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer): + """Runs the specified PowerShell on the VM (Windows). Corresponds to Packer + powershell 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 script: The PowerShell script to be run for customizing. It can be + a github link, SAS URI for Azure Storage, etc + :type script: str + :param valid_exit_codes: + :type valid_exit_codes: list[int] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'script': {'key': 'script', 'type': 'str'}, + 'valid_exit_codes': {'key': 'validExitCodes', 'type': '[int]'}, + } + + def __init__(self, *, name: str=None, script: str=None, valid_exit_codes=None, **kwargs) -> None: + super(ImageTemplatePowerShellCustomizer, self).__init__(name=name, **kwargs) + self.script = script + self.valid_exit_codes = valid_exit_codes + self.type = 'PowerShell' diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer.py new file mode 100644 index 000000000000..1f49dde7cdc2 --- /dev/null +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer.py @@ -0,0 +1,54 @@ +# 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/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer_py3.py new file mode 100644 index 000000000000..5efe8be5055d --- /dev/null +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_restart_customizer_py3.py @@ -0,0 +1,54 @@ +# 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/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor.py index f0c08b0e6a67..3dda511aadf7 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor.py @@ -51,4 +51,4 @@ 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' + self.type = 'SharedImage' diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor_py3.py index a84dc53a1bbb..087bb5f8ca69 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shared_image_distributor_py3.py @@ -51,4 +51,4 @@ def __init__(self, *, run_output_name: str, gallery_image_id: str, replication_r 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' + self.type = 'SharedImage' diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer.py index ef2eed701582..b18e5c4ebeef 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer.py @@ -13,7 +13,7 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer): - """Runs a shell script during the customization phase. + """Runs a shell script during the customization phase (Linux). All required parameters must be populated in order to send to Azure. @@ -40,4 +40,4 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer): def __init__(self, **kwargs): super(ImageTemplateShellCustomizer, self).__init__(**kwargs) self.script = kwargs.get('script', None) - self.type = 'shell' + self.type = 'Shell' diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer_py3.py index 46d161c5c25f..fe4f5d7671cb 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer_py3.py @@ -13,7 +13,7 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer): - """Runs a shell script during the customization phase. + """Runs a shell script during the customization phase (Linux). All required parameters must be populated in order to send to Azure. @@ -40,4 +40,4 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer): def __init__(self, *, name: str=None, script: str=None, **kwargs) -> None: super(ImageTemplateShellCustomizer, self).__init__(name=name, **kwargs) self.script = script - self.type = 'shell' + self.type = 'Shell' diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source.py index e4642d4d0280..f5e47b95272a 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source.py @@ -16,7 +16,8 @@ class ImageTemplateSource(Model): """ImageTemplateSource. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateIsoSource, ImageTemplatePlatformImageSource + sub-classes are: ImageTemplateIsoSource, ImageTemplatePlatformImageSource, + ImageTemplateManagedImageSource All required parameters must be populated in order to send to Azure. @@ -33,7 +34,7 @@ class ImageTemplateSource(Model): } _subtype_map = { - 'type': {'ISO': 'ImageTemplateIsoSource', 'PlatformImage': 'ImageTemplatePlatformImageSource'} + 'type': {'ISO': 'ImageTemplateIsoSource', 'PlatformImage': 'ImageTemplatePlatformImageSource', 'ManagedImage': 'ImageTemplateManagedImageSource'} } def __init__(self, **kwargs): diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source_py3.py index 7467bb727f00..f9d556710ccb 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_source_py3.py @@ -16,7 +16,8 @@ class ImageTemplateSource(Model): """ImageTemplateSource. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTemplateIsoSource, ImageTemplatePlatformImageSource + sub-classes are: ImageTemplateIsoSource, ImageTemplatePlatformImageSource, + ImageTemplateManagedImageSource All required parameters must be populated in order to send to Azure. @@ -33,7 +34,7 @@ class ImageTemplateSource(Model): } _subtype_map = { - 'type': {'ISO': 'ImageTemplateIsoSource', 'PlatformImage': 'ImageTemplatePlatformImageSource'} + 'type': {'ISO': 'ImageTemplateIsoSource', 'PlatformImage': 'ImageTemplatePlatformImageSource', 'ManagedImage': 'ImageTemplateManagedImageSource'} } def __init__(self, **kwargs) -> None: diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor.py new file mode 100644 index 000000000000..eb7bc646f9a6 --- /dev/null +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor.py @@ -0,0 +1,43 @@ +# 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/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor_py3.py new file mode 100644 index 000000000000..e491779620ed --- /dev/null +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_vhd_distributor_py3.py @@ -0,0 +1,43 @@ +# 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/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error.py index 6324249d7c19..3582f2a763fb 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error.py @@ -15,18 +15,18 @@ class InnerError(Model): """Inner error details. - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str + :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 = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, + 'exception_type': {'key': 'exceptionType', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'str'}, } def __init__(self, **kwargs): super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) + self.exception_type = kwargs.get('exception_type', None) + self.error_detail = kwargs.get('error_detail', None) diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error_py3.py index ccec30d7b53f..a33ea33c1356 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/inner_error_py3.py @@ -15,18 +15,18 @@ class InnerError(Model): """Inner error details. - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str + :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 = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, + 'exception_type': {'key': 'exceptionType', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'str'}, } - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + def __init__(self, *, exception_type: str=None, error_detail: str=None, **kwargs) -> None: super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail + self.exception_type = exception_type + self.error_detail = error_detail diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error.py index 8e7d00f848f4..8896952275ae 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error.py @@ -17,7 +17,9 @@ class ProvisioningError(Model): :param provisioning_error_code: Error code of the provisioning failure. Possible values include: 'BadSourceType', 'BadPIRSource', 'BadISOSource', - 'BadCustomizerType', 'NoCustomizerShellScript', 'ServerError', 'Other' + 'BadManagedImageSource', '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 diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error_py3.py index 9e514ac685d2..e11e0b032d64 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/provisioning_error_py3.py @@ -17,7 +17,9 @@ class ProvisioningError(Model): :param provisioning_error_code: Error code of the provisioning failure. Possible values include: 'BadSourceType', 'BadPIRSource', 'BadISOSource', - 'BadCustomizerType', 'NoCustomizerShellScript', 'ServerError', 'Other' + 'BadManagedImageSource', '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 diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output.py index 9af6e3842d7e..5a729d7c9cd3 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output.py @@ -28,6 +28,8 @@ class RunOutput(SubResource): :vartype type: str :param artifact_id: The resource id of the artifact. :type artifact_id: str + :param artifact_location: The URL location of the artifact. + :type artifact_location: str :ivar provisioning_state: Provisioning state of the resource. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.imagebuilder.models.enum @@ -45,10 +47,12 @@ class RunOutput(SubResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'artifact_id': {'key': 'properties.artifactId', 'type': 'str'}, + 'artifact_location': {'key': 'properties.artifactLocation', '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_location = kwargs.get('artifact_location', None) self.provisioning_state = None diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_py3.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_py3.py index 1fb7b5df380c..124efcda71a6 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_py3.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_py3.py @@ -28,6 +28,8 @@ class RunOutput(SubResource): :vartype type: str :param artifact_id: The resource id of the artifact. :type artifact_id: str + :param artifact_location: The URL location of the artifact. + :type artifact_location: str :ivar provisioning_state: Provisioning state of the resource. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.imagebuilder.models.enum @@ -45,10 +47,12 @@ class RunOutput(SubResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'artifact_id': {'key': 'properties.artifactId', 'type': 'str'}, + 'artifact_location': {'key': 'properties.artifactLocation', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, name: str, artifact_id: str=None, **kwargs) -> None: + def __init__(self, *, name: str, artifact_id: str=None, artifact_location: str=None, **kwargs) -> None: super(RunOutput, self).__init__(name=name, **kwargs) self.artifact_id = artifact_id + self.artifact_location = artifact_location self.provisioning_state = None diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/__init__.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/__init__.py index cb884ca55d72..c33bd5d27ebb 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/__init__.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/__init__.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .virtual_machine_image_template_operations import VirtualMachineImageTemplateOperations +from .virtual_machine_image_templates_operations import VirtualMachineImageTemplatesOperations from .operations import Operations __all__ = [ - 'VirtualMachineImageTemplateOperations', + 'VirtualMachineImageTemplatesOperations', 'Operations', ] diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/operations.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/operations.py index e0a197b8c9f4..8d4e3c85810c 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/operations.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-02-01-preview". + :ivar api_version: Client Api Version. Constant value: "2019-02-01-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-02-01-preview" + self.api_version = "2019-02-01-preview" self.config = config diff --git a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/virtual_machine_image_template_operations.py b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/virtual_machine_image_templates_operations.py similarity index 98% rename from azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/virtual_machine_image_template_operations.py rename to azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/virtual_machine_image_templates_operations.py index 581fbee90938..c02049c88774 100644 --- a/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/virtual_machine_image_template_operations.py +++ b/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/virtual_machine_image_templates_operations.py @@ -17,14 +17,14 @@ from .. import models -class VirtualMachineImageTemplateOperations(object): - """VirtualMachineImageTemplateOperations operations. +class VirtualMachineImageTemplatesOperations(object): + """VirtualMachineImageTemplatesOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-02-01-preview". + :ivar api_version: Client Api Version. Constant value: "2019-02-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-02-01-preview" + self.api_version = "2019-02-01-preview" self.config = config @@ -221,9 +221,10 @@ def _create_or_update_initial( def create_or_update( self, parameters, resource_group_name, image_template_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or Update a Virtual Machine Image Template. + """Create or update a virtual machine image template. - :param parameters: Parameters supplied to the Create Image Template + :param parameters: Parameters supplied to the CreateImageTemplate + operation :type parameters: ~azure.mgmt.imagebuilder.models.ImageTemplate :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -342,7 +343,7 @@ def update( def get( self, resource_group_name, image_template_name, custom_headers=None, raw=False, **operation_config): - """Get Information about Virtual Machine Image Template. + """Get information about a virtual machine image template. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -439,7 +440,7 @@ def _delete_initial( def delete( self, resource_group_name, image_template_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete Virtual Machine Image Template. + """Delete a virtual machine image template. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -517,7 +518,7 @@ def _run_initial( def run( self, resource_group_name, image_template_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Create artifacts from a existing Image Template. + """Create artifacts from a existing image template. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -628,7 +629,7 @@ def internal_paging(next_link=None, raw=False): def get_run_output( self, resource_group_name, image_template_name, run_output_name, custom_headers=None, raw=False, **operation_config): - """Get the specified run output for the specified Template resource. + """Get the specified run output for the specified image template resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str