swagger: '2.0' info: title: Microsoft Azure DeploymentScriptsClient description: >- The APIs listed in this specification can be used to manage Deployment Scripts resource through the Azure Resource Manager. version: 2019-10-01-preview host: management.azure.com schemes: - https consumes: - application/json produces: - application/json security: - azure_auth: - user_impersonation securityDefinitions: azure_auth: type: oauth2 authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize flow: implicit description: Azure Active Directory OAuth2 Flow scopes: user_impersonation: impersonate your user account paths: ? /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName} : put: tags: - DeploymentScripts operationId: microsoftAzureDeploymentscriptsCreate x-ms-long-running-operation: true description: Creates a deployment script. x-ms-examples: DeploymentScriptsCreate: $ref: ./examples/DeploymentScripts_Create.json DeploymentScriptsCreate_MinCreate: $ref: ./examples/DeploymentScripts_Min_Create.json DeploymentScriptsCreate_UsingCustomACIName: $ref: ./examples/DeploymentScripts_Create_Using_Custom_Aci_Name.json DeploymentScriptsCreate_UsingExistingStorageAccount: $ref: >- ./examples/DeploymentScripts_Create_Using_Existing_StorageAccount.json parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/ScriptNameParameter' - $ref: '#/parameters/ApiVersionParameter' - name: deploymentScript in: body required: true schema: $ref: '#/definitions/DeploymentScript' description: Deployment script supplied to the operation. responses: '200': description: OK -- Deployment script is updated. schema: $ref: '#/definitions/DeploymentScript' '201': description: Created -- Deployment script created. schema: $ref: '#/definitions/DeploymentScript' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/DeploymentScriptsError' summary: >- Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resources Deploymentscripts Scriptname patch: tags: - DeploymentScripts operationId: microsoftAzureDeploymentscriptsUpdate description: Updates deployment script tags with specified values. x-ms-examples: DeploymentScriptsUpdate: $ref: ./examples/DeploymentScripts_Update.json parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/ScriptNameParameter' - $ref: '#/parameters/ApiVersionParameter' - name: deploymentScript in: body schema: $ref: '#/definitions/DeploymentScriptUpdateParameter' description: Deployment script resource with the tags to be updated. responses: '200': description: OK -- Deployment script tags are updated. schema: $ref: '#/definitions/DeploymentScript' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/DeploymentScriptsError' summary: >- Microsoft Azure Patch Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resources Deploymentscripts Scriptname get: tags: - DeploymentScripts operationId: microsoftAzureDeploymentscriptsGet description: Gets a deployment script with a given name. x-ms-examples: DeploymentScriptsGet: $ref: ./examples/DeploymentScripts_Get.json parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/ScriptNameParameter' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: OK -- Returns information about the deployment script. schema: $ref: '#/definitions/DeploymentScript' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/DeploymentScriptsError' summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resources Deploymentscripts Scriptname delete: tags: - DeploymentScripts operationId: microsoftAzureDeploymentscriptsDelete description: >- Deletes a deployment script. When operation completes, status code 200 returned without content. x-ms-examples: DeploymentScriptsDelete: $ref: ./examples/DeploymentScripts_Delete.json parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/ScriptNameParameter' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: OK -- Deployment script deleted. '204': description: Deployment script does not exist. default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/DeploymentScriptsError' summary: >- Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resources Deploymentscripts Scriptname /subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentScripts: get: tags: - DeploymentScripts operationId: microsoftAzureDeploymentscriptsListbysubscription description: Lists all deployment scripts for a given subscription. x-ms-examples: DeploymentScriptsListBySubscription: $ref: ./examples/DeploymentScripts_ListBySubscription.json parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: OK -- Returns a list of deployment scripts. schema: $ref: '#/definitions/DeploymentScriptListResult' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/DeploymentScriptsError' x-ms-pageable: nextLinkName: nextLink summary: >- Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Resources Deploymentscripts ? /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs : get: tags: - DeploymentScripts operationId: microsoftAzureDeploymentscriptsGetlogs description: Gets deployment script logs for a given deployment script name. x-ms-examples: DeploymentScriptsGetLogs: $ref: ./examples/DeploymentScripts_GetLogs.json parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/ScriptNameParameter' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: OK -- Returns deployment script logs if available. schema: $ref: '#/definitions/ScriptLogsList' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/DeploymentScriptsError' summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resources Deploymentscripts Scriptname Logs ? /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs/default : get: tags: - DeploymentScripts operationId: microsoftAzureDeploymentscriptsGetlogsdefault description: Gets deployment script logs for a given deployment script name. x-ms-examples: DeploymentScriptsGetLogs: $ref: ./examples/DeploymentScripts_GetLogsDefault.json DeploymentScriptsGetLogsWithTail: $ref: ./examples/DeploymentScripts_GetLogsDefaultWithTail.json parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/ScriptNameParameter' - $ref: '#/parameters/ApiVersionParameter' - name: tail in: query description: >- The number of lines to show from the tail of the deployment script log. Valid value is a positive number up to 1000. If 'tail' is not provided, all available logs are shown up to container instance log capacity of 4mb. type: integer responses: '200': description: OK -- Returns deployment script logs if available. schema: $ref: '#/definitions/ScriptLog' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/DeploymentScriptsError' summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resources Deploymentscripts Scriptname Logs Default /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts: get: tags: - DeploymentScripts operationId: microsoftAzureDeploymentscriptsListbyresourcegroup description: Lists deployments scripts. x-ms-examples: DeploymentScriptsList: $ref: ./examples/DeploymentScripts_ListByResourceGroup.json parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: OK -- Returns a list of deployment scripts. schema: $ref: '#/definitions/DeploymentScriptListResult' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/DeploymentScriptsError' x-ms-pageable: nextLinkName: nextLink summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resources Deploymentscripts definitions: DeploymentScript: required: - identity - location - kind type: object description: Deployment script object. discriminator: kind properties: identity: description: >- Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. $ref: '#/definitions/ManagedServiceIdentity' location: type: string x-ms-mutability: - read - create description: >- The location of the ACI and the storage account for the deployment script. tags: type: object description: Resource tags. additionalProperties: type: string kind: type: string description: Type of the script. enum: - AzurePowerShell - AzureCLI x-ms-enum: name: ScriptType modelAsString: true systemData: readOnly: true description: The system metadata related to this resource. $ref: >- ../../../../../common-types/resource-management/v1/types.json#/definitions/systemData allOf: - $ref: '#/definitions/AzureResourceBase' DeploymentScriptUpdateParameter: type: object description: 'Deployment script parameters to be updated. ' properties: tags: type: object description: Resource tags to be updated. additionalProperties: type: string allOf: - $ref: '#/definitions/AzureResourceBase' AzurePowerShellScript: required: - properties type: object x-ms-discriminator-value: AzurePowerShell description: Object model for the Azure PowerShell script. properties: properties: description: Properties of the Azure PowerShell script object. $ref: '#/definitions/AzurePowerShellScriptProperties' x-ms-client-flatten: true allOf: - $ref: '#/definitions/DeploymentScript' AzurePowerShellScriptProperties: required: - azPowerShellVersion type: object description: Properties of the Azure PowerShell script object. properties: azPowerShellVersion: type: string description: Azure PowerShell module version to be used. allOf: - $ref: '#/definitions/DeploymentScriptPropertiesBase' - $ref: '#/definitions/ScriptConfigurationBase' AzureCliScript: required: - properties type: object x-ms-discriminator-value: AzureCLI description: Object model for the Azure CLI script. properties: properties: description: Properties of the Azure CLI script object. $ref: '#/definitions/AzureCliScriptProperties' x-ms-client-flatten: true allOf: - $ref: '#/definitions/DeploymentScript' AzureCliScriptProperties: required: - azCliVersion type: object description: Properties of the Azure CLI script object. properties: azCliVersion: type: string description: Azure CLI module version to be used. allOf: - $ref: '#/definitions/DeploymentScriptPropertiesBase' - $ref: '#/definitions/ScriptConfigurationBase' ScriptConfigurationBase: required: - retentionInterval type: object x-ms-external: true description: >- Common configuration settings for both Azure PowerShell and Azure CLI scripts. properties: primaryScriptUri: type: string description: Uri for the script. This is the entry point for the external script. supportingScriptUris: type: array description: Supporting files for the external script. items: type: string description: Supporting file Uri. scriptContent: type: string maxLength: 32000 description: Script body. arguments: type: string description: >- Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' environmentVariables: description: The environment variables to pass over to the script. type: array items: $ref: '#/definitions/EnvironmentVariable' forceUpdateTag: type: string description: >- 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. retentionInterval: type: string format: duration description: >- 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). timeout: type: string format: duration default: P1D description: >- Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D DeploymentScriptPropertiesBase: type: object x-ms-external: true description: Common properties for the deployment script. properties: containerSettings: type: object description: Container settings. $ref: '#/definitions/ContainerConfiguration' storageAccountSettings: type: object description: Storage Account settings. $ref: '#/definitions/StorageAccountConfiguration' cleanupPreference: type: string description: >- The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. enum: - Always - OnSuccess - OnExpiration default: Always x-ms-enum: name: cleanupOptions modelAsString: true provisioningState: type: string readOnly: true description: State of the script execution. This only appears in the response. enum: - Creating - ProvisioningResources - Running - Succeeded - Failed - Canceled x-ms-enum: name: ScriptProvisioningState modelAsString: true status: type: object readOnly: true description: Contains the results of script execution. $ref: '#/definitions/ScriptStatus' outputs: description: List of script outputs. type: object readOnly: true additionalProperties: type: object description: Script output in pair. ContainerConfiguration: type: object description: Settings to customize ACI container instance. properties: containerGroupName: type: string description: >- 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. minLength: 1 maxLength: 63 StorageAccountConfiguration: type: object description: >- Settings to use an existing storage account. Valid storage account kinds are: Storage, StorageV2 and FileStorage properties: storageAccountName: type: string description: The storage account name. storageAccountKey: type: string description: The storage account access key. x-ms-secret: true ScriptStatus: type: object description: Generic object modeling results of script execution. properties: containerInstanceId: type: string readOnly: true description: ACI resource Id. storageAccountId: type: string readOnly: true description: Storage account resource Id. startTime: type: string format: date-time readOnly: true description: Start time of the script execution. endTime: type: string format: date-time readOnly: true description: End time of the script execution. expirationTime: type: string format: date-time readOnly: true description: Time the deployment script resource will expire. error: description: Error that is relayed from the script execution. $ref: >- ../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse ManagedServiceIdentity: type: object description: Managed identity generic object. properties: type: type: string description: Type of the managed identity. enum: - UserAssigned x-ms-enum: name: ManagedServiceIdentityType modelAsString: true tenantId: readOnly: true type: string description: ID of the Azure Active Directory. userAssignedIdentities: type: object description: >- The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity. additionalProperties: description: User-assigned managed identity. $ref: '#/definitions/UserAssignedIdentity' UserAssignedIdentity: type: object description: User-assigned managed identity. properties: principalId: readOnly: true type: string description: Azure Active Directory principal ID associated with this identity. clientId: readOnly: true type: string description: Client App Id associated with this identity. EnvironmentVariable: description: The environment variable to pass to the script in the container instance. type: object properties: name: type: string description: The name of the environment variable. value: type: string description: The value of the environment variable. secureValue: type: string description: The value of the secure environment variable. x-ms-secret: true required: - name DeploymentScriptListResult: description: List of deployment scripts. properties: value: type: array items: $ref: '#/definitions/DeploymentScript' description: An array of deployment scripts. nextLink: readOnly: true type: string description: The URL to use for getting the next set of results. ScriptLogsList: description: Deployment script execution logs. properties: value: type: array items: $ref: '#/definitions/ScriptLog' description: Deployment scripts logs. ScriptLog: type: object description: Script execution log object. properties: properties: $ref: '#/definitions/LogProperties' x-ms-client-flatten: true allOf: - $ref: '#/definitions/AzureResourceBase' LogProperties: type: object description: Script log properties. properties: log: type: string readOnly: true description: Script execution logs in text format. AzureResourceBase: x-ms-azure-resource: true type: object description: Common properties for all Azure resources. properties: id: readOnly: true type: string description: String Id used to locate any resource on Azure. name: readOnly: true type: string description: Name of this resource. type: readOnly: true type: string description: Type of this resource. DeploymentScriptsError: properties: error: $ref: >- ../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse description: Deployment scripts error response. parameters: SubscriptionIdParameter: name: subscriptionId in: path required: true type: string x-ms-parameter-location: client description: Subscription Id which forms part of the URI for every service call. ScriptNameParameter: name: scriptName in: path required: true type: string description: Name of the deployment script. minLength: 1 maxLength: 90 x-ms-parameter-location: method ResourceGroupNameParameter: name: resourceGroupName in: path required: true type: string description: The name of the resource group. The name is case insensitive. pattern: ^[-\w\._\(\)]+$ minLength: 1 maxLength: 90 x-ms-parameter-location: method ApiVersionParameter: name: api-version in: query required: true type: string x-ms-parameter-location: client description: Client Api version. tags: - name: DeploymentScripts