From 3892f3ca5c9be2f3bd4fef370a3add6760d7562b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 21 Jun 2021 03:00:06 +0000 Subject: [PATCH] CodeGen from PR 14782 in Azure/azure-rest-api-specs Fix PublicIP Sku property names (#14782) * Fix public IP sku name and Tier property names * remove required property to match NRP swagger spec * update example file Co-authored-by: Bashar Gharaibeh --- sdk/compute/azure-mgmt-compute/_meta.json | 8 +- .../mgmt/compute/v2015_06_15/_version.py | 2 +- .../compute/v2015_06_15/models/_models.py | 27 +- .../compute/v2015_06_15/models/_models_py3.py | 29 +- .../mgmt/compute/v2016_03_30/_version.py | 2 +- .../compute/v2016_03_30/models/_models.py | 51 ++-- .../compute/v2016_03_30/models/_models_py3.py | 57 ++-- .../compute/v2016_04_30_preview/_version.py | 2 +- .../v2016_04_30_preview/models/_models.py | 51 ++-- .../v2016_04_30_preview/models/_models_py3.py | 57 ++-- .../mgmt/compute/v2017_03_30/_version.py | 2 +- .../compute/v2017_03_30/models/_models.py | 58 ++-- .../compute/v2017_03_30/models/_models_py3.py | 64 ++-- .../mgmt/compute/v2017_09_01/_version.py | 2 +- .../mgmt/compute/v2017_12_01/_version.py | 2 +- .../compute/v2017_12_01/models/_models.py | 27 +- .../compute/v2017_12_01/models/_models_py3.py | 29 +- .../mgmt/compute/v2018_04_01/_version.py | 2 +- .../compute/v2018_04_01/models/_models.py | 27 +- .../compute/v2018_04_01/models/_models_py3.py | 29 +- .../mgmt/compute/v2018_06_01/_version.py | 2 +- .../compute/v2018_06_01/models/_models.py | 27 +- .../compute/v2018_06_01/models/_models_py3.py | 29 +- .../mgmt/compute/v2018_09_30/_version.py | 2 +- .../mgmt/compute/v2018_10_01/_version.py | 2 +- .../compute/v2018_10_01/models/_models.py | 27 +- .../compute/v2018_10_01/models/_models_py3.py | 29 +- .../mgmt/compute/v2019_03_01/_version.py | 2 +- .../compute/v2019_03_01/models/_models.py | 27 +- .../compute/v2019_03_01/models/_models_py3.py | 29 +- .../mgmt/compute/v2019_04_01/_version.py | 2 +- .../mgmt/compute/v2019_07_01/_version.py | 2 +- .../compute/v2019_07_01/models/_models.py | 27 +- .../compute/v2019_07_01/models/_models_py3.py | 29 +- .../mgmt/compute/v2019_11_01/_version.py | 2 +- .../mgmt/compute/v2019_12_01/_version.py | 2 +- .../compute/v2019_12_01/models/_models.py | 27 +- .../compute/v2019_12_01/models/_models_py3.py | 29 +- .../mgmt/compute/v2020_05_01/_version.py | 2 +- .../mgmt/compute/v2020_06_01/_version.py | 2 +- .../_compute_management_client_enums.py | 9 +- .../compute/v2020_06_01/models/_models.py | 34 +-- .../compute/v2020_06_01/models/_models_py3.py | 36 +-- .../mgmt/compute/v2020_06_30/_version.py | 2 +- .../mgmt/compute/v2020_09_30/_version.py | 2 +- .../compute/v2020_10_01_preview/_version.py | 2 +- .../mgmt/compute/v2020_12_01/_version.py | 2 +- .../_disk_restore_point_operations.py | 277 ++++++++++++++++- .../_compute_management_client_enums.py | 15 +- .../compute/v2020_12_01/models/_models.py | 50 ++-- .../compute/v2020_12_01/models/_models_py3.py | 53 ++-- .../_disk_restore_point_operations.py | 281 +++++++++++++++++- .../mgmt/compute/v2021_03_01/_version.py | 2 +- .../_compute_management_client_enums.py | 15 +- .../compute/v2021_03_01/models/_models.py | 76 ++--- .../compute/v2021_03_01/models/_models_py3.py | 83 ++---- 56 files changed, 1050 insertions(+), 717 deletions(-) diff --git a/sdk/compute/azure-mgmt-compute/_meta.json b/sdk/compute/azure-mgmt-compute/_meta.json index 82a3ac28882f..47e1d99ff3b5 100644 --- a/sdk/compute/azure-mgmt-compute/_meta.json +++ b/sdk/compute/azure-mgmt-compute/_meta.json @@ -1,11 +1,11 @@ { "autorest": "3.4.2", "use": [ - "@autorest/python@5.8.0", - "@autorest/modelerfour@4.19.1" + "@autorest/python@5.8.1", + "@autorest/modelerfour@4.19.2" ], - "commit": "f69f2e8053ac8ae352b11c33655234dea4cf4cfd", + "commit": "d92047595da0e0410925301c7d1174c3296e3ebe", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/compute/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.1 --version=3.4.2", + "autorest_command": "autorest specification/compute/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.1 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", "readme": "specification/compute/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models.py index 783545e5cc9f..2f0fb94f0a74 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models.py @@ -12,14 +12,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -30,11 +29,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -42,14 +36,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -1281,7 +1274,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py index 3ce4fa7ce0c3..c3f8f15eece3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py @@ -17,14 +17,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -35,11 +34,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -47,17 +41,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -1415,7 +1410,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models.py index 08f19615d477..fa42feb52414 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models.py @@ -12,14 +12,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -30,11 +29,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -42,14 +36,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -1283,7 +1276,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int @@ -1912,16 +1905,15 @@ class VirtualMachineIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine. Currently, the only supported - type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine. Currently, the only supported + type is 'SystemAssigned', which implicitly creates an identity. The only acceptable values to + pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -1930,8 +1922,6 @@ class VirtualMachineIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, **kwargs @@ -1939,6 +1929,7 @@ def __init__( super(VirtualMachineIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = kwargs.get('type', None) class VirtualMachineImageResource(SubResource): @@ -2263,16 +2254,15 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine scale set. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine scale set. Currently, the only - supported type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine scale set. Currently, the only + supported type is 'SystemAssigned', which implicitly creates an identity. The only acceptable + values to pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -2281,8 +2271,6 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, **kwargs @@ -2290,6 +2278,7 @@ def __init__( super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = kwargs.get('type', None) class VirtualMachineScaleSetInstanceView(msrest.serialization.Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py index ebada6ab315f..82a7d3a6e9dd 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py @@ -17,14 +17,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -35,11 +34,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -47,17 +41,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -1417,7 +1412,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int @@ -2124,16 +2119,15 @@ class VirtualMachineIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine. Currently, the only supported - type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine. Currently, the only supported + type is 'SystemAssigned', which implicitly creates an identity. The only acceptable values to + pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -2142,15 +2136,16 @@ class VirtualMachineIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, + *, + type: Optional[str] = None, **kwargs ): super(VirtualMachineIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = type class VirtualMachineImageResource(SubResource): @@ -2519,16 +2514,15 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine scale set. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine scale set. Currently, the only - supported type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine scale set. Currently, the only + supported type is 'SystemAssigned', which implicitly creates an identity. The only acceptable + values to pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -2537,15 +2531,16 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, + *, + type: Optional[str] = None, **kwargs ): super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = type class VirtualMachineScaleSetInstanceView(msrest.serialization.Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models.py index b02d3dca8a05..9ba7793e42cb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models.py @@ -37,14 +37,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -55,11 +54,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -67,14 +61,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -2154,7 +2147,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int @@ -2786,16 +2779,15 @@ class VirtualMachineIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine. Currently, the only supported - type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine. Currently, the only supported + type is 'SystemAssigned', which implicitly creates an identity. The only acceptable values to + pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -2804,8 +2796,6 @@ class VirtualMachineIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, **kwargs @@ -2813,6 +2803,7 @@ def __init__( super(VirtualMachineIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = kwargs.get('type', None) class VirtualMachineImageResource(SubResource): @@ -3212,16 +3203,15 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine scale set. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine scale set. Currently, the only - supported type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine scale set. Currently, the only + supported type is 'SystemAssigned', which implicitly creates an identity. The only acceptable + values to pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -3230,8 +3220,6 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, **kwargs @@ -3239,6 +3227,7 @@ def __init__( super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = kwargs.get('type', None) class VirtualMachineScaleSetInstanceView(msrest.serialization.Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py index 67561f8ebeb4..019c3cf83170 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py @@ -42,14 +42,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -60,11 +59,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -72,17 +66,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -2384,7 +2379,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int @@ -3094,16 +3089,15 @@ class VirtualMachineIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine. Currently, the only supported - type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine. Currently, the only supported + type is 'SystemAssigned', which implicitly creates an identity. The only acceptable values to + pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -3112,15 +3106,16 @@ class VirtualMachineIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, + *, + type: Optional[str] = None, **kwargs ): super(VirtualMachineIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = type class VirtualMachineImageResource(SubResource): @@ -3572,16 +3567,15 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine scale set. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine scale set. Currently, the only - supported type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine scale set. Currently, the only + supported type is 'SystemAssigned', which implicitly creates an identity. The only acceptable + values to pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -3590,15 +3584,16 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, + *, + type: Optional[str] = None, **kwargs ): super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = type class VirtualMachineScaleSetInstanceView(msrest.serialization.Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models.py index 46b5b397faeb..8ba7eff42f6f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models.py @@ -37,14 +37,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -55,11 +54,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -67,14 +61,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -2075,7 +2068,8 @@ class ResourceSkuRestrictions(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The type of restrictions. Default value: "Location". + :ivar type: The type of restrictions. The only acceptable values to pass in are None and + "Location". The default value is None. :vartype type: str :ivar values: The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. @@ -2087,7 +2081,7 @@ class ResourceSkuRestrictions(msrest.serialization.Model): """ _validation = { - 'type': {'readonly': True, 'constant': True}, + 'type': {'readonly': True}, 'values': {'readonly': True}, 'reason_code': {'readonly': True}, } @@ -2098,8 +2092,6 @@ class ResourceSkuRestrictions(msrest.serialization.Model): 'reason_code': {'key': 'reasonCode', 'type': 'str'}, } - type = "Location" - def __init__( self, **kwargs @@ -2970,7 +2962,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int @@ -3628,16 +3620,15 @@ class VirtualMachineIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine. Currently, the only supported - type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine. Currently, the only supported + type is 'SystemAssigned', which implicitly creates an identity. The only acceptable values to + pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -3646,8 +3637,6 @@ class VirtualMachineIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, **kwargs @@ -3655,6 +3644,7 @@ def __init__( super(VirtualMachineIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = kwargs.get('type', None) class VirtualMachineImageResource(SubResource): @@ -4101,16 +4091,15 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine scale set. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine scale set. Currently, the only - supported type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine scale set. Currently, the only + supported type is 'SystemAssigned', which implicitly creates an identity. The only acceptable + values to pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -4119,8 +4108,6 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, **kwargs @@ -4128,6 +4115,7 @@ def __init__( super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = kwargs.get('type', None) class VirtualMachineScaleSetInstanceView(msrest.serialization.Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py index a57293ad39f0..2a88b0945e9d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py @@ -42,14 +42,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -60,11 +59,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -72,17 +66,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -2281,7 +2276,8 @@ class ResourceSkuRestrictions(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The type of restrictions. Default value: "Location". + :ivar type: The type of restrictions. The only acceptable values to pass in are None and + "Location". The default value is None. :vartype type: str :ivar values: The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. @@ -2293,7 +2289,7 @@ class ResourceSkuRestrictions(msrest.serialization.Model): """ _validation = { - 'type': {'readonly': True, 'constant': True}, + 'type': {'readonly': True}, 'values': {'readonly': True}, 'reason_code': {'readonly': True}, } @@ -2304,8 +2300,6 @@ class ResourceSkuRestrictions(msrest.serialization.Model): 'reason_code': {'key': 'reasonCode', 'type': 'str'}, } - type = "Location" - def __init__( self, **kwargs @@ -3256,7 +3250,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int @@ -3993,16 +3987,15 @@ class VirtualMachineIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine. Currently, the only supported - type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine. Currently, the only supported + type is 'SystemAssigned', which implicitly creates an identity. The only acceptable values to + pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -4011,15 +4004,16 @@ class VirtualMachineIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, + *, + type: Optional[str] = None, **kwargs ): super(VirtualMachineIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = type class VirtualMachineImageResource(SubResource): @@ -4524,16 +4518,15 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine scale set. :vartype tenant_id: str - :ivar type: The type of identity used for the virtual machine scale set. Currently, the only - supported type is 'SystemAssigned', which implicitly creates an identity. Default value: - "SystemAssigned". - :vartype type: str + :param type: The type of identity used for the virtual machine scale set. Currently, the only + supported type is 'SystemAssigned', which implicitly creates an identity. The only acceptable + values to pass in are None and "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -4542,15 +4535,16 @@ class VirtualMachineScaleSetIdentity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, + *, + type: Optional[str] = None, **kwargs ): super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = type class VirtualMachineScaleSetInstanceView(msrest.serialization.Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models.py index 0548f6dc4e1b..f6737d43cd9e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models.py @@ -12,14 +12,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -30,11 +29,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -42,14 +36,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -2723,7 +2716,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py index 83b3b709519e..b97c563489fe 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py @@ -17,14 +17,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -35,11 +34,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -47,17 +41,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -2980,7 +2975,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models.py index 4fd908ad2ab2..4148fa117a9e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models.py @@ -37,14 +37,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -55,11 +54,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -67,14 +61,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -3347,7 +3340,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py index 57ebb3e376ba..21ab53d3efd9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py @@ -42,14 +42,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -60,11 +59,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -72,17 +66,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -3676,7 +3671,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py index 88124dd0f194..ec222c04dca3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py @@ -59,14 +59,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -77,11 +76,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -89,14 +83,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -4262,7 +4255,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py index e02dcb752082..24d4961e4b82 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py @@ -66,14 +66,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -84,11 +83,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -96,17 +90,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -4666,7 +4661,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py index 91590daa2e31..cfc3e09ff56a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py @@ -34,14 +34,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -52,11 +51,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -64,14 +58,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -2868,7 +2861,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py index 8eff37093a44..e7fc3b7ad2c7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py @@ -41,14 +41,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -59,11 +58,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -71,17 +65,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -3146,7 +3141,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" 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 f75cf6248ab1..3da31d2b9268 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 @@ -59,14 +59,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -77,11 +76,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -89,14 +83,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -5212,7 +5205,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int 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 5953c50c8eeb..1166f988a132 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 @@ -66,14 +66,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -84,11 +83,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -96,17 +90,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -5709,7 +5704,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py index b98735b6b009..a4b45e60be4c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py @@ -59,14 +59,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -77,11 +76,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -89,14 +83,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -5832,7 +5825,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py index b69c83336527..f58b276eb4fe 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py @@ -66,14 +66,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -84,11 +83,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -96,17 +90,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -6416,7 +6411,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models.py index c71777a5e30c..78da23f52f11 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models.py @@ -34,14 +34,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -52,11 +51,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -64,14 +58,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -5329,7 +5322,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py index 8f4bf037e8fc..b25418d57c72 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py @@ -41,14 +41,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -59,11 +58,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -71,17 +65,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -5850,7 +5845,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py index 7e1426650c96..8858d5c7fd34 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py @@ -300,11 +300,10 @@ class StatusLevelTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ERROR = "Error" class StorageAccountTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the storage account type for the managed disk. Managed OS disk storage account type - can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data - disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses - Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. For more information - regarding disks supported for Windows Virtual Machines, refer to + """Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used + with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. + StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. + For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/en-us/azure/virtual-machines/linux/disks-types diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py index c4b75df8cf9c..bf5371f12dfa 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py @@ -34,14 +34,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -52,11 +51,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -64,14 +58,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -2349,9 +2342,10 @@ class ManagedDiskParameters(SubResource): :param id: Resource Id. :type id: str - :param storage_account_type: Specifies the storage account type for the managed disk. NOTE: - UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values - include: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS". + :param storage_account_type: Specifies the storage account type for the managed disk. Managed + OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS + can only be used with data disks, it cannot be used with OS Disk. Possible values include: + "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS". :type storage_account_type: str or ~azure.mgmt.compute.v2020_06_01.models.StorageAccountTypes :param disk_encryption_set: Specifies the customer managed disk encryption set resource id for the managed disk. @@ -4124,7 +4118,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py index 554f12ce832a..0e2e7801bf95 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py @@ -41,14 +41,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -59,11 +58,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -71,17 +65,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -2571,9 +2566,10 @@ class ManagedDiskParameters(SubResource): :param id: Resource Id. :type id: str - :param storage_account_type: Specifies the storage account type for the managed disk. NOTE: - UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values - include: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS". + :param storage_account_type: Specifies the storage account type for the managed disk. Managed + OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS + can only be used with data disks, it cannot be used with OS Disk. Possible values include: + "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS". :type storage_account_type: str or ~azure.mgmt.compute.v2020_06_01.models.StorageAccountTypes :param disk_encryption_set: Specifies the customer managed disk encryption set resource id for the managed disk. @@ -4504,7 +4500,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_disk_restore_point_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_disk_restore_point_operations.py index ce7eb0e1a7c2..0c4508028135 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_disk_restore_point_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_disk_restore_point_operations.py @@ -5,14 +5,16 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models @@ -193,3 +195,276 @@ async def get_next(next_link=None): get_next, extract_data ) list_by_restore_point.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints'} # type: ignore + + async def _grant_access_initial( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + disk_restore_point_name: str, + grant_access_data: "_models.GrantAccessData", + **kwargs: Any + ) -> Optional["_models.AccessUri"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AccessUri"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._grant_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _grant_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess'} # type: ignore + + async def begin_grant_access( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + disk_restore_point_name: str, + grant_access_data: "_models.GrantAccessData", + **kwargs: Any + ) -> AsyncLROPoller["_models.AccessUri"]: + """Grants access to a diskRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum + name length is 80 characters. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + 80 characters. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + :type disk_restore_point_name: str + :param grant_access_data: Access data object supplied in the body of the get disk access + operation. + :type grant_access_data: ~azure.mgmt.compute.v2020_12_01.models.GrantAccessData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AccessUri or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2020_12_01.models.AccessUri] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessUri"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._grant_access_initial( + resource_group_name=resource_group_name, + restore_point_collection_name=restore_point_collection_name, + vm_restore_point_name=vm_restore_point_name, + disk_restore_point_name=disk_restore_point_name, + grant_access_data=grant_access_data, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess'} # type: ignore + + async def _revoke_access_initial( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + disk_restore_point_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._revoke_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _revoke_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess'} # type: ignore + + async def begin_revoke_access( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + disk_restore_point_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Revokes access to a diskRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum + name length is 80 characters. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + 80 characters. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + :type disk_restore_point_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._revoke_access_initial( + resource_group_name=resource_group_name, + restore_point_collection_name=restore_point_collection_name, + vm_restore_point_name=vm_restore_point_name, + disk_restore_point_name=disk_restore_point_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_compute_management_client_enums.py index 9b54fe79da5c..2591cfd552a0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_compute_management_client_enums.py @@ -464,14 +464,13 @@ class StatusLevelTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ERROR = "Error" class StorageAccountTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the storage account type for the managed disk. Managed OS disk storage account type - can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data - disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses - Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses - Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. - For more information regarding disks supported for Windows Virtual Machines, refer to - https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types and, for Linux - Virtual Machines, refer to + """Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used + with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. + StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. + Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone + redundant storage. For more information regarding disks supported for Windows Virtual Machines, + refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types and, for + Linux Virtual Machines, refer to https://docs.microsoft.com/en-us/azure/virtual-machines/linux/disks-types """ diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models.py index f2fe9a714022..605adf0166fd 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models.py @@ -59,14 +59,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -77,11 +76,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -89,14 +83,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -3607,9 +3600,10 @@ class ManagedDiskParameters(SubResource): :param id: Resource Id. :type id: str - :param storage_account_type: Specifies the storage account type for the managed disk. NOTE: - UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values - include: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", + :param storage_account_type: Specifies the storage account type for the managed disk. Managed + OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS + can only be used with data disks, it cannot be used with OS Disk. Possible values include: + "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", "StandardSSD_ZRS". :type storage_account_type: str or ~azure.mgmt.compute.v2020_12_01.models.StorageAccountTypes :param disk_encryption_set: Specifies the customer managed disk encryption set resource id for @@ -5184,8 +5178,6 @@ def __init__( class SecurityProfile(msrest.serialization.Model): """Specifies the Security profile settings for the virtual machine or virtual machine scale set. - Variables are only populated by the server, and will be ignored when sending a request. - :param uefi_settings: Specifies the security settings like secure boot and vTPM used while creating the virtual machine. :code:`
`:code:`
`Minimum api-version: 2020-12-01. :type uefi_settings: ~azure.mgmt.compute.v2020_12_01.models.UefiSettings @@ -5195,24 +5187,19 @@ class SecurityProfile(msrest.serialization.Model): :code:`
`:code:`
` Default: The Encryption at host will be disabled unless this property is set to true for the resource. :type encryption_at_host: bool - :ivar security_type: Specifies the SecurityType of the virtual machine. It is set as + :param security_type: Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. :code:`
`:code:`
` Default: UefiSettings will not - be enabled unless this property is set as TrustedLaunch. Default value: "TrustedLaunch". - :vartype security_type: str + be enabled unless this property is set as TrustedLaunch. The only acceptable values to pass in + are None and "TrustedLaunch". The default value is None. + :type security_type: str """ - _validation = { - 'security_type': {'constant': True}, - } - _attribute_map = { 'uefi_settings': {'key': 'uefiSettings', 'type': 'UefiSettings'}, 'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'bool'}, 'security_type': {'key': 'securityType', 'type': 'str'}, } - security_type = "TrustedLaunch" - def __init__( self, **kwargs @@ -5220,6 +5207,7 @@ def __init__( super(SecurityProfile, self).__init__(**kwargs) self.uefi_settings = kwargs.get('uefi_settings', None) self.encryption_at_host = kwargs.get('encryption_at_host', None) + self.security_type = kwargs.get('security_type', None) class ShareInfoElement(msrest.serialization.Model): @@ -6090,7 +6078,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py index 0d3c932420b8..070b798804f5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py @@ -66,14 +66,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -84,11 +83,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -96,17 +90,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -3958,9 +3953,10 @@ class ManagedDiskParameters(SubResource): :param id: Resource Id. :type id: str - :param storage_account_type: Specifies the storage account type for the managed disk. NOTE: - UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values - include: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", + :param storage_account_type: Specifies the storage account type for the managed disk. Managed + OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS + can only be used with data disks, it cannot be used with OS Disk. Possible values include: + "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", "StandardSSD_ZRS". :type storage_account_type: str or ~azure.mgmt.compute.v2020_12_01.models.StorageAccountTypes :param disk_encryption_set: Specifies the customer managed disk encryption set resource id for @@ -5671,8 +5667,6 @@ def __init__( class SecurityProfile(msrest.serialization.Model): """Specifies the Security profile settings for the virtual machine or virtual machine scale set. - Variables are only populated by the server, and will be ignored when sending a request. - :param uefi_settings: Specifies the security settings like secure boot and vTPM used while creating the virtual machine. :code:`
`:code:`
`Minimum api-version: 2020-12-01. :type uefi_settings: ~azure.mgmt.compute.v2020_12_01.models.UefiSettings @@ -5682,34 +5676,31 @@ class SecurityProfile(msrest.serialization.Model): :code:`
`:code:`
` Default: The Encryption at host will be disabled unless this property is set to true for the resource. :type encryption_at_host: bool - :ivar security_type: Specifies the SecurityType of the virtual machine. It is set as + :param security_type: Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. :code:`
`:code:`
` Default: UefiSettings will not - be enabled unless this property is set as TrustedLaunch. Default value: "TrustedLaunch". - :vartype security_type: str + be enabled unless this property is set as TrustedLaunch. The only acceptable values to pass in + are None and "TrustedLaunch". The default value is None. + :type security_type: str """ - _validation = { - 'security_type': {'constant': True}, - } - _attribute_map = { 'uefi_settings': {'key': 'uefiSettings', 'type': 'UefiSettings'}, 'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'bool'}, 'security_type': {'key': 'securityType', 'type': 'str'}, } - security_type = "TrustedLaunch" - def __init__( self, *, uefi_settings: Optional["UefiSettings"] = None, encryption_at_host: Optional[bool] = None, + security_type: Optional[str] = None, **kwargs ): super(SecurityProfile, self).__init__(**kwargs) self.uefi_settings = uefi_settings self.encryption_at_host = encryption_at_host + self.security_type = security_type class ShareInfoElement(msrest.serialization.Model): @@ -6662,7 +6653,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_disk_restore_point_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_disk_restore_point_operations.py index 556574817b43..b6c33ebe2c12 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_disk_restore_point_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_disk_restore_point_operations.py @@ -12,13 +12,15 @@ from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -199,3 +201,280 @@ def get_next(next_link=None): get_next, extract_data ) list_by_restore_point.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints'} # type: ignore + + def _grant_access_initial( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + disk_restore_point_name, # type: str + grant_access_data, # type: "_models.GrantAccessData" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.AccessUri"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AccessUri"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._grant_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _grant_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess'} # type: ignore + + def begin_grant_access( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + disk_restore_point_name, # type: str + grant_access_data, # type: "_models.GrantAccessData" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AccessUri"] + """Grants access to a diskRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum + name length is 80 characters. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + 80 characters. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + :type disk_restore_point_name: str + :param grant_access_data: Access data object supplied in the body of the get disk access + operation. + :type grant_access_data: ~azure.mgmt.compute.v2020_12_01.models.GrantAccessData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AccessUri or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2020_12_01.models.AccessUri] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessUri"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + restore_point_collection_name=restore_point_collection_name, + vm_restore_point_name=vm_restore_point_name, + disk_restore_point_name=disk_restore_point_name, + grant_access_data=grant_access_data, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess'} # type: ignore + + def _revoke_access_initial( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + disk_restore_point_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._revoke_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _revoke_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess'} # type: ignore + + def begin_revoke_access( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + disk_restore_point_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Revokes access to a diskRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum + name length is 80 characters. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + 80 characters. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + :type disk_restore_point_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + restore_point_collection_name=restore_point_collection_name, + vm_restore_point_name=vm_restore_point_name, + disk_restore_point_name=disk_restore_point_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py index bb46423cd61e..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_compute_management_client_enums.py index 6fe7ba392a9e..7c1034a2ac05 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_compute_management_client_enums.py @@ -419,14 +419,13 @@ class StatusLevelTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ERROR = "Error" class StorageAccountTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the storage account type for the managed disk. Managed OS disk storage account type - can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data - disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses - Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses - Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. - For more information regarding disks supported for Windows Virtual Machines, refer to - https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual - Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types + """Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used + with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. + StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. + Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone + redundant storage. For more information regarding disks supported for Windows Virtual Machines, + refer to https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux + Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types """ STANDARD_LRS = "Standard_LRS" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models.py index d3084c280f5c..618307f0816b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models.py @@ -34,14 +34,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -52,11 +51,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -64,14 +58,13 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) self.setting_name = kwargs.get('setting_name', None) self.content = kwargs.get('content', None) @@ -3280,9 +3273,10 @@ class ManagedDiskParameters(SubResource): :param id: Resource Id. :type id: str - :param storage_account_type: Specifies the storage account type for the managed disk. NOTE: - UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values - include: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", + :param storage_account_type: Specifies the storage account type for the managed disk. Managed + OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS + can only be used with data disks, it cannot be used with OS Disk. Possible values include: + "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", "StandardSSD_ZRS". :type storage_account_type: str or ~azure.mgmt.compute.v2021_03_01.models.StorageAccountTypes :param disk_encryption_set: Specifies the customer managed disk encryption set resource id for @@ -4207,25 +4201,15 @@ def __init__( class PublicIPAddressSku(msrest.serialization.Model): """Describes the public IP Sku. - All required parameters must be populated in order to send to Azure. - - :param public_ip_address_sku_name: Required. Specify public IP sku name. Possible values - include: "Basic", "Standard". - :type public_ip_address_sku_name: str or - ~azure.mgmt.compute.v2021_03_01.models.PublicIPAddressSkuName - :param public_ip_address_sku_tier: Specify public IP sku tier. Possible values include: - "Regional", "Global". - :type public_ip_address_sku_tier: str or - ~azure.mgmt.compute.v2021_03_01.models.PublicIPAddressSkuTier + :param name: Specify public IP sku name. Possible values include: "Basic", "Standard". + :type name: str or ~azure.mgmt.compute.v2021_03_01.models.PublicIPAddressSkuName + :param tier: Specify public IP sku tier. Possible values include: "Regional", "Global". + :type tier: str or ~azure.mgmt.compute.v2021_03_01.models.PublicIPAddressSkuTier """ - _validation = { - 'public_ip_address_sku_name': {'required': True}, - } - _attribute_map = { - 'public_ip_address_sku_name': {'key': 'publicIPAddressSkuName', 'type': 'str'}, - 'public_ip_address_sku_tier': {'key': 'publicIPAddressSkuTier', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, } def __init__( @@ -4233,8 +4217,8 @@ def __init__( **kwargs ): super(PublicIPAddressSku, self).__init__(**kwargs) - self.public_ip_address_sku_name = kwargs['public_ip_address_sku_name'] - self.public_ip_address_sku_tier = kwargs.get('public_ip_address_sku_tier', None) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) class PurchasePlan(msrest.serialization.Model): @@ -5582,8 +5566,6 @@ def __init__( class SecurityProfile(msrest.serialization.Model): """Specifies the Security profile settings for the virtual machine or virtual machine scale set. - Variables are only populated by the server, and will be ignored when sending a request. - :param uefi_settings: Specifies the security settings like secure boot and vTPM used while creating the virtual machine. :code:`
`:code:`
`Minimum api-version: 2020-12-01. :type uefi_settings: ~azure.mgmt.compute.v2021_03_01.models.UefiSettings @@ -5593,24 +5575,19 @@ class SecurityProfile(msrest.serialization.Model): :code:`
`:code:`
` Default: The Encryption at host will be disabled unless this property is set to true for the resource. :type encryption_at_host: bool - :ivar security_type: Specifies the SecurityType of the virtual machine. It is set as + :param security_type: Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. :code:`
`:code:`
` Default: UefiSettings will not - be enabled unless this property is set as TrustedLaunch. Default value: "TrustedLaunch". - :vartype security_type: str + be enabled unless this property is set as TrustedLaunch. The only acceptable values to pass in + are None and "TrustedLaunch". The default value is None. + :type security_type: str """ - _validation = { - 'security_type': {'constant': True}, - } - _attribute_map = { 'uefi_settings': {'key': 'uefiSettings', 'type': 'UefiSettings'}, 'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'bool'}, 'security_type': {'key': 'securityType', 'type': 'str'}, } - security_type = "TrustedLaunch" - def __init__( self, **kwargs @@ -5618,6 +5595,7 @@ def __init__( super(SecurityProfile, self).__init__(**kwargs) self.uefi_settings = kwargs.get('uefi_settings', None) self.encryption_at_host = kwargs.get('encryption_at_host', None) + self.security_type = kwargs.get('security_type', None) class Sku(msrest.serialization.Model): @@ -6275,7 +6253,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py index 8a1ef3f9f24d..f474e7f839f9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py @@ -41,14 +41,13 @@ def __init__( class AdditionalUnattendContent(msrest.serialization.Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default - value: "OobeSystem". - :vartype pass_name: str - :ivar component_name: The component name. Currently, the only allowable value is - Microsoft-Windows-Shell-Setup. Default value: "Microsoft-Windows-Shell-Setup". - :vartype component_name: str + :param pass_name: The pass name. Currently, the only allowable value is OobeSystem. The only + acceptable values to pass in are None and "OobeSystem". The default value is None. + :type pass_name: str + :param component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. The only acceptable values to pass in are None and + "Microsoft-Windows-Shell-Setup". The default value is None. + :type component_name: str :param setting_name: Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: "AutoLogon", "FirstLogonCommands". @@ -59,11 +58,6 @@ class AdditionalUnattendContent(msrest.serialization.Model): :type content: str """ - _validation = { - 'pass_name': {'constant': True}, - 'component_name': {'constant': True}, - } - _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'str'}, 'component_name': {'key': 'componentName', 'type': 'str'}, @@ -71,17 +65,18 @@ class AdditionalUnattendContent(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'str'}, } - pass_name = "OobeSystem" - component_name = "Microsoft-Windows-Shell-Setup" - def __init__( self, *, + pass_name: Optional[str] = None, + component_name: Optional[str] = None, setting_name: Optional[Union[str, "SettingNames"]] = None, content: Optional[str] = None, **kwargs ): super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name self.setting_name = setting_name self.content = content @@ -3595,9 +3590,10 @@ class ManagedDiskParameters(SubResource): :param id: Resource Id. :type id: str - :param storage_account_type: Specifies the storage account type for the managed disk. NOTE: - UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values - include: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", + :param storage_account_type: Specifies the storage account type for the managed disk. Managed + OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS + can only be used with data disks, it cannot be used with OS Disk. Possible values include: + "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", "StandardSSD_ZRS". :type storage_account_type: str or ~azure.mgmt.compute.v2021_03_01.models.StorageAccountTypes :param disk_encryption_set: Specifies the customer managed disk encryption set resource id for @@ -4591,37 +4587,27 @@ def __init__( class PublicIPAddressSku(msrest.serialization.Model): """Describes the public IP Sku. - All required parameters must be populated in order to send to Azure. - - :param public_ip_address_sku_name: Required. Specify public IP sku name. Possible values - include: "Basic", "Standard". - :type public_ip_address_sku_name: str or - ~azure.mgmt.compute.v2021_03_01.models.PublicIPAddressSkuName - :param public_ip_address_sku_tier: Specify public IP sku tier. Possible values include: - "Regional", "Global". - :type public_ip_address_sku_tier: str or - ~azure.mgmt.compute.v2021_03_01.models.PublicIPAddressSkuTier + :param name: Specify public IP sku name. Possible values include: "Basic", "Standard". + :type name: str or ~azure.mgmt.compute.v2021_03_01.models.PublicIPAddressSkuName + :param tier: Specify public IP sku tier. Possible values include: "Regional", "Global". + :type tier: str or ~azure.mgmt.compute.v2021_03_01.models.PublicIPAddressSkuTier """ - _validation = { - 'public_ip_address_sku_name': {'required': True}, - } - _attribute_map = { - 'public_ip_address_sku_name': {'key': 'publicIPAddressSkuName', 'type': 'str'}, - 'public_ip_address_sku_tier': {'key': 'publicIPAddressSkuTier', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, } def __init__( self, *, - public_ip_address_sku_name: Union[str, "PublicIPAddressSkuName"], - public_ip_address_sku_tier: Optional[Union[str, "PublicIPAddressSkuTier"]] = None, + name: Optional[Union[str, "PublicIPAddressSkuName"]] = None, + tier: Optional[Union[str, "PublicIPAddressSkuTier"]] = None, **kwargs ): super(PublicIPAddressSku, self).__init__(**kwargs) - self.public_ip_address_sku_name = public_ip_address_sku_name - self.public_ip_address_sku_tier = public_ip_address_sku_tier + self.name = name + self.tier = tier class PurchasePlan(msrest.serialization.Model): @@ -6086,8 +6072,6 @@ def __init__( class SecurityProfile(msrest.serialization.Model): """Specifies the Security profile settings for the virtual machine or virtual machine scale set. - Variables are only populated by the server, and will be ignored when sending a request. - :param uefi_settings: Specifies the security settings like secure boot and vTPM used while creating the virtual machine. :code:`
`:code:`
`Minimum api-version: 2020-12-01. :type uefi_settings: ~azure.mgmt.compute.v2021_03_01.models.UefiSettings @@ -6097,34 +6081,31 @@ class SecurityProfile(msrest.serialization.Model): :code:`
`:code:`
` Default: The Encryption at host will be disabled unless this property is set to true for the resource. :type encryption_at_host: bool - :ivar security_type: Specifies the SecurityType of the virtual machine. It is set as + :param security_type: Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. :code:`
`:code:`
` Default: UefiSettings will not - be enabled unless this property is set as TrustedLaunch. Default value: "TrustedLaunch". - :vartype security_type: str + be enabled unless this property is set as TrustedLaunch. The only acceptable values to pass in + are None and "TrustedLaunch". The default value is None. + :type security_type: str """ - _validation = { - 'security_type': {'constant': True}, - } - _attribute_map = { 'uefi_settings': {'key': 'uefiSettings', 'type': 'UefiSettings'}, 'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'bool'}, 'security_type': {'key': 'securityType', 'type': 'str'}, } - security_type = "TrustedLaunch" - def __init__( self, *, uefi_settings: Optional["UefiSettings"] = None, encryption_at_host: Optional[bool] = None, + security_type: Optional[str] = None, **kwargs ): super(SecurityProfile, self).__init__(**kwargs) self.uefi_settings = uefi_settings self.encryption_at_host = encryption_at_host + self.security_type = security_type class Sku(msrest.serialization.Model): @@ -6834,7 +6815,7 @@ class Usage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar unit: Required. An enum describing the unit of usage measurement. Default value: "Count". + :ivar unit: An enum describing the unit of usage measurement. Has constant value: "Count". :vartype unit: str :param current_value: Required. The current usage of the resource. :type current_value: int