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