1# coding=utf-8
2# --------------------------------------------------------------------------
3# Copyright (c) Microsoft Corporation. All rights reserved.
4# Licensed under the MIT License. See License.txt in the project root for license information.
5# Code generated by Microsoft (R) AutoRest Code Generator.
6# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7# --------------------------------------------------------------------------
8
9import datetime
10from typing import Dict, List, Optional, Union
11
12from azure.core.exceptions import HttpResponseError
13import msrest.serialization
14
15from ._deployment_scripts_client_enums import *
16
17
18class AzureResourceBase(msrest.serialization.Model):
19    """Common properties for all Azure resources.
20
21    Variables are only populated by the server, and will be ignored when sending a request.
22
23    :ivar id: String Id used to locate any resource on Azure.
24    :vartype id: str
25    :ivar name: Name of this resource.
26    :vartype name: str
27    :ivar type: Type of this resource.
28    :vartype type: str
29    """
30
31    _validation = {
32        'id': {'readonly': True},
33        'name': {'readonly': True},
34        'type': {'readonly': True},
35    }
36
37    _attribute_map = {
38        'id': {'key': 'id', 'type': 'str'},
39        'name': {'key': 'name', 'type': 'str'},
40        'type': {'key': 'type', 'type': 'str'},
41    }
42
43    def __init__(
44        self,
45        **kwargs
46    ):
47        super(AzureResourceBase, self).__init__(**kwargs)
48        self.id = None
49        self.name = None
50        self.type = None
51
52
53class DeploymentScript(AzureResourceBase):
54    """Deployment script object.
55
56    You probably want to use the sub-classes and not this class directly. Known
57    sub-classes are: AzureCliScript, AzurePowerShellScript.
58
59    Variables are only populated by the server, and will be ignored when sending a request.
60
61    All required parameters must be populated in order to send to Azure.
62
63    :ivar id: String Id used to locate any resource on Azure.
64    :vartype id: str
65    :ivar name: Name of this resource.
66    :vartype name: str
67    :ivar type: Type of this resource.
68    :vartype type: str
69    :param identity: Optional property. Managed identity to be used for this deployment script.
70     Currently, only user-assigned MSI is supported.
71    :type identity:
72     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ManagedServiceIdentity
73    :param location: Required. The location of the ACI and the storage account for the deployment
74     script.
75    :type location: str
76    :param tags: A set of tags. Resource tags.
77    :type tags: dict[str, str]
78    :param kind: Required. Type of the script.Constant filled by server.  Possible values include:
79     "AzurePowerShell", "AzureCLI".
80    :type kind: str or ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptType
81    :ivar system_data: The system metadata related to this resource.
82    :vartype system_data: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.SystemData
83    """
84
85    _validation = {
86        'id': {'readonly': True},
87        'name': {'readonly': True},
88        'type': {'readonly': True},
89        'location': {'required': True},
90        'kind': {'required': True},
91        'system_data': {'readonly': True},
92    }
93
94    _attribute_map = {
95        'id': {'key': 'id', 'type': 'str'},
96        'name': {'key': 'name', 'type': 'str'},
97        'type': {'key': 'type', 'type': 'str'},
98        'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'},
99        'location': {'key': 'location', 'type': 'str'},
100        'tags': {'key': 'tags', 'type': '{str}'},
101        'kind': {'key': 'kind', 'type': 'str'},
102        'system_data': {'key': 'systemData', 'type': 'SystemData'},
103    }
104
105    _subtype_map = {
106        'kind': {'AzureCLI': 'AzureCliScript', 'AzurePowerShell': 'AzurePowerShellScript'}
107    }
108
109    def __init__(
110        self,
111        *,
112        location: str,
113        identity: Optional["ManagedServiceIdentity"] = None,
114        tags: Optional[Dict[str, str]] = None,
115        **kwargs
116    ):
117        super(DeploymentScript, self).__init__(**kwargs)
118        self.identity = identity
119        self.location = location
120        self.tags = tags
121        self.kind = 'DeploymentScript'  # type: str
122        self.system_data = None
123
124
125class AzureCliScript(DeploymentScript):
126    """Object model for the Azure CLI script.
127
128    Variables are only populated by the server, and will be ignored when sending a request.
129
130    All required parameters must be populated in order to send to Azure.
131
132    :ivar id: String Id used to locate any resource on Azure.
133    :vartype id: str
134    :ivar name: Name of this resource.
135    :vartype name: str
136    :ivar type: Type of this resource.
137    :vartype type: str
138    :param identity: Optional property. Managed identity to be used for this deployment script.
139     Currently, only user-assigned MSI is supported.
140    :type identity:
141     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ManagedServiceIdentity
142    :param location: Required. The location of the ACI and the storage account for the deployment
143     script.
144    :type location: str
145    :param tags: A set of tags. Resource tags.
146    :type tags: dict[str, str]
147    :param kind: Required. Type of the script.Constant filled by server.  Possible values include:
148     "AzurePowerShell", "AzureCLI".
149    :type kind: str or ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptType
150    :ivar system_data: The system metadata related to this resource.
151    :vartype system_data: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.SystemData
152    :param container_settings: Container settings.
153    :type container_settings:
154     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ContainerConfiguration
155    :param storage_account_settings: Storage Account settings.
156    :type storage_account_settings:
157     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.StorageAccountConfiguration
158    :param cleanup_preference: The clean up preference when the script execution gets in a terminal
159     state. Default setting is 'Always'. Possible values include: "Always", "OnSuccess",
160     "OnExpiration". Default value: "Always".
161    :type cleanup_preference: str or
162     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.CleanupOptions
163    :ivar provisioning_state: State of the script execution. This only appears in the response.
164     Possible values include: "Creating", "ProvisioningResources", "Running", "Succeeded", "Failed",
165     "Canceled".
166    :vartype provisioning_state: str or
167     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptProvisioningState
168    :ivar status: Contains the results of script execution.
169    :vartype status: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptStatus
170    :ivar outputs: List of script outputs.
171    :vartype outputs: dict[str, any]
172    :param primary_script_uri: Uri for the script. This is the entry point for the external script.
173    :type primary_script_uri: str
174    :param supporting_script_uris: Supporting files for the external script.
175    :type supporting_script_uris: list[str]
176    :param script_content: Script body.
177    :type script_content: str
178    :param arguments: Command line arguments to pass to the script. Arguments are separated by
179     spaces. ex: -Name blue* -Location 'West US 2'.
180    :type arguments: str
181    :param environment_variables: The environment variables to pass over to the script.
182    :type environment_variables:
183     list[~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.EnvironmentVariable]
184    :param force_update_tag: Gets or sets how the deployment script should be forced to execute
185     even if the script resource has not changed. Can be current time stamp or a GUID.
186    :type force_update_tag: str
187    :param retention_interval: Required. Interval for which the service retains the script resource
188     after it reaches a terminal state. Resource will be deleted when this duration expires.
189     Duration is based on ISO 8601 pattern (for example P1D means one day).
190    :type retention_interval: ~datetime.timedelta
191    :param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
192     value is P1D.
193    :type timeout: ~datetime.timedelta
194    :param az_cli_version: Required. Azure CLI module version to be used.
195    :type az_cli_version: str
196    """
197
198    _validation = {
199        'id': {'readonly': True},
200        'name': {'readonly': True},
201        'type': {'readonly': True},
202        'location': {'required': True},
203        'kind': {'required': True},
204        'system_data': {'readonly': True},
205        'provisioning_state': {'readonly': True},
206        'status': {'readonly': True},
207        'outputs': {'readonly': True},
208        'script_content': {'max_length': 32000, 'min_length': 0},
209        'retention_interval': {'required': True},
210        'az_cli_version': {'required': True},
211    }
212
213    _attribute_map = {
214        'id': {'key': 'id', 'type': 'str'},
215        'name': {'key': 'name', 'type': 'str'},
216        'type': {'key': 'type', 'type': 'str'},
217        'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'},
218        'location': {'key': 'location', 'type': 'str'},
219        'tags': {'key': 'tags', 'type': '{str}'},
220        'kind': {'key': 'kind', 'type': 'str'},
221        'system_data': {'key': 'systemData', 'type': 'SystemData'},
222        'container_settings': {'key': 'properties.containerSettings', 'type': 'ContainerConfiguration'},
223        'storage_account_settings': {'key': 'properties.storageAccountSettings', 'type': 'StorageAccountConfiguration'},
224        'cleanup_preference': {'key': 'properties.cleanupPreference', 'type': 'str'},
225        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
226        'status': {'key': 'properties.status', 'type': 'ScriptStatus'},
227        'outputs': {'key': 'properties.outputs', 'type': '{object}'},
228        'primary_script_uri': {'key': 'properties.primaryScriptUri', 'type': 'str'},
229        'supporting_script_uris': {'key': 'properties.supportingScriptUris', 'type': '[str]'},
230        'script_content': {'key': 'properties.scriptContent', 'type': 'str'},
231        'arguments': {'key': 'properties.arguments', 'type': 'str'},
232        'environment_variables': {'key': 'properties.environmentVariables', 'type': '[EnvironmentVariable]'},
233        'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
234        'retention_interval': {'key': 'properties.retentionInterval', 'type': 'duration'},
235        'timeout': {'key': 'properties.timeout', 'type': 'duration'},
236        'az_cli_version': {'key': 'properties.azCliVersion', 'type': 'str'},
237    }
238
239    def __init__(
240        self,
241        *,
242        location: str,
243        retention_interval: datetime.timedelta,
244        az_cli_version: str,
245        identity: Optional["ManagedServiceIdentity"] = None,
246        tags: Optional[Dict[str, str]] = None,
247        container_settings: Optional["ContainerConfiguration"] = None,
248        storage_account_settings: Optional["StorageAccountConfiguration"] = None,
249        cleanup_preference: Optional[Union[str, "CleanupOptions"]] = "Always",
250        primary_script_uri: Optional[str] = None,
251        supporting_script_uris: Optional[List[str]] = None,
252        script_content: Optional[str] = None,
253        arguments: Optional[str] = None,
254        environment_variables: Optional[List["EnvironmentVariable"]] = None,
255        force_update_tag: Optional[str] = None,
256        timeout: Optional[datetime.timedelta] = "P1D",
257        **kwargs
258    ):
259        super(AzureCliScript, self).__init__(identity=identity, location=location, tags=tags, **kwargs)
260        self.kind = 'AzureCLI'  # type: str
261        self.container_settings = container_settings
262        self.storage_account_settings = storage_account_settings
263        self.cleanup_preference = cleanup_preference
264        self.provisioning_state = None
265        self.status = None
266        self.outputs = None
267        self.primary_script_uri = primary_script_uri
268        self.supporting_script_uris = supporting_script_uris
269        self.script_content = script_content
270        self.arguments = arguments
271        self.environment_variables = environment_variables
272        self.force_update_tag = force_update_tag
273        self.retention_interval = retention_interval
274        self.timeout = timeout
275        self.az_cli_version = az_cli_version
276
277
278class ScriptConfigurationBase(msrest.serialization.Model):
279    """Common configuration settings for both Azure PowerShell and Azure CLI scripts.
280
281    All required parameters must be populated in order to send to Azure.
282
283    :param primary_script_uri: Uri for the script. This is the entry point for the external script.
284    :type primary_script_uri: str
285    :param supporting_script_uris: Supporting files for the external script.
286    :type supporting_script_uris: list[str]
287    :param script_content: Script body.
288    :type script_content: str
289    :param arguments: Command line arguments to pass to the script. Arguments are separated by
290     spaces. ex: -Name blue* -Location 'West US 2'.
291    :type arguments: str
292    :param environment_variables: The environment variables to pass over to the script.
293    :type environment_variables:
294     list[~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.EnvironmentVariable]
295    :param force_update_tag: Gets or sets how the deployment script should be forced to execute
296     even if the script resource has not changed. Can be current time stamp or a GUID.
297    :type force_update_tag: str
298    :param retention_interval: Required. Interval for which the service retains the script resource
299     after it reaches a terminal state. Resource will be deleted when this duration expires.
300     Duration is based on ISO 8601 pattern (for example P1D means one day).
301    :type retention_interval: ~datetime.timedelta
302    :param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
303     value is P1D.
304    :type timeout: ~datetime.timedelta
305    """
306
307    _validation = {
308        'script_content': {'max_length': 32000, 'min_length': 0},
309        'retention_interval': {'required': True},
310    }
311
312    _attribute_map = {
313        'primary_script_uri': {'key': 'primaryScriptUri', 'type': 'str'},
314        'supporting_script_uris': {'key': 'supportingScriptUris', 'type': '[str]'},
315        'script_content': {'key': 'scriptContent', 'type': 'str'},
316        'arguments': {'key': 'arguments', 'type': 'str'},
317        'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'},
318        'force_update_tag': {'key': 'forceUpdateTag', 'type': 'str'},
319        'retention_interval': {'key': 'retentionInterval', 'type': 'duration'},
320        'timeout': {'key': 'timeout', 'type': 'duration'},
321    }
322
323    def __init__(
324        self,
325        *,
326        retention_interval: datetime.timedelta,
327        primary_script_uri: Optional[str] = None,
328        supporting_script_uris: Optional[List[str]] = None,
329        script_content: Optional[str] = None,
330        arguments: Optional[str] = None,
331        environment_variables: Optional[List["EnvironmentVariable"]] = None,
332        force_update_tag: Optional[str] = None,
333        timeout: Optional[datetime.timedelta] = "P1D",
334        **kwargs
335    ):
336        super(ScriptConfigurationBase, self).__init__(**kwargs)
337        self.primary_script_uri = primary_script_uri
338        self.supporting_script_uris = supporting_script_uris
339        self.script_content = script_content
340        self.arguments = arguments
341        self.environment_variables = environment_variables
342        self.force_update_tag = force_update_tag
343        self.retention_interval = retention_interval
344        self.timeout = timeout
345
346
347class DeploymentScriptPropertiesBase(msrest.serialization.Model):
348    """Common properties for the deployment script.
349
350    Variables are only populated by the server, and will be ignored when sending a request.
351
352    :param container_settings: Container settings.
353    :type container_settings:
354     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ContainerConfiguration
355    :param storage_account_settings: Storage Account settings.
356    :type storage_account_settings:
357     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.StorageAccountConfiguration
358    :param cleanup_preference: The clean up preference when the script execution gets in a terminal
359     state. Default setting is 'Always'. Possible values include: "Always", "OnSuccess",
360     "OnExpiration". Default value: "Always".
361    :type cleanup_preference: str or
362     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.CleanupOptions
363    :ivar provisioning_state: State of the script execution. This only appears in the response.
364     Possible values include: "Creating", "ProvisioningResources", "Running", "Succeeded", "Failed",
365     "Canceled".
366    :vartype provisioning_state: str or
367     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptProvisioningState
368    :ivar status: Contains the results of script execution.
369    :vartype status: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptStatus
370    :ivar outputs: List of script outputs.
371    :vartype outputs: dict[str, any]
372    """
373
374    _validation = {
375        'provisioning_state': {'readonly': True},
376        'status': {'readonly': True},
377        'outputs': {'readonly': True},
378    }
379
380    _attribute_map = {
381        'container_settings': {'key': 'containerSettings', 'type': 'ContainerConfiguration'},
382        'storage_account_settings': {'key': 'storageAccountSettings', 'type': 'StorageAccountConfiguration'},
383        'cleanup_preference': {'key': 'cleanupPreference', 'type': 'str'},
384        'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
385        'status': {'key': 'status', 'type': 'ScriptStatus'},
386        'outputs': {'key': 'outputs', 'type': '{object}'},
387    }
388
389    def __init__(
390        self,
391        *,
392        container_settings: Optional["ContainerConfiguration"] = None,
393        storage_account_settings: Optional["StorageAccountConfiguration"] = None,
394        cleanup_preference: Optional[Union[str, "CleanupOptions"]] = "Always",
395        **kwargs
396    ):
397        super(DeploymentScriptPropertiesBase, self).__init__(**kwargs)
398        self.container_settings = container_settings
399        self.storage_account_settings = storage_account_settings
400        self.cleanup_preference = cleanup_preference
401        self.provisioning_state = None
402        self.status = None
403        self.outputs = None
404
405
406class AzureCliScriptProperties(DeploymentScriptPropertiesBase, ScriptConfigurationBase):
407    """Properties of the Azure CLI script object.
408
409    Variables are only populated by the server, and will be ignored when sending a request.
410
411    All required parameters must be populated in order to send to Azure.
412
413    :param primary_script_uri: Uri for the script. This is the entry point for the external script.
414    :type primary_script_uri: str
415    :param supporting_script_uris: Supporting files for the external script.
416    :type supporting_script_uris: list[str]
417    :param script_content: Script body.
418    :type script_content: str
419    :param arguments: Command line arguments to pass to the script. Arguments are separated by
420     spaces. ex: -Name blue* -Location 'West US 2'.
421    :type arguments: str
422    :param environment_variables: The environment variables to pass over to the script.
423    :type environment_variables:
424     list[~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.EnvironmentVariable]
425    :param force_update_tag: Gets or sets how the deployment script should be forced to execute
426     even if the script resource has not changed. Can be current time stamp or a GUID.
427    :type force_update_tag: str
428    :param retention_interval: Required. Interval for which the service retains the script resource
429     after it reaches a terminal state. Resource will be deleted when this duration expires.
430     Duration is based on ISO 8601 pattern (for example P1D means one day).
431    :type retention_interval: ~datetime.timedelta
432    :param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
433     value is P1D.
434    :type timeout: ~datetime.timedelta
435    :param container_settings: Container settings.
436    :type container_settings:
437     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ContainerConfiguration
438    :param storage_account_settings: Storage Account settings.
439    :type storage_account_settings:
440     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.StorageAccountConfiguration
441    :param cleanup_preference: The clean up preference when the script execution gets in a terminal
442     state. Default setting is 'Always'. Possible values include: "Always", "OnSuccess",
443     "OnExpiration". Default value: "Always".
444    :type cleanup_preference: str or
445     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.CleanupOptions
446    :ivar provisioning_state: State of the script execution. This only appears in the response.
447     Possible values include: "Creating", "ProvisioningResources", "Running", "Succeeded", "Failed",
448     "Canceled".
449    :vartype provisioning_state: str or
450     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptProvisioningState
451    :ivar status: Contains the results of script execution.
452    :vartype status: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptStatus
453    :ivar outputs: List of script outputs.
454    :vartype outputs: dict[str, any]
455    :param az_cli_version: Required. Azure CLI module version to be used.
456    :type az_cli_version: str
457    """
458
459    _validation = {
460        'script_content': {'max_length': 32000, 'min_length': 0},
461        'retention_interval': {'required': True},
462        'provisioning_state': {'readonly': True},
463        'status': {'readonly': True},
464        'outputs': {'readonly': True},
465        'az_cli_version': {'required': True},
466    }
467
468    _attribute_map = {
469        'primary_script_uri': {'key': 'primaryScriptUri', 'type': 'str'},
470        'supporting_script_uris': {'key': 'supportingScriptUris', 'type': '[str]'},
471        'script_content': {'key': 'scriptContent', 'type': 'str'},
472        'arguments': {'key': 'arguments', 'type': 'str'},
473        'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'},
474        'force_update_tag': {'key': 'forceUpdateTag', 'type': 'str'},
475        'retention_interval': {'key': 'retentionInterval', 'type': 'duration'},
476        'timeout': {'key': 'timeout', 'type': 'duration'},
477        'container_settings': {'key': 'containerSettings', 'type': 'ContainerConfiguration'},
478        'storage_account_settings': {'key': 'storageAccountSettings', 'type': 'StorageAccountConfiguration'},
479        'cleanup_preference': {'key': 'cleanupPreference', 'type': 'str'},
480        'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
481        'status': {'key': 'status', 'type': 'ScriptStatus'},
482        'outputs': {'key': 'outputs', 'type': '{object}'},
483        'az_cli_version': {'key': 'azCliVersion', 'type': 'str'},
484    }
485
486    def __init__(
487        self,
488        *,
489        retention_interval: datetime.timedelta,
490        az_cli_version: str,
491        primary_script_uri: Optional[str] = None,
492        supporting_script_uris: Optional[List[str]] = None,
493        script_content: Optional[str] = None,
494        arguments: Optional[str] = None,
495        environment_variables: Optional[List["EnvironmentVariable"]] = None,
496        force_update_tag: Optional[str] = None,
497        timeout: Optional[datetime.timedelta] = "P1D",
498        container_settings: Optional["ContainerConfiguration"] = None,
499        storage_account_settings: Optional["StorageAccountConfiguration"] = None,
500        cleanup_preference: Optional[Union[str, "CleanupOptions"]] = "Always",
501        **kwargs
502    ):
503        super(AzureCliScriptProperties, self).__init__(container_settings=container_settings, storage_account_settings=storage_account_settings, cleanup_preference=cleanup_preference, primary_script_uri=primary_script_uri, supporting_script_uris=supporting_script_uris, script_content=script_content, arguments=arguments, environment_variables=environment_variables, force_update_tag=force_update_tag, retention_interval=retention_interval, timeout=timeout, **kwargs)
504        self.primary_script_uri = primary_script_uri
505        self.supporting_script_uris = supporting_script_uris
506        self.script_content = script_content
507        self.arguments = arguments
508        self.environment_variables = environment_variables
509        self.force_update_tag = force_update_tag
510        self.retention_interval = retention_interval
511        self.timeout = timeout
512        self.az_cli_version = az_cli_version
513        self.container_settings = container_settings
514        self.storage_account_settings = storage_account_settings
515        self.cleanup_preference = cleanup_preference
516        self.provisioning_state = None
517        self.status = None
518        self.outputs = None
519        self.az_cli_version = az_cli_version
520
521
522class AzurePowerShellScript(DeploymentScript):
523    """Object model for the Azure PowerShell script.
524
525    Variables are only populated by the server, and will be ignored when sending a request.
526
527    All required parameters must be populated in order to send to Azure.
528
529    :ivar id: String Id used to locate any resource on Azure.
530    :vartype id: str
531    :ivar name: Name of this resource.
532    :vartype name: str
533    :ivar type: Type of this resource.
534    :vartype type: str
535    :param identity: Optional property. Managed identity to be used for this deployment script.
536     Currently, only user-assigned MSI is supported.
537    :type identity:
538     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ManagedServiceIdentity
539    :param location: Required. The location of the ACI and the storage account for the deployment
540     script.
541    :type location: str
542    :param tags: A set of tags. Resource tags.
543    :type tags: dict[str, str]
544    :param kind: Required. Type of the script.Constant filled by server.  Possible values include:
545     "AzurePowerShell", "AzureCLI".
546    :type kind: str or ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptType
547    :ivar system_data: The system metadata related to this resource.
548    :vartype system_data: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.SystemData
549    :param container_settings: Container settings.
550    :type container_settings:
551     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ContainerConfiguration
552    :param storage_account_settings: Storage Account settings.
553    :type storage_account_settings:
554     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.StorageAccountConfiguration
555    :param cleanup_preference: The clean up preference when the script execution gets in a terminal
556     state. Default setting is 'Always'. Possible values include: "Always", "OnSuccess",
557     "OnExpiration". Default value: "Always".
558    :type cleanup_preference: str or
559     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.CleanupOptions
560    :ivar provisioning_state: State of the script execution. This only appears in the response.
561     Possible values include: "Creating", "ProvisioningResources", "Running", "Succeeded", "Failed",
562     "Canceled".
563    :vartype provisioning_state: str or
564     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptProvisioningState
565    :ivar status: Contains the results of script execution.
566    :vartype status: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptStatus
567    :ivar outputs: List of script outputs.
568    :vartype outputs: dict[str, any]
569    :param primary_script_uri: Uri for the script. This is the entry point for the external script.
570    :type primary_script_uri: str
571    :param supporting_script_uris: Supporting files for the external script.
572    :type supporting_script_uris: list[str]
573    :param script_content: Script body.
574    :type script_content: str
575    :param arguments: Command line arguments to pass to the script. Arguments are separated by
576     spaces. ex: -Name blue* -Location 'West US 2'.
577    :type arguments: str
578    :param environment_variables: The environment variables to pass over to the script.
579    :type environment_variables:
580     list[~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.EnvironmentVariable]
581    :param force_update_tag: Gets or sets how the deployment script should be forced to execute
582     even if the script resource has not changed. Can be current time stamp or a GUID.
583    :type force_update_tag: str
584    :param retention_interval: Required. Interval for which the service retains the script resource
585     after it reaches a terminal state. Resource will be deleted when this duration expires.
586     Duration is based on ISO 8601 pattern (for example P1D means one day).
587    :type retention_interval: ~datetime.timedelta
588    :param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
589     value is P1D.
590    :type timeout: ~datetime.timedelta
591    :param az_power_shell_version: Required. Azure PowerShell module version to be used.
592    :type az_power_shell_version: str
593    """
594
595    _validation = {
596        'id': {'readonly': True},
597        'name': {'readonly': True},
598        'type': {'readonly': True},
599        'location': {'required': True},
600        'kind': {'required': True},
601        'system_data': {'readonly': True},
602        'provisioning_state': {'readonly': True},
603        'status': {'readonly': True},
604        'outputs': {'readonly': True},
605        'script_content': {'max_length': 32000, 'min_length': 0},
606        'retention_interval': {'required': True},
607        'az_power_shell_version': {'required': True},
608    }
609
610    _attribute_map = {
611        'id': {'key': 'id', 'type': 'str'},
612        'name': {'key': 'name', 'type': 'str'},
613        'type': {'key': 'type', 'type': 'str'},
614        'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'},
615        'location': {'key': 'location', 'type': 'str'},
616        'tags': {'key': 'tags', 'type': '{str}'},
617        'kind': {'key': 'kind', 'type': 'str'},
618        'system_data': {'key': 'systemData', 'type': 'SystemData'},
619        'container_settings': {'key': 'properties.containerSettings', 'type': 'ContainerConfiguration'},
620        'storage_account_settings': {'key': 'properties.storageAccountSettings', 'type': 'StorageAccountConfiguration'},
621        'cleanup_preference': {'key': 'properties.cleanupPreference', 'type': 'str'},
622        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
623        'status': {'key': 'properties.status', 'type': 'ScriptStatus'},
624        'outputs': {'key': 'properties.outputs', 'type': '{object}'},
625        'primary_script_uri': {'key': 'properties.primaryScriptUri', 'type': 'str'},
626        'supporting_script_uris': {'key': 'properties.supportingScriptUris', 'type': '[str]'},
627        'script_content': {'key': 'properties.scriptContent', 'type': 'str'},
628        'arguments': {'key': 'properties.arguments', 'type': 'str'},
629        'environment_variables': {'key': 'properties.environmentVariables', 'type': '[EnvironmentVariable]'},
630        'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
631        'retention_interval': {'key': 'properties.retentionInterval', 'type': 'duration'},
632        'timeout': {'key': 'properties.timeout', 'type': 'duration'},
633        'az_power_shell_version': {'key': 'properties.azPowerShellVersion', 'type': 'str'},
634    }
635
636    def __init__(
637        self,
638        *,
639        location: str,
640        retention_interval: datetime.timedelta,
641        az_power_shell_version: str,
642        identity: Optional["ManagedServiceIdentity"] = None,
643        tags: Optional[Dict[str, str]] = None,
644        container_settings: Optional["ContainerConfiguration"] = None,
645        storage_account_settings: Optional["StorageAccountConfiguration"] = None,
646        cleanup_preference: Optional[Union[str, "CleanupOptions"]] = "Always",
647        primary_script_uri: Optional[str] = None,
648        supporting_script_uris: Optional[List[str]] = None,
649        script_content: Optional[str] = None,
650        arguments: Optional[str] = None,
651        environment_variables: Optional[List["EnvironmentVariable"]] = None,
652        force_update_tag: Optional[str] = None,
653        timeout: Optional[datetime.timedelta] = "P1D",
654        **kwargs
655    ):
656        super(AzurePowerShellScript, self).__init__(identity=identity, location=location, tags=tags, **kwargs)
657        self.kind = 'AzurePowerShell'  # type: str
658        self.container_settings = container_settings
659        self.storage_account_settings = storage_account_settings
660        self.cleanup_preference = cleanup_preference
661        self.provisioning_state = None
662        self.status = None
663        self.outputs = None
664        self.primary_script_uri = primary_script_uri
665        self.supporting_script_uris = supporting_script_uris
666        self.script_content = script_content
667        self.arguments = arguments
668        self.environment_variables = environment_variables
669        self.force_update_tag = force_update_tag
670        self.retention_interval = retention_interval
671        self.timeout = timeout
672        self.az_power_shell_version = az_power_shell_version
673
674
675class AzurePowerShellScriptProperties(DeploymentScriptPropertiesBase, ScriptConfigurationBase):
676    """Properties of the Azure PowerShell script object.
677
678    Variables are only populated by the server, and will be ignored when sending a request.
679
680    All required parameters must be populated in order to send to Azure.
681
682    :param primary_script_uri: Uri for the script. This is the entry point for the external script.
683    :type primary_script_uri: str
684    :param supporting_script_uris: Supporting files for the external script.
685    :type supporting_script_uris: list[str]
686    :param script_content: Script body.
687    :type script_content: str
688    :param arguments: Command line arguments to pass to the script. Arguments are separated by
689     spaces. ex: -Name blue* -Location 'West US 2'.
690    :type arguments: str
691    :param environment_variables: The environment variables to pass over to the script.
692    :type environment_variables:
693     list[~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.EnvironmentVariable]
694    :param force_update_tag: Gets or sets how the deployment script should be forced to execute
695     even if the script resource has not changed. Can be current time stamp or a GUID.
696    :type force_update_tag: str
697    :param retention_interval: Required. Interval for which the service retains the script resource
698     after it reaches a terminal state. Resource will be deleted when this duration expires.
699     Duration is based on ISO 8601 pattern (for example P1D means one day).
700    :type retention_interval: ~datetime.timedelta
701    :param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
702     value is P1D.
703    :type timeout: ~datetime.timedelta
704    :param container_settings: Container settings.
705    :type container_settings:
706     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ContainerConfiguration
707    :param storage_account_settings: Storage Account settings.
708    :type storage_account_settings:
709     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.StorageAccountConfiguration
710    :param cleanup_preference: The clean up preference when the script execution gets in a terminal
711     state. Default setting is 'Always'. Possible values include: "Always", "OnSuccess",
712     "OnExpiration". Default value: "Always".
713    :type cleanup_preference: str or
714     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.CleanupOptions
715    :ivar provisioning_state: State of the script execution. This only appears in the response.
716     Possible values include: "Creating", "ProvisioningResources", "Running", "Succeeded", "Failed",
717     "Canceled".
718    :vartype provisioning_state: str or
719     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptProvisioningState
720    :ivar status: Contains the results of script execution.
721    :vartype status: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptStatus
722    :ivar outputs: List of script outputs.
723    :vartype outputs: dict[str, any]
724    :param az_power_shell_version: Required. Azure PowerShell module version to be used.
725    :type az_power_shell_version: str
726    """
727
728    _validation = {
729        'script_content': {'max_length': 32000, 'min_length': 0},
730        'retention_interval': {'required': True},
731        'provisioning_state': {'readonly': True},
732        'status': {'readonly': True},
733        'outputs': {'readonly': True},
734        'az_power_shell_version': {'required': True},
735    }
736
737    _attribute_map = {
738        'primary_script_uri': {'key': 'primaryScriptUri', 'type': 'str'},
739        'supporting_script_uris': {'key': 'supportingScriptUris', 'type': '[str]'},
740        'script_content': {'key': 'scriptContent', 'type': 'str'},
741        'arguments': {'key': 'arguments', 'type': 'str'},
742        'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'},
743        'force_update_tag': {'key': 'forceUpdateTag', 'type': 'str'},
744        'retention_interval': {'key': 'retentionInterval', 'type': 'duration'},
745        'timeout': {'key': 'timeout', 'type': 'duration'},
746        'container_settings': {'key': 'containerSettings', 'type': 'ContainerConfiguration'},
747        'storage_account_settings': {'key': 'storageAccountSettings', 'type': 'StorageAccountConfiguration'},
748        'cleanup_preference': {'key': 'cleanupPreference', 'type': 'str'},
749        'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
750        'status': {'key': 'status', 'type': 'ScriptStatus'},
751        'outputs': {'key': 'outputs', 'type': '{object}'},
752        'az_power_shell_version': {'key': 'azPowerShellVersion', 'type': 'str'},
753    }
754
755    def __init__(
756        self,
757        *,
758        retention_interval: datetime.timedelta,
759        az_power_shell_version: str,
760        primary_script_uri: Optional[str] = None,
761        supporting_script_uris: Optional[List[str]] = None,
762        script_content: Optional[str] = None,
763        arguments: Optional[str] = None,
764        environment_variables: Optional[List["EnvironmentVariable"]] = None,
765        force_update_tag: Optional[str] = None,
766        timeout: Optional[datetime.timedelta] = "P1D",
767        container_settings: Optional["ContainerConfiguration"] = None,
768        storage_account_settings: Optional["StorageAccountConfiguration"] = None,
769        cleanup_preference: Optional[Union[str, "CleanupOptions"]] = "Always",
770        **kwargs
771    ):
772        super(AzurePowerShellScriptProperties, self).__init__(container_settings=container_settings, storage_account_settings=storage_account_settings, cleanup_preference=cleanup_preference, primary_script_uri=primary_script_uri, supporting_script_uris=supporting_script_uris, script_content=script_content, arguments=arguments, environment_variables=environment_variables, force_update_tag=force_update_tag, retention_interval=retention_interval, timeout=timeout, **kwargs)
773        self.primary_script_uri = primary_script_uri
774        self.supporting_script_uris = supporting_script_uris
775        self.script_content = script_content
776        self.arguments = arguments
777        self.environment_variables = environment_variables
778        self.force_update_tag = force_update_tag
779        self.retention_interval = retention_interval
780        self.timeout = timeout
781        self.az_power_shell_version = az_power_shell_version
782        self.container_settings = container_settings
783        self.storage_account_settings = storage_account_settings
784        self.cleanup_preference = cleanup_preference
785        self.provisioning_state = None
786        self.status = None
787        self.outputs = None
788        self.az_power_shell_version = az_power_shell_version
789
790
791class ContainerConfiguration(msrest.serialization.Model):
792    """Settings to customize ACI container instance.
793
794    :param container_group_name: Container group name, if not specified then the name will get
795     auto-generated. Not specifying a 'containerGroupName' indicates the system to generate a unique
796     name which might end up flagging an Azure Policy as non-compliant. Use 'containerGroupName'
797     when you have an Azure Policy that expects a specific naming convention or when you want to
798     fully control the name. 'containerGroupName' property must be between 1 and 63 characters long,
799     must contain only lowercase letters, numbers, and dashes and it cannot start or end with a dash
800     and consecutive dashes are not allowed. To specify a 'containerGroupName', add the following
801     object to properties: { "containerSettings": { "containerGroupName": "contoso-container" } }.
802     If you do not want to specify a 'containerGroupName' then do not add 'containerSettings'
803     property.
804    :type container_group_name: str
805    """
806
807    _validation = {
808        'container_group_name': {'max_length': 63, 'min_length': 1},
809    }
810
811    _attribute_map = {
812        'container_group_name': {'key': 'containerGroupName', 'type': 'str'},
813    }
814
815    def __init__(
816        self,
817        *,
818        container_group_name: Optional[str] = None,
819        **kwargs
820    ):
821        super(ContainerConfiguration, self).__init__(**kwargs)
822        self.container_group_name = container_group_name
823
824
825class DeploymentScriptListResult(msrest.serialization.Model):
826    """List of deployment scripts.
827
828    Variables are only populated by the server, and will be ignored when sending a request.
829
830    :param value: An array of deployment scripts.
831    :type value: list[~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.DeploymentScript]
832    :ivar next_link: The URL to use for getting the next set of results.
833    :vartype next_link: str
834    """
835
836    _validation = {
837        'next_link': {'readonly': True},
838    }
839
840    _attribute_map = {
841        'value': {'key': 'value', 'type': '[DeploymentScript]'},
842        'next_link': {'key': 'nextLink', 'type': 'str'},
843    }
844
845    def __init__(
846        self,
847        *,
848        value: Optional[List["DeploymentScript"]] = None,
849        **kwargs
850    ):
851        super(DeploymentScriptListResult, self).__init__(**kwargs)
852        self.value = value
853        self.next_link = None
854
855
856class DeploymentScriptsError(msrest.serialization.Model):
857    """Deployment scripts error response.
858
859    :param error: Common error response for all Azure Resource Manager APIs to return error details
860     for failed operations. (This also follows the OData error response format.).
861    :type error: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ErrorResponse
862    """
863
864    _attribute_map = {
865        'error': {'key': 'error', 'type': 'ErrorResponse'},
866    }
867
868    def __init__(
869        self,
870        *,
871        error: Optional["ErrorResponse"] = None,
872        **kwargs
873    ):
874        super(DeploymentScriptsError, self).__init__(**kwargs)
875        self.error = error
876
877
878class DeploymentScriptUpdateParameter(AzureResourceBase):
879    """Deployment script parameters to be updated.
880
881    Variables are only populated by the server, and will be ignored when sending a request.
882
883    :ivar id: String Id used to locate any resource on Azure.
884    :vartype id: str
885    :ivar name: Name of this resource.
886    :vartype name: str
887    :ivar type: Type of this resource.
888    :vartype type: str
889    :param tags: A set of tags. Resource tags to be updated.
890    :type tags: dict[str, str]
891    """
892
893    _validation = {
894        'id': {'readonly': True},
895        'name': {'readonly': True},
896        'type': {'readonly': True},
897    }
898
899    _attribute_map = {
900        'id': {'key': 'id', 'type': 'str'},
901        'name': {'key': 'name', 'type': 'str'},
902        'type': {'key': 'type', 'type': 'str'},
903        'tags': {'key': 'tags', 'type': '{str}'},
904    }
905
906    def __init__(
907        self,
908        *,
909        tags: Optional[Dict[str, str]] = None,
910        **kwargs
911    ):
912        super(DeploymentScriptUpdateParameter, self).__init__(**kwargs)
913        self.tags = tags
914
915
916class EnvironmentVariable(msrest.serialization.Model):
917    """The environment variable to pass to the script in the container instance.
918
919    All required parameters must be populated in order to send to Azure.
920
921    :param name: Required. The name of the environment variable.
922    :type name: str
923    :param value: The value of the environment variable.
924    :type value: str
925    :param secure_value: The value of the secure environment variable.
926    :type secure_value: str
927    """
928
929    _validation = {
930        'name': {'required': True},
931    }
932
933    _attribute_map = {
934        'name': {'key': 'name', 'type': 'str'},
935        'value': {'key': 'value', 'type': 'str'},
936        'secure_value': {'key': 'secureValue', 'type': 'str'},
937    }
938
939    def __init__(
940        self,
941        *,
942        name: str,
943        value: Optional[str] = None,
944        secure_value: Optional[str] = None,
945        **kwargs
946    ):
947        super(EnvironmentVariable, self).__init__(**kwargs)
948        self.name = name
949        self.value = value
950        self.secure_value = secure_value
951
952
953class ErrorAdditionalInfo(msrest.serialization.Model):
954    """The resource management error additional info.
955
956    Variables are only populated by the server, and will be ignored when sending a request.
957
958    :ivar type: The additional info type.
959    :vartype type: str
960    :ivar info: The additional info.
961    :vartype info: any
962    """
963
964    _validation = {
965        'type': {'readonly': True},
966        'info': {'readonly': True},
967    }
968
969    _attribute_map = {
970        'type': {'key': 'type', 'type': 'str'},
971        'info': {'key': 'info', 'type': 'object'},
972    }
973
974    def __init__(
975        self,
976        **kwargs
977    ):
978        super(ErrorAdditionalInfo, self).__init__(**kwargs)
979        self.type = None
980        self.info = None
981
982
983class ErrorResponse(msrest.serialization.Model):
984    """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
985
986    Variables are only populated by the server, and will be ignored when sending a request.
987
988    :ivar code: The error code.
989    :vartype code: str
990    :ivar message: The error message.
991    :vartype message: str
992    :ivar target: The error target.
993    :vartype target: str
994    :ivar details: The error details.
995    :vartype details: list[~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ErrorResponse]
996    :ivar additional_info: The error additional info.
997    :vartype additional_info:
998     list[~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ErrorAdditionalInfo]
999    """
1000
1001    _validation = {
1002        'code': {'readonly': True},
1003        'message': {'readonly': True},
1004        'target': {'readonly': True},
1005        'details': {'readonly': True},
1006        'additional_info': {'readonly': True},
1007    }
1008
1009    _attribute_map = {
1010        'code': {'key': 'code', 'type': 'str'},
1011        'message': {'key': 'message', 'type': 'str'},
1012        'target': {'key': 'target', 'type': 'str'},
1013        'details': {'key': 'details', 'type': '[ErrorResponse]'},
1014        'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
1015    }
1016
1017    def __init__(
1018        self,
1019        **kwargs
1020    ):
1021        super(ErrorResponse, self).__init__(**kwargs)
1022        self.code = None
1023        self.message = None
1024        self.target = None
1025        self.details = None
1026        self.additional_info = None
1027
1028
1029class ManagedServiceIdentity(msrest.serialization.Model):
1030    """Managed identity generic object.
1031
1032    Variables are only populated by the server, and will be ignored when sending a request.
1033
1034    :param type: Type of the managed identity. Possible values include: "UserAssigned".
1035    :type type: str or
1036     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ManagedServiceIdentityType
1037    :ivar tenant_id: ID of the Azure Active Directory.
1038    :vartype tenant_id: str
1039    :param user_assigned_identities: The list of user-assigned managed identities associated with
1040     the resource. Key is the Azure resource Id of the managed identity.
1041    :type user_assigned_identities: dict[str,
1042     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.UserAssignedIdentity]
1043    """
1044
1045    _validation = {
1046        'tenant_id': {'readonly': True},
1047    }
1048
1049    _attribute_map = {
1050        'type': {'key': 'type', 'type': 'str'},
1051        'tenant_id': {'key': 'tenantId', 'type': 'str'},
1052        'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'},
1053    }
1054
1055    def __init__(
1056        self,
1057        *,
1058        type: Optional[Union[str, "ManagedServiceIdentityType"]] = None,
1059        user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None,
1060        **kwargs
1061    ):
1062        super(ManagedServiceIdentity, self).__init__(**kwargs)
1063        self.type = type
1064        self.tenant_id = None
1065        self.user_assigned_identities = user_assigned_identities
1066
1067
1068class ScriptLog(AzureResourceBase):
1069    """Script execution log object.
1070
1071    Variables are only populated by the server, and will be ignored when sending a request.
1072
1073    :ivar id: String Id used to locate any resource on Azure.
1074    :vartype id: str
1075    :ivar name: Name of this resource.
1076    :vartype name: str
1077    :ivar type: Type of this resource.
1078    :vartype type: str
1079    :ivar log: Script execution logs in text format.
1080    :vartype log: str
1081    """
1082
1083    _validation = {
1084        'id': {'readonly': True},
1085        'name': {'readonly': True},
1086        'type': {'readonly': True},
1087        'log': {'readonly': True},
1088    }
1089
1090    _attribute_map = {
1091        'id': {'key': 'id', 'type': 'str'},
1092        'name': {'key': 'name', 'type': 'str'},
1093        'type': {'key': 'type', 'type': 'str'},
1094        'log': {'key': 'properties.log', 'type': 'str'},
1095    }
1096
1097    def __init__(
1098        self,
1099        **kwargs
1100    ):
1101        super(ScriptLog, self).__init__(**kwargs)
1102        self.log = None
1103
1104
1105class ScriptLogsList(msrest.serialization.Model):
1106    """Deployment script execution logs.
1107
1108    :param value: Deployment scripts logs.
1109    :type value: list[~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptLog]
1110    """
1111
1112    _attribute_map = {
1113        'value': {'key': 'value', 'type': '[ScriptLog]'},
1114    }
1115
1116    def __init__(
1117        self,
1118        *,
1119        value: Optional[List["ScriptLog"]] = None,
1120        **kwargs
1121    ):
1122        super(ScriptLogsList, self).__init__(**kwargs)
1123        self.value = value
1124
1125
1126class ScriptStatus(msrest.serialization.Model):
1127    """Generic object modeling results of script execution.
1128
1129    Variables are only populated by the server, and will be ignored when sending a request.
1130
1131    :ivar container_instance_id: ACI resource Id.
1132    :vartype container_instance_id: str
1133    :ivar storage_account_id: Storage account resource Id.
1134    :vartype storage_account_id: str
1135    :ivar start_time: Start time of the script execution.
1136    :vartype start_time: ~datetime.datetime
1137    :ivar end_time: End time of the script execution.
1138    :vartype end_time: ~datetime.datetime
1139    :ivar expiration_time: Time the deployment script resource will expire.
1140    :vartype expiration_time: ~datetime.datetime
1141    :param error: Error that is relayed from the script execution.
1142    :type error: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ErrorResponse
1143    """
1144
1145    _validation = {
1146        'container_instance_id': {'readonly': True},
1147        'storage_account_id': {'readonly': True},
1148        'start_time': {'readonly': True},
1149        'end_time': {'readonly': True},
1150        'expiration_time': {'readonly': True},
1151    }
1152
1153    _attribute_map = {
1154        'container_instance_id': {'key': 'containerInstanceId', 'type': 'str'},
1155        'storage_account_id': {'key': 'storageAccountId', 'type': 'str'},
1156        'start_time': {'key': 'startTime', 'type': 'iso-8601'},
1157        'end_time': {'key': 'endTime', 'type': 'iso-8601'},
1158        'expiration_time': {'key': 'expirationTime', 'type': 'iso-8601'},
1159        'error': {'key': 'error', 'type': 'ErrorResponse'},
1160    }
1161
1162    def __init__(
1163        self,
1164        *,
1165        error: Optional["ErrorResponse"] = None,
1166        **kwargs
1167    ):
1168        super(ScriptStatus, self).__init__(**kwargs)
1169        self.container_instance_id = None
1170        self.storage_account_id = None
1171        self.start_time = None
1172        self.end_time = None
1173        self.expiration_time = None
1174        self.error = error
1175
1176
1177class StorageAccountConfiguration(msrest.serialization.Model):
1178    """Settings to use an existing storage account. Valid storage account kinds are: Storage, StorageV2 and FileStorage.
1179
1180    :param storage_account_name: The storage account name.
1181    :type storage_account_name: str
1182    :param storage_account_key: The storage account access key.
1183    :type storage_account_key: str
1184    """
1185
1186    _attribute_map = {
1187        'storage_account_name': {'key': 'storageAccountName', 'type': 'str'},
1188        'storage_account_key': {'key': 'storageAccountKey', 'type': 'str'},
1189    }
1190
1191    def __init__(
1192        self,
1193        *,
1194        storage_account_name: Optional[str] = None,
1195        storage_account_key: Optional[str] = None,
1196        **kwargs
1197    ):
1198        super(StorageAccountConfiguration, self).__init__(**kwargs)
1199        self.storage_account_name = storage_account_name
1200        self.storage_account_key = storage_account_key
1201
1202
1203class SystemData(msrest.serialization.Model):
1204    """Metadata pertaining to creation and last modification of the resource.
1205
1206    :param created_by: The identity that created the resource.
1207    :type created_by: str
1208    :param created_by_type: The type of identity that created the resource. Possible values
1209     include: "User", "Application", "ManagedIdentity", "Key".
1210    :type created_by_type: str or
1211     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.CreatedByType
1212    :param created_at: The timestamp of resource creation (UTC).
1213    :type created_at: ~datetime.datetime
1214    :param last_modified_by: The identity that last modified the resource.
1215    :type last_modified_by: str
1216    :param last_modified_by_type: The type of identity that last modified the resource. Possible
1217     values include: "User", "Application", "ManagedIdentity", "Key".
1218    :type last_modified_by_type: str or
1219     ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.CreatedByType
1220    :param last_modified_at: The timestamp of resource last modification (UTC).
1221    :type last_modified_at: ~datetime.datetime
1222    """
1223
1224    _attribute_map = {
1225        'created_by': {'key': 'createdBy', 'type': 'str'},
1226        'created_by_type': {'key': 'createdByType', 'type': 'str'},
1227        'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
1228        'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
1229        'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
1230        'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
1231    }
1232
1233    def __init__(
1234        self,
1235        *,
1236        created_by: Optional[str] = None,
1237        created_by_type: Optional[Union[str, "CreatedByType"]] = None,
1238        created_at: Optional[datetime.datetime] = None,
1239        last_modified_by: Optional[str] = None,
1240        last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None,
1241        last_modified_at: Optional[datetime.datetime] = None,
1242        **kwargs
1243    ):
1244        super(SystemData, self).__init__(**kwargs)
1245        self.created_by = created_by
1246        self.created_by_type = created_by_type
1247        self.created_at = created_at
1248        self.last_modified_by = last_modified_by
1249        self.last_modified_by_type = last_modified_by_type
1250        self.last_modified_at = last_modified_at
1251
1252
1253class UserAssignedIdentity(msrest.serialization.Model):
1254    """User-assigned managed identity.
1255
1256    Variables are only populated by the server, and will be ignored when sending a request.
1257
1258    :ivar principal_id: Azure Active Directory principal ID associated with this identity.
1259    :vartype principal_id: str
1260    :ivar client_id: Client App Id associated with this identity.
1261    :vartype client_id: str
1262    """
1263
1264    _validation = {
1265        'principal_id': {'readonly': True},
1266        'client_id': {'readonly': True},
1267    }
1268
1269    _attribute_map = {
1270        'principal_id': {'key': 'principalId', 'type': 'str'},
1271        'client_id': {'key': 'clientId', 'type': 'str'},
1272    }
1273
1274    def __init__(
1275        self,
1276        **kwargs
1277    ):
1278        super(UserAssignedIdentity, self).__init__(**kwargs)
1279        self.principal_id = None
1280        self.client_id = None
1281