From d6afa706ddca223b8bcd2aa06edfc86cfa4f0bb9 Mon Sep 17 00:00:00 2001 From: subha-sa <116541423+subha-sa@users.noreply.github.com> Date: Thu, 5 Oct 2023 20:21:56 -0700 Subject: [PATCH] [Hub Generated] Review request for Microsoft.Resources to add version stable/2023-08-01 (#25270) * Adds base for updating Microsoft.Resources from version stable/2020-10-01 to version 2023-08-01 * Updates readme * Updates API version in new specs and examples * adding new subnet Id Property to the ARM template and example file * updated the readme file * added example files * prettier check update * fixed the readme files errors * lint error and model validation error fix * more model valiadtion fixes * updated format of suppression * applying suppressions based on new format * updating integer format * suppressing the integer format check as there is tooling issue * added x-ms-arm-details format to subnet id * added more suppression * added more suppression --------- Co-authored-by: Subha Sambandamurthy --- .../stable/2023-08-01/deploymentScripts.json | 979 ++++++++++++++++++ .../examples/DeploymentScripts_Create.json | 111 ++ ...Scripts_Create_No_UserManagedIdentity.json | 93 ++ ...tScripts_Create_Using_Custom_Aci_Name.json | 120 +++ ..._Using_Custom_Aci_Name_With_SubnetIds.json | 144 +++ ..._Create_Using_Existing_StorageAccount.json | 121 +++ .../examples/DeploymentScripts_Delete.json | 47 + .../examples/DeploymentScripts_Get.json | 52 + .../examples/DeploymentScripts_GetLogs.json | 22 + .../DeploymentScripts_GetLogsDefault.json | 18 + ...loymentScripts_GetLogsDefaultWithTail.json | 19 + ...DeploymentScripts_ListByResourceGroup.json | 60 ++ .../DeploymentScripts_ListBySubscription.json | 54 + .../DeploymentScripts_Min_Create.json | 97 ++ .../examples/DeploymentScripts_Update.json | 60 ++ .../resources/resource-manager/readme.md | 45 +- .../resource-manager/readme.python.md | 12 + 17 files changed, 2051 insertions(+), 3 deletions(-) create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/deploymentScripts.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_No_UserManagedIdentity.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name_With_SubnetIds.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Existing_StorageAccount.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Delete.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Get.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogs.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogsDefault.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogsDefaultWithTail.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_ListByResourceGroup.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_ListBySubscription.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Min_Create.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Update.json diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/deploymentScripts.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/deploymentScripts.json new file mode 100644 index 000000000000..d235b9000995 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/deploymentScripts.json @@ -0,0 +1,979 @@ +{ + "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": "2023-08-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" + }, + "DeploymentScriptsCreate_UsingAciWithSubnets": { + "$ref": "./examples/DeploymentScripts_Create_Using_Custom_Aci_Name_With_SubnetIds.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", + "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" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "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." + } + } + } + }, + "ContainerGroupSubnetId": { + "description": "Container group subnet information.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID of subnet.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ] + } + }, + "name": { + "description": "Friendly name for the subnet.", + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "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 + }, + "subnetIds": { + "type": "array", + "description": "The subnet resource IDs for a container group.", + "items": { + "$ref": "#/definitions/ContainerGroupSubnetId" + }, + "x-ms-identifiers": [ + "id" + ] + } + } + }, + "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.", + "type": "object", + "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.", + "type": "object", + "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": { + "type": "object", + "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.", + "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/2023-08-01/examples/DeploymentScripts_Create.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create.json new file mode 100644 index 000000000000..02e0911e8da5 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2023-08-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": "P7D", + "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" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": {} + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_No_UserManagedIdentity.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_No_UserManagedIdentity.json new file mode 100644 index 000000000000..24a4c85339d5 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_No_UserManagedIdentity.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2023-08-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": "P7D", + "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" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name.json new file mode 100644 index 000000000000..a15cd79ebd98 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2023-08-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": "P7D", + "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" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": {} + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name_With_SubnetIds.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name_With_SubnetIds.json new file mode 100644 index 000000000000..d4ee8c3ee7a1 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Custom_Aci_Name_With_SubnetIds.json @@ -0,0 +1,144 @@ +{ + "parameters": { + "api-version": "2023-08-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", + "subnetIds": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Network/virtualNetworks/scriptSubnet/subnets/subnetwork1" + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Network/virtualNetworks/scriptSubnet/subnets/subnetwork2" + } + ] + }, + "arguments": "-Location 'westus' -Name \"*rg2\"", + "supportingScriptUris": [ + "https://uri1.to.supporting.script", + "https://uri2.to.supporting.script" + ], + "retentionInterval": "P7D", + "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" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Resources/deployments/deploymentName", + "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", + "subnetIds": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Network/virtualNetworks/scriptSubnet/subnets/subnetwork1" + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Network/virtualNetworks/scriptSubnet/subnets/subnetwork2" + } + ] + }, + "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": {} + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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", + "subnetIds": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Network/virtualNetworks/scriptSubnet/subnets/subnetwork1" + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.Network/virtualNetworks/scriptSubnet/subnets/subnetwork2" + } + ] + }, + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Existing_StorageAccount.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Existing_StorageAccount.json new file mode 100644 index 000000000000..a9e757fdbbc1 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Create_Using_Existing_StorageAccount.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "api-version": "2023-08-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": "P7D", + "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" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": {} + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Delete.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Delete.json new file mode 100644 index 000000000000..045fa7a6c008 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Delete.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-08-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": "P7D", + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Get.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Get.json new file mode 100644 index 000000000000..fbc7c72bddbe --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Get.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-08-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" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogs.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogs.json new file mode 100644 index 000000000000..a7270db8f36d --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogs.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-08-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "properties": { + "log": "script execution stdout/stderr logs" + } + } + ] + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogsDefault.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogsDefault.json new file mode 100644 index 000000000000..2a3fb3ff50cb --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogsDefault.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-08-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "properties": { + "log": "script execution stdout/stderr logs" + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogsDefaultWithTail.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogsDefaultWithTail.json new file mode 100644 index 000000000000..41887ce6ecaa --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_GetLogsDefaultWithTail.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-08-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "tail": 5 + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "properties": { + "log": "script execution stdout/stderr logs" + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_ListByResourceGroup.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_ListByResourceGroup.json new file mode 100644 index 000000000000..d852f018724c --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_ListByResourceGroup.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-08-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" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/deploymentName", + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + ] + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_ListBySubscription.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_ListBySubscription.json new file mode 100644 index 000000000000..352de1061028 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_ListBySubscription.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2023-08-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" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + ] + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Min_Create.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Min_Create.json new file mode 100644 index 000000000000..5c53738e0619 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Min_Create.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "api-version": "2023-08-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" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": {} + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": { + "additionalProperties": { + "output1": "value1" + } + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Update.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Update.json new file mode 100644 index 000000000000..c27e4eb75ee8 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2023-08-01/examples/DeploymentScripts_Update.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-08-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "script-rg", + "scriptName": "MyDeploymentScript", + "deploymentScript": { + "tags": {} + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/script-rg/providers/Microsoft.Resources/deployments/MyDeploymentScript", + "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": { + "additionalProperties": { + "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 b011811957cd..7815d4ff5392 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -62,7 +62,7 @@ tag: package-managedapplications-2018-06 ``` ``` yaml $(package-deploymentscripts) -tag: package-deploymentscripts-2020-10 +tag: package-deploymentscripts-2023-08 ``` ``` yaml $(package-templatespecs) @@ -150,6 +150,18 @@ suppressions: ``` +### Tag: package-deploymentscripts-2023-08 + +These settings apply only when `--tag=package-deploymentscripts-2023-08` is specified on the command line. + +```yaml $(tag) == 'package-deploymentscripts-2023-08' +input-file: + - Microsoft.Resources/stable/2023-08-01/deploymentScripts.json + +suppressions: + - code: OperationsAPIImplementation + reason: OperationsAPI will come from Resources +``` ### Tag: package-resources-2023-07 These settings apply only when `--tag=package-resources-2023-07` is specified on the command line. @@ -1070,10 +1082,37 @@ directive: suppress: TrackedResourcePatchOperation where: $.definitions.AzurePowerShellScript reason: Tooling issue - - from: deploymentScripts.json - suppress: OperationsAPIImplementation + - suppress: OperationsAPIImplementation + from: deploymentScripts.json where: $.paths reason: OperationsAPI will come from Resources + - suppress: IntegerTypeMustHaveFormat + from: deploymentScripts.json + reason: Tooling issue, default is int32, explictly mentioning the format as per doc, it still flags breaking change. + - suppress: ResourceNameRestriction + from: deploymentScripts.json + reason: Pre-existing lint error. Not related to this version release. Will fix in the future. + - suppress: PropertiesTypeObjectNoDefinition + from: deploymentScripts.json + reason: Pre-existing lint error. Not related to this version release. Will fix in the future. + - suppress: SubscriptionsAndResourceGroupCasing + from: deploymentScripts.json + reason: Pre-existing lint error. Not related to this version release. Will fix in the future. + - suppress: ParametersInPointGet + from: deploymentScripts.json + reason: Pre-existing lint error. Not related to this version release. Will fix in the future. + - suppress: GetCollectionOnlyHasValueAndNextLink + from: deploymentScripts.json + reason: Pre-existing lint error. Not related to this version release. Will fix in the future. + - suppress: PatchIdentityProperty + from: deploymentScripts.json + reason: Pre-existing lint error. Not related to this version release. Will fix in the future. + - suppress: LroErrorContent + from: deploymentScripts.json + reason: Pre-existing lint error. Not related to this version release. Will fix in the future. + - suppress: ProvisioningStateSpecifiedForLROPut + from: deploymentScripts.json + reason: Pre-existing lint error. Not related to this version release. Will fix in the future. - from: deploymentScripts.json suppress: R3006 where: diff --git a/specification/resources/resource-manager/readme.python.md b/specification/resources/resource-manager/readme.python.md index 71ba49767ec8..98c56c317d34 100644 --- a/specification/resources/resource-manager/readme.python.md +++ b/specification/resources/resource-manager/readme.python.md @@ -74,6 +74,7 @@ batch: - tag: package-subscriptions-2018-06 - tag: package-subscriptions-2016-06 - multiapiscript-subscriptions: true + - tag: package-deploymentscripts-2023-08 - tag: package-deploymentscripts-2020-10 - tag: package-deploymentscripts-2019-10-preview - multiapiscript-deploymentscripts: true @@ -663,6 +664,17 @@ 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-deploymentscripts-2023-08 and python + +These settings apply only when `--tag=package-deploymentscripts-2023-08` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-deploymentscripts-2023-08' +default-api-version: "2023-08-01" +namespace: azure.mgmt.resource.deploymentscripts.v2023_08_01 +output-folder: $(python-sdks-folder)/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01 +``` + ### Tag: package-templatespecs-2019-06-preview and python These settings apply only when `--tag=package-templatespecs-2019-06-preview` is specified on the command line.