From c05daca5376949c1800f04878dea5656071cb748 Mon Sep 17 00:00:00 2001 From: Jorge Cotillo Date: Mon, 14 Sep 2020 12:56:24 -0700 Subject: [PATCH] added new api version --- .../stable/2020-10-01/deploymentScripts.json | 928 ++++++++++++++++++ .../examples/DeploymentScripts_Create.json | 107 ++ ...Scripts_Create_No_UserManagedIdentity.json | 89 ++ ...tScripts_Create_Using_Custom_Aci_Name.json | 116 +++ ..._Create_Using_Existing_StorageAccount.json | 117 +++ .../examples/DeploymentScripts_Delete.json | 45 + .../examples/DeploymentScripts_Get.json | 49 + .../examples/DeploymentScripts_GetLogs.json | 21 + .../DeploymentScripts_GetLogsDefault.json | 17 + ...loymentScripts_GetLogsDefaultWithTail.json | 18 + ...DeploymentScripts_ListByResourceGroup.json | 57 ++ .../DeploymentScripts_ListBySubscription.json | 51 + .../DeploymentScripts_Min_Create.json | 93 ++ .../examples/DeploymentScripts_Update.json | 57 ++ .../resources/resource-manager/readme.md | 12 +- .../resource-manager/readme.python.md | 27 +- 16 files changed, 1797 insertions(+), 7 deletions(-) create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/deploymentScripts.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_No_UserManagedIdentity.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_Using_Existing_StorageAccount.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Delete.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Get.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogs.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogsDefault.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogsDefaultWithTail.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_ListByResourceGroup.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_ListBySubscription.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Min_Create.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Update.json diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/deploymentScripts.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/deploymentScripts.json new file mode 100644 index 000000000000..93a79b905a36 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/deploymentScripts.json @@ -0,0 +1,928 @@ +{ + "swagger": "2.0", + "info": { + "title": "DeploymentScriptsClient", + "description": "The APIs listed in this specification can be used to manage Deployment Scripts resource through the Azure Resource Manager.", + "version": "2020-10-01" + }, + "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": "DeploymentScripts_Create", + "x-ms-long-running-operation": true, + "description": "Creates a deployment script.", + "x-ms-examples": { + "DeploymentScriptsCreate": { + "$ref": "./examples/DeploymentScripts_Create.json" + }, + "DeploymentScriptsCreateNoUserManagedIdentity": { + "$ref": "./examples/DeploymentScripts_Create_No_UserManagedIdentity.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": { + "201": { + "description": "Created -- Deployment script created.", + "schema": { + "$ref": "#/definitions/DeploymentScript" + } + }, + "200": { + "description": "OK -- Deployment script is updated.", + "schema": { + "$ref": "#/definitions/DeploymentScript" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentScriptsError" + } + } + } + }, + "patch": { + "tags": [ + "DeploymentScripts" + ], + "operationId": "DeploymentScripts_Update", + "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" + } + } + } + }, + "get": { + "tags": [ + "DeploymentScripts" + ], + "operationId": "DeploymentScripts_Get", + "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" + } + } + } + }, + "delete": { + "tags": [ + "DeploymentScripts" + ], + "operationId": "DeploymentScripts_Delete", + "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" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentScripts": { + "get": { + "tags": [ + "DeploymentScripts" + ], + "operationId": "DeploymentScripts_ListBySubscription", + "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" + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs": { + "get": { + "tags": [ + "DeploymentScripts" + ], + "operationId": "DeploymentScripts_GetLogs", + "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" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs/default": { + "get": { + "tags": [ + "DeploymentScripts" + ], + "operationId": "DeploymentScripts_GetLogsDefault", + "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" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts": { + "get": { + "tags": [ + "DeploymentScripts" + ], + "operationId": "DeploymentScripts_ListByResourceGroup", + "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" + } + } + } + }, + "definitions": { + "DeploymentScript": { + "required": [ + "location", + "kind" + ], + "type": "object", + "description": "Deployment script object.", + "discriminator": "kind", + "properties": { + "identity": { + "description": "Optional property. 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 P7D means one week)." + }, + "timeout": { + "type": "string", + "format": "duration", + "description": "Maximum allowed script execution time specified in ISO 8601 format. Default value is PT1H" + } + } + }, + "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" + ], + "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 + } + }, + "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": { + "type": "string", + "description": "Azure Active Directory principal ID associated with this identity." + }, + "clientId": { + "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." + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create.json new file mode 100644 index 000000000000..7d6dc278fb69 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "deploymentScript": { + "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" + } + } + }, + "responses": { + "201": { + "body": { + "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" + } + } + } + }, + "200": { + "body": { + "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" + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_No_UserManagedIdentity.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_No_UserManagedIdentity.json new file mode 100644 index 000000000000..61cc35dbd7f2 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_No_UserManagedIdentity.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "deploymentScript": { + "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" + } + } + }, + "responses": { + "201": { + "body": { + "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" + } + } + } + }, + "200": { + "body": { + "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" + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name.json new file mode 100644 index 000000000000..371e6a394db8 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "deploymentScript": { + "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" + } + } + }, + "responses": { + "201": { + "body": { + "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" + } + } + } + }, + "200": { + "body": { + "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" + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_Using_Existing_StorageAccount.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_Using_Existing_StorageAccount.json new file mode 100644 index 000000000000..704aea8b3a8c --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Create_Using_Existing_StorageAccount.json @@ -0,0 +1,117 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "deploymentScript": { + "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" + } + } + }, + "responses": { + "201": { + "body": { + "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" + } + } + } + }, + "200": { + "body": { + "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" + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Delete.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Delete.json new file mode 100644 index 000000000000..e5644a332306 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Delete.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "deploymentScript": { + "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": "user script body", + "arguments": "user script arguments", + "supportingScriptUris": [ + "https://uri1.to.supporting.script", + "https://uri2.to.supporting.script" + ], + "retentionInterval": "PT7D", + "timeout": "PT1H", + "cleanupPreference": "Always", + "results": { + "aciId": "/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" + } + } + } + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Get.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Get.json new file mode 100644 index 000000000000..553918eb5463 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Get.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript" + }, + "responses": { + "200": { + "body": { + "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": "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": "PT7D", + "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" + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogs.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogs.json new file mode 100644 index 000000000000..0b5fb099e739 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogs.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "log": "script execution stdout/stderr logs" + } + } + ] + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogsDefault.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogsDefault.json new file mode 100644 index 000000000000..73a81f114436 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogsDefault.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript" + }, + "responses": { + "200": { + "body": { + "properties": { + "log": "script execution stdout/stderr logs" + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogsDefaultWithTail.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogsDefaultWithTail.json new file mode 100644 index 000000000000..996b635c7bf1 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_GetLogsDefaultWithTail.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "tail": 5 + }, + "responses": { + "200": { + "body": { + "properties": { + "log": "script execution stdout/stderr logs" + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_ListByResourceGroup.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_ListByResourceGroup.json new file mode 100644 index 000000000000..d527ef70a942 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_ListByResourceGroup.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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": "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" + } + } + } + ] + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_ListBySubscription.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_ListBySubscription.json new file mode 100644 index 000000000000..9ff921de6919 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_ListBySubscription.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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": "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": "PT7D", + "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" + } + } + } + ] + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Min_Create.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Min_Create.json new file mode 100644 index 000000000000..1ed1115e3701 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Min_Create.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "deploymentScript": { + "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" + } + } + }, + "responses": { + "201": { + "body": { + "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" + } + } + } + }, + "200": { + "body": { + "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" + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Update.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Update.json new file mode 100644 index 000000000000..a55272446486 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/examples/DeploymentScripts_Update.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "deploymentScript": { + "tags": {} + } + }, + "responses": { + "200": { + "body": { + "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" + } + }, + "systemData": { + "createdBy": "string", + "createdByType": "Application", + "createdAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z" + }, + "kind": "AzurePowerShell", + "location": "westus", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {} + } + }, + "tags": {} + } + } + } +} diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index f79a261926da..1aeb07ca5d22 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -57,7 +57,7 @@ tag: package-managedapplications-2018-06 ``` ``` yaml $(package-deploymentscripts) -tag: package-deploymentscripts-2019-10-preview +tag: package-deploymentscripts-2020-10 ``` ``` yaml $(package-templatespecs) @@ -91,6 +91,15 @@ input-file: - Microsoft.Resources/stable/2020-01-01/subscriptions.json ``` +### Tag: package-deploymentscripts-2020-10 + +These settings apply only when `--tag=package-deploymentscripts-2020-10` is specified on the command line. + +``` yaml $(tag) == 'package-deploymentscripts-2020-10' +input-file: +- Microsoft.Resources/stable/2020-10-01/deploymentScripts.json +``` + ### Tag: package-deploymentscripts-2019-10-preview These settings apply only when `--tag=package-deploymentscripts-2019-10-preview` is specified on the command line. @@ -726,6 +735,7 @@ input-file: - $(this-folder)/Microsoft.Resources/stable/2020-06-01/resources.json - $(this-folder)/Microsoft.Resources/stable/2020-01-01/subscriptions.json - $(this-folder)/Microsoft.Resources/preview/2019-10-01-preview/deploymentScripts.json + - $(this-folder)/Microsoft.Resources/stable/2020-10-01/deploymentScripts.json - $(this-folder)/Microsoft.Features/stable/2015-12-01/features.json - $(this-folder)/Microsoft.Authorization/stable/2016-09-01/locks.json - $(this-folder)/Microsoft.Authorization/stable/2015-01-01/locks.json diff --git a/specification/resources/resource-manager/readme.python.md b/specification/resources/resource-manager/readme.python.md index a280776e0d1a..fc83b036dc42 100644 --- a/specification/resources/resource-manager/readme.python.md +++ b/specification/resources/resource-manager/readme.python.md @@ -57,7 +57,8 @@ batch: - tag: package-subscriptions-2019-06 - tag: package-subscriptions-2018-06 - tag: package-subscriptions-2016-06 - - tag: package-deploymentscripts-2019-10-preview + - tag: package-deploymentscripts-2020-10 + - tag: package-deploymentscripts-2019-10-preview - tag: package-templatespecs-2019-06-preview ``` @@ -100,7 +101,8 @@ batch: - tag: package-subscriptions-2018-06 - tag: package-subscriptions-2016-06 - multiapiscript-subscriptions: true - - tag: package-deploymentscripts-2019-10-preview + - tag: package-deploymentscripts-2020-10 + - tag: package-deploymentscripts-2019-10-preview - multiapiscript-deploymentscripts: true - tag: package-templatespecs-2019-06-preview - multiapiscript-templatespecs: true @@ -560,11 +562,24 @@ These settings apply only when `--tag=package-deploymentscripts-2019-10-preview` Please also specify `--python-sdks-folder=`. ``` yaml $(tag) == 'package-deploymentscripts-2019-10-preview' -namespace: azure.mgmt.resource.deploymentscripts.v2019_10_preview -output-folder: $(python-sdks-folder)/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_preview +namespace: azure.mgmt.resource.deploymentscripts.v2019_10_01_preview +output-folder: $(python-sdks-folder)/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview python: - namespace: azure.mgmt.resource.deploymentscripts.v2019_10_preview - output-folder: $(python-sdks-folder)/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_preview + namespace: azure.mgmt.resource.deploymentscripts.v2019_10_01_preview + output-folder: $(python-sdks-folder)/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview +``` + +### Tag: package-deploymentscripts-2020-10 and python + +These settings apply only when `--tag=package-deploymentscripts-2020-10` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-deploymentscripts-2020-10' +namespace: azure.mgmt.resource.deploymentscripts.v2020_10_01 +output-folder: $(python-sdks-folder)/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01 +python: + namespace: azure.mgmt.resource.deploymentscripts.v2020_10_01 + output-folder: $(python-sdks-folder)/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01 ``` ### Tag: package-templatespecs-2019-06-preview and python