Skip to content

Commit af4e6c3

Browse files
author
SDKAuto
committed
CodeGen from PR 12571 in Azure/azure-rest-api-specs
Merge e87290f512c8c17de25c89286364c502fa8b01d9 into a35bdde
1 parent 7477eac commit af4e6c3

File tree

12 files changed

+288
-257
lines changed

12 files changed

+288
-257
lines changed

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/models/_models.py

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ class AzureCliScript(DeploymentScript):
150150
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.StorageAccountConfiguration
151151
:param cleanup_preference: The clean up preference when the script
152152
execution gets in a terminal state. Default setting is 'Always'. Possible
153-
values include: 'Always', 'OnSuccess', 'OnExpiration'
153+
values include: 'Always', 'OnSuccess', 'OnExpiration'. Default value:
154+
"Always" .
154155
:type cleanup_preference: str or
155156
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.CleanupOptions
156157
:ivar provisioning_state: State of the script execution. This only appears
@@ -187,7 +188,7 @@ class AzureCliScript(DeploymentScript):
187188
pattern (for example P7D means one week).
188189
:type retention_interval: timedelta
189190
:param timeout: Maximum allowed script execution time specified in ISO
190-
8601 format. Default value is PT1H
191+
8601 format. Default value is P1D. Default value: "P1D" .
191192
:type timeout: timedelta
192193
:param az_cli_version: Required. Azure CLI module version to be used.
193194
:type az_cli_version: str
@@ -239,7 +240,7 @@ def __init__(self, **kwargs):
239240
super(AzureCliScript, self).__init__(**kwargs)
240241
self.container_settings = kwargs.get('container_settings', None)
241242
self.storage_account_settings = kwargs.get('storage_account_settings', None)
242-
self.cleanup_preference = kwargs.get('cleanup_preference', None)
243+
self.cleanup_preference = kwargs.get('cleanup_preference', "Always")
243244
self.provisioning_state = None
244245
self.status = None
245246
self.outputs = None
@@ -250,7 +251,7 @@ def __init__(self, **kwargs):
250251
self.environment_variables = kwargs.get('environment_variables', None)
251252
self.force_update_tag = kwargs.get('force_update_tag', None)
252253
self.retention_interval = kwargs.get('retention_interval', None)
253-
self.timeout = kwargs.get('timeout', None)
254+
self.timeout = kwargs.get('timeout', "P1D")
254255
self.az_cli_version = kwargs.get('az_cli_version', None)
255256
self.kind = 'AzureCLI'
256257

@@ -291,7 +292,8 @@ class AzurePowerShellScript(DeploymentScript):
291292
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.StorageAccountConfiguration
292293
:param cleanup_preference: The clean up preference when the script
293294
execution gets in a terminal state. Default setting is 'Always'. Possible
294-
values include: 'Always', 'OnSuccess', 'OnExpiration'
295+
values include: 'Always', 'OnSuccess', 'OnExpiration'. Default value:
296+
"Always" .
295297
:type cleanup_preference: str or
296298
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.CleanupOptions
297299
:ivar provisioning_state: State of the script execution. This only appears
@@ -328,7 +330,7 @@ class AzurePowerShellScript(DeploymentScript):
328330
pattern (for example P7D means one week).
329331
:type retention_interval: timedelta
330332
:param timeout: Maximum allowed script execution time specified in ISO
331-
8601 format. Default value is PT1H
333+
8601 format. Default value is P1D. Default value: "P1D" .
332334
:type timeout: timedelta
333335
:param az_power_shell_version: Required. Azure PowerShell module version
334336
to be used.
@@ -381,7 +383,7 @@ def __init__(self, **kwargs):
381383
super(AzurePowerShellScript, self).__init__(**kwargs)
382384
self.container_settings = kwargs.get('container_settings', None)
383385
self.storage_account_settings = kwargs.get('storage_account_settings', None)
384-
self.cleanup_preference = kwargs.get('cleanup_preference', None)
386+
self.cleanup_preference = kwargs.get('cleanup_preference', "Always")
385387
self.provisioning_state = None
386388
self.status = None
387389
self.outputs = None
@@ -392,7 +394,7 @@ def __init__(self, **kwargs):
392394
self.environment_variables = kwargs.get('environment_variables', None)
393395
self.force_update_tag = kwargs.get('force_update_tag', None)
394396
self.retention_interval = kwargs.get('retention_interval', None)
395-
self.timeout = kwargs.get('timeout', None)
397+
self.timeout = kwargs.get('timeout', "P1D")
396398
self.az_power_shell_version = kwargs.get('az_power_shell_version', None)
397399
self.kind = 'AzurePowerShell'
398400

