From 456ee291131b0e16c32162dfe95aefbb3b6dcc82 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 2 Aug 2019 11:18:13 -0700 Subject: [PATCH] [AutoPR compute/resource-manager] Add missing Gallery Application API in 2019-07-01 version (#6512) * Generated from 01293ebd64fa96d11d30d9b0ef1391cbe8e62443 Add missing Gallery Application API in 2019-07-01 version * Generated from 6637309053b80e0b62b01f1c240d72749e30f1c2 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs --- .../compute/v2019_03_01/models/__init__.py | 6 ++ .../compute/v2019_03_01/models/_models.py | 62 ++++++++++++++++- .../compute/v2019_03_01/models/_models_py3.py | 66 +++++++++++++++++-- ...irtual_machine_scale_set_vms_operations.py | 8 ++- 4 files changed, 133 insertions(+), 9 deletions(-) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py index f12266d5ba5..090f6dc0c18 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py @@ -97,6 +97,7 @@ from ._models_py3 import RunCommandInputParameter from ._models_py3 import RunCommandParameterDefinition from ._models_py3 import RunCommandResult + from ._models_py3 import ScheduledEventsProfile from ._models_py3 import Sku from ._models_py3 import SshConfiguration from ._models_py3 import SshPublicKey @@ -104,6 +105,7 @@ from ._models_py3 import SubResource from ._models_py3 import SubResourceReadOnly from ._models_py3 import TargetRegion + from ._models_py3 import TerminateNotificationProfile from ._models_py3 import ThrottledRequestsInput from ._models_py3 import UpdateResource from ._models_py3 import UpgradeOperationHistoricalStatusInfo @@ -268,6 +270,7 @@ from ._models import RunCommandInputParameter from ._models import RunCommandParameterDefinition from ._models import RunCommandResult + from ._models import ScheduledEventsProfile from ._models import Sku from ._models import SshConfiguration from ._models import SshPublicKey @@ -275,6 +278,7 @@ from ._models import SubResource from ._models import SubResourceReadOnly from ._models import TargetRegion + from ._models import TerminateNotificationProfile from ._models import ThrottledRequestsInput from ._models import UpdateResource from ._models import UpgradeOperationHistoricalStatusInfo @@ -497,6 +501,7 @@ 'RunCommandInputParameter', 'RunCommandParameterDefinition', 'RunCommandResult', + 'ScheduledEventsProfile', 'Sku', 'SshConfiguration', 'SshPublicKey', @@ -504,6 +509,7 @@ 'SubResource', 'SubResourceReadOnly', 'TargetRegion', + 'TerminateNotificationProfile', 'ThrottledRequestsInput', 'UpdateResource', 'UpgradeOperationHistoricalStatusInfo', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py index 12291b05dde..ed16b97166d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py @@ -1561,8 +1561,9 @@ class GalleryImage(Resource): **Linux**. Possible values include: 'Windows', 'Linux' :type os_type: str or ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param os_state: Required. The allowed values for OS State are - 'Generalized'. Possible values include: 'Generalized', 'Specialized' + :param os_state: Required. This property allows the user to specify + whether the virtual machines created under this image are 'Generalized' or + 'Specialized'. Possible values include: 'Generalized', 'Specialized' :type os_state: str or ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes :param end_of_life_date: The end of life date of the gallery Image @@ -1791,7 +1792,7 @@ def __init__(self, **kwargs): class GalleryImageVersionStorageProfile(Model): - """This is the storage profile of a gallery Image Version. + """This is the storage profile of a Gallery Image Version. Variables are only populated by the server, and will be ignored when sending a request. @@ -3633,6 +3634,24 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) +class ScheduledEventsProfile(Model): + """ScheduledEventsProfile. + + :param terminate_notification_profile: Specifies Terminate Scheduled Event + related configurations. + :type terminate_notification_profile: + ~azure.mgmt.compute.v2019_03_01.models.TerminateNotificationProfile + """ + + _attribute_map = { + 'terminate_notification_profile': {'key': 'terminateNotificationProfile', 'type': 'TerminateNotificationProfile'}, + } + + def __init__(self, **kwargs): + super(ScheduledEventsProfile, self).__init__(**kwargs) + self.terminate_notification_profile = kwargs.get('terminate_notification_profile', None) + + class Sku(Model): """Describes a virtual machine scale set sku. @@ -3796,6 +3815,31 @@ def __init__(self, **kwargs): self.storage_account_type = kwargs.get('storage_account_type', None) +class TerminateNotificationProfile(Model): + """TerminateNotificationProfile. + + :param not_before_timeout: Configurable length of time a Virtual Machine + being deleted will have to potentially approve the Terminate Scheduled + Event before the event is auto approved (timed out). The configuration + must be specified in ISO 8601 format, the default value is 5 minutes + (PT5M) + :type not_before_timeout: str + :param enable: Specifies whether the Terminate Scheduled event is enabled + or disabled. + :type enable: bool + """ + + _attribute_map = { + 'not_before_timeout': {'key': 'notBeforeTimeout', 'type': 'str'}, + 'enable': {'key': 'enable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(TerminateNotificationProfile, self).__init__(**kwargs) + self.not_before_timeout = kwargs.get('not_before_timeout', None) + self.enable = kwargs.get('enable', None) + + class ThrottledRequestsInput(LogAnalyticsInputBase): """Api request input for LogAnalytics getThrottledRequests Api. @@ -6336,6 +6380,10 @@ class VirtualMachineScaleSetUpdateVMProfile(Model): :param license_type: The license type, which is for bring your own license scenario. :type license_type: str + :param scheduled_events_profile: Specifies Scheduled Event related + configurations. + :type scheduled_events_profile: + ~azure.mgmt.compute.v2019_03_01.models.ScheduledEventsProfile """ _attribute_map = { @@ -6345,6 +6393,7 @@ class VirtualMachineScaleSetUpdateVMProfile(Model): 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'scheduled_events_profile': {'key': 'scheduledEventsProfile', 'type': 'ScheduledEventsProfile'}, } def __init__(self, **kwargs): @@ -6355,6 +6404,7 @@ def __init__(self, **kwargs): self.diagnostics_profile = kwargs.get('diagnostics_profile', None) self.extension_profile = kwargs.get('extension_profile', None) self.license_type = kwargs.get('license_type', None) + self.scheduled_events_profile = kwargs.get('scheduled_events_profile', None) class VirtualMachineScaleSetVM(Resource): @@ -6736,6 +6786,10 @@ class VirtualMachineScaleSetVMProfile(Model): 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' :type eviction_policy: str or ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineEvictionPolicyTypes + :param scheduled_events_profile: Specifies Scheduled Event related + configurations. + :type scheduled_events_profile: + ~azure.mgmt.compute.v2019_03_01.models.ScheduledEventsProfile """ _attribute_map = { @@ -6747,6 +6801,7 @@ class VirtualMachineScaleSetVMProfile(Model): 'license_type': {'key': 'licenseType', 'type': 'str'}, 'priority': {'key': 'priority', 'type': 'str'}, 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + 'scheduled_events_profile': {'key': 'scheduledEventsProfile', 'type': 'ScheduledEventsProfile'}, } def __init__(self, **kwargs): @@ -6759,6 +6814,7 @@ def __init__(self, **kwargs): self.license_type = kwargs.get('license_type', None) self.priority = kwargs.get('priority', None) self.eviction_policy = kwargs.get('eviction_policy', None) + self.scheduled_events_profile = kwargs.get('scheduled_events_profile', None) class VirtualMachineScaleSetVMProtectionPolicy(Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py index f7d01ae1d2d..d1c4b4a7604 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py @@ -1561,8 +1561,9 @@ class GalleryImage(Resource): **Linux**. Possible values include: 'Windows', 'Linux' :type os_type: str or ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param os_state: Required. The allowed values for OS State are - 'Generalized'. Possible values include: 'Generalized', 'Specialized' + :param os_state: Required. This property allows the user to specify + whether the virtual machines created under this image are 'Generalized' or + 'Specialized'. Possible values include: 'Generalized', 'Specialized' :type os_state: str or ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes :param end_of_life_date: The end of life date of the gallery Image @@ -1791,7 +1792,7 @@ def __init__(self, *, source, target_regions=None, replica_count: int=None, excl class GalleryImageVersionStorageProfile(Model): - """This is the storage profile of a gallery Image Version. + """This is the storage profile of a Gallery Image Version. Variables are only populated by the server, and will be ignored when sending a request. @@ -3633,6 +3634,24 @@ def __init__(self, *, value=None, **kwargs) -> None: self.value = value +class ScheduledEventsProfile(Model): + """ScheduledEventsProfile. + + :param terminate_notification_profile: Specifies Terminate Scheduled Event + related configurations. + :type terminate_notification_profile: + ~azure.mgmt.compute.v2019_03_01.models.TerminateNotificationProfile + """ + + _attribute_map = { + 'terminate_notification_profile': {'key': 'terminateNotificationProfile', 'type': 'TerminateNotificationProfile'}, + } + + def __init__(self, *, terminate_notification_profile=None, **kwargs) -> None: + super(ScheduledEventsProfile, self).__init__(**kwargs) + self.terminate_notification_profile = terminate_notification_profile + + class Sku(Model): """Describes a virtual machine scale set sku. @@ -3796,6 +3815,31 @@ def __init__(self, *, name: str, regional_replica_count: int=None, storage_accou self.storage_account_type = storage_account_type +class TerminateNotificationProfile(Model): + """TerminateNotificationProfile. + + :param not_before_timeout: Configurable length of time a Virtual Machine + being deleted will have to potentially approve the Terminate Scheduled + Event before the event is auto approved (timed out). The configuration + must be specified in ISO 8601 format, the default value is 5 minutes + (PT5M) + :type not_before_timeout: str + :param enable: Specifies whether the Terminate Scheduled event is enabled + or disabled. + :type enable: bool + """ + + _attribute_map = { + 'not_before_timeout': {'key': 'notBeforeTimeout', 'type': 'str'}, + 'enable': {'key': 'enable', 'type': 'bool'}, + } + + def __init__(self, *, not_before_timeout: str=None, enable: bool=None, **kwargs) -> None: + super(TerminateNotificationProfile, self).__init__(**kwargs) + self.not_before_timeout = not_before_timeout + self.enable = enable + + class ThrottledRequestsInput(LogAnalyticsInputBase): """Api request input for LogAnalytics getThrottledRequests Api. @@ -6336,6 +6380,10 @@ class VirtualMachineScaleSetUpdateVMProfile(Model): :param license_type: The license type, which is for bring your own license scenario. :type license_type: str + :param scheduled_events_profile: Specifies Scheduled Event related + configurations. + :type scheduled_events_profile: + ~azure.mgmt.compute.v2019_03_01.models.ScheduledEventsProfile """ _attribute_map = { @@ -6345,9 +6393,10 @@ class VirtualMachineScaleSetUpdateVMProfile(Model): 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'scheduled_events_profile': {'key': 'scheduledEventsProfile', 'type': 'ScheduledEventsProfile'}, } - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, scheduled_events_profile=None, **kwargs) -> None: super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) self.os_profile = os_profile self.storage_profile = storage_profile @@ -6355,6 +6404,7 @@ def __init__(self, *, os_profile=None, storage_profile=None, network_profile=Non self.diagnostics_profile = diagnostics_profile self.extension_profile = extension_profile self.license_type = license_type + self.scheduled_events_profile = scheduled_events_profile class VirtualMachineScaleSetVM(Resource): @@ -6736,6 +6786,10 @@ class VirtualMachineScaleSetVMProfile(Model): 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' :type eviction_policy: str or ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineEvictionPolicyTypes + :param scheduled_events_profile: Specifies Scheduled Event related + configurations. + :type scheduled_events_profile: + ~azure.mgmt.compute.v2019_03_01.models.ScheduledEventsProfile """ _attribute_map = { @@ -6747,9 +6801,10 @@ class VirtualMachineScaleSetVMProfile(Model): 'license_type': {'key': 'licenseType', 'type': 'str'}, 'priority': {'key': 'priority', 'type': 'str'}, 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + 'scheduled_events_profile': {'key': 'scheduledEventsProfile', 'type': 'ScheduledEventsProfile'}, } - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, scheduled_events_profile=None, **kwargs) -> None: super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) self.os_profile = os_profile self.storage_profile = storage_profile @@ -6759,6 +6814,7 @@ def __init__(self, *, os_profile=None, storage_profile=None, network_profile=Non self.license_type = license_type self.priority = priority self.eviction_policy = eviction_policy + self.scheduled_events_profile = scheduled_events_profile class VirtualMachineScaleSetVMProtectionPolicy(Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_vms_operations.py index f995fbbb042..51c834d9c10 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_vms_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_vms_operations.py @@ -506,7 +506,7 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, vm_scale_set_name, instance_id, expand=None, custom_headers=None, raw=False, **operation_config): """Gets a virtual machine from a VM scale set. :param resource_group_name: The name of the resource group. @@ -515,6 +515,10 @@ def get( :type vm_scale_set_name: str :param instance_id: The instance ID of the virtual machine. :type instance_id: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2019_03_01.models.InstanceViewTypes :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -538,6 +542,8 @@ def get( # Construct parameters query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers