Skip to content

Commit

Permalink
Generated from 796ebc9f7d0be44caec229a6dccaeafaa80d72e6
Browse files Browse the repository at this point in the history
Add imagebuilder/2019-02-01-preview
  • Loading branch information
AutorestCI committed Feb 27, 2019
1 parent fbe44de commit 2b76a36
Show file tree
Hide file tree
Showing 36 changed files with 473 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ImageBuilderClientConfiguration(AzureConfiguration):
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
: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
Expand Down Expand Up @@ -67,7 +67,7 @@ class ImageBuilderClient(SDKClient):
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
: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
Expand All @@ -80,7 +80,7 @@ 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)

Expand Down
12 changes: 12 additions & 0 deletions azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -64,9 +72,13 @@
'ImageTemplate',
'ImageTemplateIsoSource',
'ImageTemplatePlatformImageSource',
'ImageTemplateManagedImageSource',
'ImageTemplateShellCustomizer',
'ImageTemplateRestartCustomizer',
'ImageTemplatePowerShellCustomizer',
'ImageTemplateManagedImageDistributor',
'ImageTemplateSharedImageDistributor',
'ImageTemplateVhdDistributor',
'ImageTemplateUpdateParameters',
'RunOutput',
'Resource',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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'},
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -37,7 +38,7 @@ class ImageTemplateCustomizer(Model):
}

_subtype_map = {
'type': {'shell': 'ImageTemplateShellCustomizer'}
'type': {'Shell': 'ImageTemplateShellCustomizer', 'WindowsRestart': 'ImageTemplateRestartCustomizer', 'PowerShell': 'ImageTemplatePowerShellCustomizer'}
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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 PowerSehll 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'
Loading

0 comments on commit 2b76a36

Please sign in to comment.