@@ -450,7 +452,8 @@ class DeploymentScriptPropertiesBase(Model):
450452
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.StorageAccountConfiguration
451453
:param cleanup_preference: The clean up preference when the script
452454
execution gets in a terminal state. Default setting is 'Always'. Possible
453-
values include: 'Always', 'OnSuccess', 'OnExpiration'
455+
values include: 'Always', 'OnSuccess', 'OnExpiration'. Default value:
456+
"Always" .
454457
:type cleanup_preference: str or
455458
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.CleanupOptions
456459
:ivar provisioning_state: State of the script execution. This only appears
@@ -484,7 +487,7 @@ def __init__(self, **kwargs):
484487
super(DeploymentScriptPropertiesBase, self).__init__(**kwargs)
485488
self.container_settings = kwargs.get('container_settings', None)
486489
self.storage_account_settings = kwargs.get('storage_account_settings', None)
487-
self.cleanup_preference = kwargs.get('cleanup_preference', None)
490+
self.cleanup_preference = kwargs.get('cleanup_preference', "Always")
488491
self.provisioning_state = None
489492
self.status = None
490493
self.outputs = None
@@ -719,7 +722,7 @@ class ScriptConfigurationBase(Model):
719722
pattern (for example P7D means one week).
720723
:type retention_interval: timedelta
721724
:param timeout: Maximum allowed script execution time specified in ISO
722-
8601 format. Default value is PT1H
725+
8601 format. Default value is P1D. Default value: "P1D" .
723726
:type timeout: timedelta
724727
"""
725728

@@ -748,7 +751,7 @@ def __init__(self, **kwargs):
748751
self.environment_variables = kwargs.get('environment_variables', None)
749752
self.force_update_tag = kwargs.get('force_update_tag', None)
750753
self.retention_interval = kwargs.get('retention_interval', None)
751-
self.timeout = kwargs.get('timeout', None)
754+
self.timeout = kwargs.get('timeout', "P1D")
752755

753756

754757
class ScriptLog(AzureResourceBase):
@@ -917,19 +920,27 @@ def __init__(self, **kwargs):
917920
class UserAssignedIdentity(Model):
918921
"""User-assigned managed identity.
919922
920-
:param principal_id: Azure Active Directory principal ID associated with
923+
Variables are only populated by the server, and will be ignored when
924+
sending a request.
925+
926+
:ivar principal_id: Azure Active Directory principal ID associated with
921927
this identity.
922-
:type principal_id: str
923-
:param client_id: Client App Id associated with this identity.
924-
:type client_id: str
928+
:vartype principal_id: str
929+
:ivar client_id: Client App Id associated with this identity.
930+
:vartype client_id: str
925931
"""
926932

933+
_validation = {
934+
'principal_id': {'readonly': True},
935+
'client_id': {'readonly': True},
936+
}
937+
927938
_attribute_map = {
928939
'principal_id': {'key': 'principalId', 'type': 'str'},
929940
'client_id': {'key': 'clientId', 'type': 'str'},
930941
}
931942

932943
def __init__(self, **kwargs):
933944
super(UserAssignedIdentity, self).__init__(**kwargs)
934-
self.principal_id = kwargs.get('principal_id', None)
935-
self.client_id = kwargs.get('client_id', None)
945+
self.principal_id = None
946+
self.client_id = None

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/models/_models_py3.py

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ class AzureCliScript(DeploymentScript):
150150
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.StorageAccountConfiguration
151151
:param cleanup_preference: The clean up preference when the script
152152
execution gets in a terminal state. Default setting is 'Always'. Possible
153-
values include: 'Always', 'OnSuccess', 'OnExpiration'
153+
values include: 'Always', 'OnSuccess', 'OnExpiration'. Default value:
154+
"Always" .
154155
:type cleanup_preference: str or
155156
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.CleanupOptions
156157
:ivar provisioning_state: State of the script execution. This only appears
@@ -187,7 +188,7 @@ class AzureCliScript(DeploymentScript):
187188
pattern (for example P7D means one week).
188189
:type retention_interval: timedelta
189190
:param timeout: Maximum allowed script execution time specified in ISO
190-
8601 format. Default value is PT1H
191+
8601 format. Default value is P1D. Default value: "P1D" .
191192
:type timeout: timedelta
192193
:param az_cli_version: Required. Azure CLI module version to be used.
193194
:type az_cli_version: str
@@ -235,7 +236,7 @@ class AzureCliScript(DeploymentScript):
235236
'az_cli_version': {'key': 'properties.azCliVersion', 'type': 'str'},
236237
}
237238

238-
def __init__(self, *, identity, location: str, retention_interval, az_cli_version: str, tags=None, container_settings=None, storage_account_settings=None, cleanup_preference=None, primary_script_uri: str=None, supporting_script_uris=None, script_content: str=None, arguments: str=None, environment_variables=None, force_update_tag: str=None, timeout=None, **kwargs) -> None:
239+
def __init__(self, *, identity, location: str, retention_interval, az_cli_version: str, tags=None, container_settings=None, storage_account_settings=None, cleanup_preference="Always", primary_script_uri: str=None, supporting_script_uris=None, script_content: str=None, arguments: str=None, environment_variables=None, force_update_tag: str=None, timeout="P1D", **kwargs) -> None:
239240
super(AzureCliScript, self).__init__(identity=identity, location=location, tags=tags, **kwargs)
240241
self.container_settings = container_settings
241242
self.storage_account_settings = storage_account_settings
@@ -291,7 +292,8 @@ class AzurePowerShellScript(DeploymentScript):
291292
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.StorageAccountConfiguration
292293
:param cleanup_preference: The clean up preference when the script
293294
execution gets in a terminal state. Default setting is 'Always'. Possible
294-
values include: 'Always', 'OnSuccess', 'OnExpiration'
295+
values include: 'Always', 'OnSuccess', 'OnExpiration'. Default value:
296+
"Always" .
295297
:type cleanup_preference: str or
296298
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.CleanupOptions
297299
:ivar provisioning_state: State of the script execution. This only appears
@@ -328,7 +330,7 @@ class AzurePowerShellScript(DeploymentScript):
328330
pattern (for example P7D means one week).
329331
:type retention_interval: timedelta
330332
:param timeout: Maximum allowed script execution time specified in ISO
331-
8601 format. Default value is PT1H
333+
8601 format. Default value is P1D. Default value: "P1D" .
332334
:type timeout: timedelta
333335
:param az_power_shell_version: Required. Azure PowerShell module version
334336
to be used.
@@ -377,7 +379,7 @@ class AzurePowerShellScript(DeploymentScript):
377379
'az_power_shell_version': {'key': 'properties.azPowerShellVersion', 'type': 'str'},
378380
}
379381

380-
def __init__(self, *, identity, location: str, retention_interval, az_power_shell_version: str, tags=None, container_settings=None, storage_account_settings=None, cleanup_preference=None, primary_script_uri: str=None, supporting_script_uris=None, script_content: str=None, arguments: str=None, environment_variables=None, force_update_tag: str=None, timeout=None, **kwargs) -> None:
382+
def __init__(self, *, identity, location: str, retention_interval, az_power_shell_version: str, tags=None, container_settings=None, storage_account_settings=None, cleanup_preference="Always", primary_script_uri: str=None, supporting_script_uris=None, script_content: str=None, arguments: str=None, environment_variables=None, force_update_tag: str=None, timeout="P1D", **kwargs) -> None:
381383
super(AzurePowerShellScript, self).__init__(identity=identity, location=location, tags=tags, **kwargs)
382384
self.container_settings = container_settings
383385
self.storage_account_settings = storage_account_settings
@@ -450,7 +452,8 @@ class DeploymentScriptPropertiesBase(Model):
450452
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.StorageAccountConfiguration
451453
:param cleanup_preference: The clean up preference when the script
452454
execution gets in a terminal state. Default setting is 'Always'. Possible
453-
values include: 'Always', 'OnSuccess', 'OnExpiration'
455+
values include: 'Always', 'OnSuccess', 'OnExpiration'. Default value:
456+
"Always" .
454457
:type cleanup_preference: str or
455458
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.CleanupOptions
456459
:ivar provisioning_state: State of the script execution. This only appears
@@ -480,7 +483,7 @@ class DeploymentScriptPropertiesBase(Model):
480483
'outputs': {'key': 'outputs', 'type': '{object}'},
481484
}
482485

483-
def __init__(self, *, container_settings=None, storage_account_settings=None, cleanup_preference=None, **kwargs) -> None:
486+
def __init__(self, *, container_settings=None, storage_account_settings=None, cleanup_preference="Always", **kwargs) -> None:
484487
super(DeploymentScriptPropertiesBase, self).__init__(**kwargs)
485488
self.container_settings = container_settings
486489
self.storage_account_settings = storage_account_settings
@@ -719,7 +722,7 @@ class ScriptConfigurationBase(Model):
719722
pattern (for example P7D means one week).
720723
:type retention_interval: timedelta
721724
:param timeout: Maximum allowed script execution time specified in ISO
722-
8601 format. Default value is PT1H
725+
8601 format. Default value is P1D. Default value: "P1D" .
723726
:type timeout: timedelta
724727
"""
725728

@@ -739,7 +742,7 @@ class ScriptConfigurationBase(Model):
739742
'timeout': {'key': 'timeout', 'type': 'duration'},
740743
}
741744

742-
def __init__(self, *, retention_interval, primary_script_uri: str=None, supporting_script_uris=None, script_content: str=None, arguments: str=None, environment_variables=None, force_update_tag: str=None, timeout=None, **kwargs) -> None:
745+
def __init__(self, *, retention_interval, primary_script_uri: str=None, supporting_script_uris=None, script_content: str=None, arguments: str=None, environment_variables=None, force_update_tag: str=None, timeout="P1D", **kwargs) -> None:
743746
super(ScriptConfigurationBase, self).__init__(**kwargs)
744747
self.primary_script_uri = primary_script_uri
745748
self.supporting_script_uris = supporting_script_uris
@@ -917,19 +920,27 @@ def __init__(self, *, created_by: str=None, created_by_type=None, created_at=Non
917920
class UserAssignedIdentity(Model):
918921
"""User-assigned managed identity.
919922
920-
:param principal_id: Azure Active Directory principal ID associated with
923+
Variables are only populated by the server, and will be ignored when
924+
sending a request.
925+
926+
:ivar principal_id: Azure Active Directory principal ID associated with
921927
this identity.
922-
:type principal_id: str
923-
:param client_id: Client App Id associated with this identity.
924-
:type client_id: str
928+
:vartype principal_id: str
929+
:ivar client_id: Client App Id associated with this identity.
930+
:vartype client_id: str
925931
"""
926932

933+
_validation = {
934+
'principal_id': {'readonly': True},
935+
'client_id': {'readonly': True},
936+
}
937+
927938
_attribute_map = {
928939
'principal_id': {'key': 'principalId', 'type': 'str'},
929940
'client_id': {'key': 'clientId', 'type': 'str'},
930941
}
931942

932-
def __init__(self, *, principal_id: str=None, client_id: str=None, **kwargs) -> None:
943+
def __init__(self, **kwargs) -> None:
933944
super(UserAssignedIdentity, self).__init__(**kwargs)
934-
self.principal_id = principal_id
935-
self.client_id = client_id
945+
self.principal_id = None
946+
self.client_id = None

0 commit comments

Comments
 (0)