Deployment Scripts - Create
Creates a deployment script.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}?api-version=2020-10-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
script
|
path | True |
string |
Name of the deployment script. |
subscription
|
path | True |
string |
Subscription Id which forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client Api version. |
Request Body
The request body can be one of the following:
Name | Description |
---|---|
Azure |
Object model for the Azure CLI script. |
Azure |
Object model for the Azure PowerShell script. |
AzureCliScript
Object model for the Azure CLI script.
Name | Required | Type | Description |
---|---|---|---|
kind | True |
string:
AzureCLI |
Type of the script. |
location | True |
string |
The location of the ACI and the storage account for the deployment script. |
properties.azCliVersion | True |
string |
Azure CLI module version to be used. |
properties.retentionInterval | True |
string |
Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). |
identity |
Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. |
||
properties.arguments |
string |
Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' |
|
properties.cleanupPreference |
The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. |
||
properties.containerSettings |
Container settings. |
||
properties.environmentVariables |
The environment variables to pass over to the script. |
||
properties.forceUpdateTag |
string |
Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. |
|
properties.primaryScriptUri |
string |
Uri for the script. This is the entry point for the external script. |
|
properties.scriptContent |
string |
Script body. |
|
properties.storageAccountSettings |
Storage Account settings. |
||
properties.supportingScriptUris |
string[] |
Supporting files for the external script. |
|
properties.timeout |
string |
Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D |
|
tags |
object |
Resource tags. |
AzurePowerShellScript
Object model for the Azure PowerShell script.
Name | Required | Type | Description |
---|---|---|---|
kind | True |
string:
Azure |
Type of the script. |
location | True |
string |
The location of the ACI and the storage account for the deployment script. |
properties.azPowerShellVersion | True |
string |
Azure PowerShell module version to be used. |
properties.retentionInterval | True |
string |
Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). |
identity |
Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. |
||
properties.arguments |
string |
Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' |
|
properties.cleanupPreference |
The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. |
||
properties.containerSettings |
Container settings. |
||
properties.environmentVariables |
The environment variables to pass over to the script. |
||
properties.forceUpdateTag |
string |
Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. |
|
properties.primaryScriptUri |
string |
Uri for the script. This is the entry point for the external script. |
|
properties.scriptContent |
string |
Script body. |
|
properties.storageAccountSettings |
Storage Account settings. |
||
properties.supportingScriptUris |
string[] |
Supporting files for the external script. |
|
properties.timeout |
string |
Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D |
|
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK | DeploymentScript: |
OK -- Deployment script is updated. |
201 Created | DeploymentScript: |
Created -- Deployment script created. |
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Deployment |
Deployment |
Deployment |
Deployment |
Deployment |
DeploymentScriptsCreate
Sample Request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/script-rg/providers/Microsoft.Resources/deploymentScripts/MyDeploymentScript?api-version=2020-10-01
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"properties": {
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "PT7D",
"timeout": "PT1H",
"cleanupPreference": "Always"
}
}
Sample Response
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-02-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-02-01T01:01:01.1075056Z"
},
"properties": {
"provisioningState": "Creating",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "P7D",
"timeout": "PT1H",
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
}
}
}
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"properties": {
"provisioningState": "Succeeded",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "P7D",
"timeout": "PT1H",
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
},
"outputs": {
"output1": "value1"
}
}
}
DeploymentScriptsCreate_MinCreate
Sample Request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/script-rg/providers/Microsoft.Resources/deploymentScripts/MyDeploymentScript?api-version=2020-10-01
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"properties": {
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"retentionInterval": "P7D"
}
}
Sample Response
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-02-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-02-01T01:01:01.1075056Z"
},
"properties": {
"provisioningState": "Creating",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"retentionInterval": "P7D",
"timeout": "PT1H",
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
}
}
}
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"properties": {
"provisioningState": "Succeeded",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"retentionInterval": "P7D",
"timeout": "PT1H",
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
},
"outputs": {
"output1": "value1"
}
}
}
DeploymentScriptsCreate_UsingCustomACIName
Sample Request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/script-rg/providers/Microsoft.Resources/deploymentScripts/MyDeploymentScript?api-version=2020-10-01
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"properties": {
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"containerSettings": {
"containerGroupName": "contoso-aci"
},
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "PT7D",
"timeout": "PT1H",
"cleanupPreference": "Always"
}
}
Sample Response
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-02-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-02-01T01:01:01.1075056Z"
},
"properties": {
"provisioningState": "Creating",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "P7D",
"timeout": "PT1H",
"containerSettings": {
"containerGroupName": "contoso-aci"
},
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
}
}
}
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"properties": {
"provisioningState": "Succeeded",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "P7D",
"timeout": "PT1H",
"containerSettings": {
"containerGroupName": "contoso-aci"
},
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
},
"outputs": {
"output1": "value1"
}
}
}
DeploymentScriptsCreate_UsingExistingStorageAccount
Sample Request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/script-rg/providers/Microsoft.Resources/deploymentScripts/MyDeploymentScript?api-version=2020-10-01
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"properties": {
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"storageAccountSettings": {
"storageAccountName": "contosostorage",
"storageAccountKey": "contosostoragekey"
},
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "PT7D",
"timeout": "PT1H",
"cleanupPreference": "Always"
}
}
Sample Response
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-02-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-02-01T01:01:01.1075056Z"
},
"properties": {
"provisioningState": "Creating",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"storageAccountSettings": {
"storageAccountName": "contosostorage"
},
"retentionInterval": "P7D",
"timeout": "PT1H",
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
}
}
}
{
"kind": "AzurePowerShell",
"location": "westus",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {}
}
},
"properties": {
"provisioningState": "Succeeded",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"storageAccountSettings": {
"storageAccountName": "contosostorage"
},
"retentionInterval": "P7D",
"timeout": "PT1H",
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
},
"outputs": {
"output1": "value1"
}
}
}
DeploymentScriptsCreateNoUserManagedIdentity
Sample Request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/script-rg/providers/Microsoft.Resources/deploymentScripts/MyDeploymentScript?api-version=2020-10-01
{
"kind": "AzurePowerShell",
"location": "westus",
"properties": {
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "PT7D",
"timeout": "PT1H",
"cleanupPreference": "Always"
}
}
Sample Response
{
"kind": "AzurePowerShell",
"location": "westus",
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-02-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-02-01T01:01:01.1075056Z"
},
"properties": {
"provisioningState": "Creating",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "P7D",
"timeout": "PT1H",
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
}
}
}
{
"kind": "AzurePowerShell",
"location": "westus",
"properties": {
"provisioningState": "Succeeded",
"azPowerShellVersion": "1.7.0",
"scriptContent": "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
"arguments": "-Location 'westus' -Name \"*rg2\"",
"supportingScriptUris": [
"https://uri1.to.supporting.script",
"https://uri2.to.supporting.script"
],
"retentionInterval": "P7D",
"timeout": "PT1H",
"cleanupPreference": "Always",
"status": {
"containerInstanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ContainerInstance/containerGroups/scriptContainer",
"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Storage/storageAccounts/scriptStorage",
"startTime": "2018-11-13T15:19:45-08:00",
"endTime": "2018-11-13T15:19:45-08:00",
"expirationTime": "2018-11-13T15:19:45-08:00"
},
"outputs": {
"output1": "value1"
}
}
}
Definitions
Name | Description |
---|---|
Azure |
Object model for the Azure CLI script. |
Azure |
Object model for the Azure PowerShell script. |
cleanup |
The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. |
Container |
Settings to customize ACI container instance. |
created |
The type of identity that created the resource. |
Deployment |
Deployment scripts error response. |
Environment |
The environment variable to pass to the script in the container instance. |
Error |
The resource management error additional info. |
Error |
Error Response |
Managed |
Managed identity generic object. |
Managed |
Type of the managed identity. |
Script |
State of the script execution. This only appears in the response. |
Script |
Generic object modeling results of script execution. |
Storage |
Settings to use an existing storage account. Valid storage account kinds are: Storage, StorageV2 and FileStorage |
system |
Metadata pertaining to creation and last modification of the resource. |
User |
User-assigned managed identity. |
AzureCliScript
Object model for the Azure CLI script.
Name | Type | Default Value | Description |
---|---|---|---|
id |
string |
String Id used to locate any resource on Azure. |
|
identity |
Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. |
||
kind |
string:
AzureCLI |
Type of the script. |
|
location |
string |
The location of the ACI and the storage account for the deployment script. |
|
name |
string |
Name of this resource. |
|
properties.arguments |
string |
Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' |
|
properties.azCliVersion |
string |
Azure CLI module version to be used. |
|
properties.cleanupPreference | Always |
The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. |
|
properties.containerSettings |
Container settings. |
||
properties.environmentVariables |
The environment variables to pass over to the script. |
||
properties.forceUpdateTag |
string |
Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. |
|
properties.outputs |
object |
List of script outputs. |
|
properties.primaryScriptUri |
string |
Uri for the script. This is the entry point for the external script. |
|
properties.provisioningState |
State of the script execution. This only appears in the response. |
||
properties.retentionInterval |
string |
Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). |
|
properties.scriptContent |
string |
Script body. |
|
properties.status |
Contains the results of script execution. |
||
properties.storageAccountSettings |
Storage Account settings. |
||
properties.supportingScriptUris |
string[] |
Supporting files for the external script. |
|
properties.timeout |
string |
P1D |
Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D |
systemData |
The system metadata related to this resource. |
||
tags |
object |
Resource tags. |
|
type |
string |
Type of this resource. |
AzurePowerShellScript
Object model for the Azure PowerShell script.
Name | Type | Default Value | Description |
---|---|---|---|
id |
string |
String Id used to locate any resource on Azure. |
|
identity |
Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. |
||
kind |
string:
Azure |
Type of the script. |
|
location |
string |
The location of the ACI and the storage account for the deployment script. |
|
name |
string |
Name of this resource. |
|
properties.arguments |
string |
Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' |
|
properties.azPowerShellVersion |
string |
Azure PowerShell module version to be used. |
|
properties.cleanupPreference | Always |
The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. |
|
properties.containerSettings |
Container settings. |
||
properties.environmentVariables |
The environment variables to pass over to the script. |
||
properties.forceUpdateTag |
string |
Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. |
|
properties.outputs |
object |
List of script outputs. |
|
properties.primaryScriptUri |
string |
Uri for the script. This is the entry point for the external script. |
|
properties.provisioningState |
State of the script execution. This only appears in the response. |
||
properties.retentionInterval |
string |
Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). |
|
properties.scriptContent |
string |
Script body. |
|
properties.status |
Contains the results of script execution. |
||
properties.storageAccountSettings |
Storage Account settings. |
||
properties.supportingScriptUris |
string[] |
Supporting files for the external script. |
|
properties.timeout |
string |
P1D |
Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D |
systemData |
The system metadata related to this resource. |
||
tags |
object |
Resource tags. |
|
type |
string |
Type of this resource. |
cleanupOptions
The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.
Name | Type | Description |
---|---|---|
Always |
string |
|
OnExpiration |
string |
|
OnSuccess |
string |
ContainerConfiguration
Settings to customize ACI container instance.
Name | Type | Description |
---|---|---|
containerGroupName |
string |
Container group name, if not specified then the name will get auto-generated. Not specifying a 'containerGroupName' indicates the system to generate a unique name which might end up flagging an Azure Policy as non-compliant. Use 'containerGroupName' when you have an Azure Policy that expects a specific naming convention or when you want to fully control the name. 'containerGroupName' property must be between 1 and 63 characters long, must contain only lowercase letters, numbers, and dashes and it cannot start or end with a dash and consecutive dashes are not allowed. To specify a 'containerGroupName', add the following object to properties: { "containerSettings": { "containerGroupName": "contoso-container" } }. If you do not want to specify a 'containerGroupName' then do not add 'containerSettings' property. |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
DeploymentScriptsError
Deployment scripts error response.
Name | Type | Description |
---|---|---|
error |
Error Response |
EnvironmentVariable
The environment variable to pass to the script in the container instance.
Name | Type | Description |
---|---|---|
name |
string |
The name of the environment variable. |
secureValue |
string |
The value of the secure environment variable. |
value |
string |
The value of the environment variable. |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorResponse
Error Response
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ManagedServiceIdentity
Managed identity generic object.
Name | Type | Description |
---|---|---|
tenantId |
string |
ID of the Azure Active Directory. |
type |
Type of the managed identity. |
|
userAssignedIdentities |
<string,
User |
The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity. |
ManagedServiceIdentityType
Type of the managed identity.
Name | Type | Description |
---|---|---|
UserAssigned |
string |
ScriptProvisioningState
State of the script execution. This only appears in the response.
Name | Type | Description |
---|---|---|
Canceled |
string |
|
Creating |
string |
|
Failed |
string |
|
ProvisioningResources |
string |
|
Running |
string |
|
Succeeded |
string |
ScriptStatus
Generic object modeling results of script execution.
Name | Type | Description |
---|---|---|
containerInstanceId |
string |
ACI resource Id. |
endTime |
string |
End time of the script execution. |
error |
Error Response |
|
expirationTime |
string |
Time the deployment script resource will expire. |
startTime |
string |
Start time of the script execution. |
storageAccountId |
string |
Storage account resource Id. |
StorageAccountConfiguration
Settings to use an existing storage account. Valid storage account kinds are: Storage, StorageV2 and FileStorage
Name | Type | Description |
---|---|---|
storageAccountKey |
string |
The storage account access key. |
storageAccountName |
string |
The storage account name. |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
UserAssignedIdentity
User-assigned managed identity.
Name | Type | Description |
---|---|---|
clientId |
string |
Client App Id associated with this identity. |
principalId |
string |
Azure Active Directory principal ID associated with this identity. |