From 561b51cebda50c09a05e7bf1719163a74f0caa47 Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Mon, 22 Apr 2019 23:56:53 +0000 Subject: [PATCH 01/11] copy from 2019-03-01. --- .../stable/2019-03-01/resources.json | 2 +- .../examples/CreateResourceGroup.json | 32 + ...ntWithOnErrorDeploymentLastSuccessful.json | 54 + ...thOnErrorDeploymentSpecificDeployment.json | 55 + .../stable/2019-05-01/resources.json | 3495 +++++++++++++++++ 5 files changed, 3637 insertions(+), 1 deletion(-) create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/CreateResourceGroup.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-03-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-03-01/resources.json index e99b3dd7f330..64a1ebb5bfca 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-03-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-03-01/resources.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "ResourceManagementClient", - "version": "2018-05-01", + "version": "2019-03-01", "description": "Provides operations for working with resources and resource groups." }, "host": "management.azure.com", diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/CreateResourceGroup.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/CreateResourceGroup.json new file mode 100644 index 000000000000..312f1ceba2f5 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/CreateResourceGroup.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-05-01", + "parameters": { + "location": "eastus" + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup", + "name": "myResourceGroup", + "location": "eastus", + "properties": { + "provisioningState":"Succeeded" + } + } + }, + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup", + "name": "myResourceGroup", + "location": "eastus", + "properties": { + "provisioningState":"Succeeded" + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json new file mode 100644 index 000000000000..6f95a718c309 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myResourceGroup", + "deploymentName": "exampleDeploymentName", + "api-version": "2018-05-01", + "parameters": { + "properties": { + "templateLink": "{templateUri}", + "parameters": {}, + "mode": "Complete", + "onErrorDeployment": { + "type": "LastSuccessful" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/Microsoft.Resources/deployments/exampleDeploymentName", + "name": "exampleDeploymentName", + "type": "Microsoft.Resources/deployments", + "properties": { + "provisioningState": "Accepted", + "correlationId": "{correlationId}", + "timestamp": "2019-03-01T00:00:00.0000000Z", + "mode": "Complete", + "onErrorDeployment": { + "type": "LastSuccessful", + "deploymentName": "{nameOfLastSuccesfulDeployment}" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/Microsoft.Resources/deployments/exampleDeploymentName", + "name": "exampleDeploymentName", + "type": "Microsoft.Resources/deployments", + "properties": { + "provisioningState": "Accepted", + "correlationId": "{correlationId}", + "timestamp": "2019-03-01T00:00:00.0000000Z", + "mode": "Complete", + "onErrorDeployment": { + "type": "LastSuccessful", + "deploymentName": "{nameOfLastSuccesfulDeployment}" + } + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json new file mode 100644 index 000000000000..6ef4b13d1b5d --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myResourceGroup", + "deploymentName": "exampleDeploymentName", + "api-version": "2018-05-01", + "parameters": { + "properties": { + "templateLink": "{templateUri}", + "parameters": {}, + "mode": "Complete", + "onErrorDeployment": { + "type": "SpecificDeployment", + "deploymentName": "{nameOfDeploymentToUse}" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/Microsoft.Resources/deployments/exampleDeploymentName", + "name": "exampleDeploymentName", + "type": "Microsoft.Resources/deployments", + "properties": { + "provisioningState": "Accepted", + "correlationId": "{correlationId}", + "timestamp": "2019-03-01T00:00:00.0000000Z", + "mode": "Complete", + "onErrorDeployment": { + "type": "SpecificDeployment", + "deploymentName": "{nameOfDeploymentToUse}" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/Microsoft.Resources/deployments/exampleDeploymentName", + "name": "exampleDeploymentName", + "type": "Microsoft.Resources/deployments", + "properties": { + "provisioningState": "Accepted", + "correlationId": "{correlationId}", + "timestamp": "2019-03-01T00:00:00.0000000Z", + "mode": "Complete", + "onErrorDeployment": { + "type": "SpecificDeployment", + "deploymentName": "{nameOfDeploymentToUse}" + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json new file mode 100644 index 000000000000..971d5c30eb41 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json @@ -0,0 +1,3495 @@ +{ + "swagger": "2.0", + "info": { + "title": "ResourceManagementClient", + "version": "2019-05-01", + "description": "Provides operations for working with resources and resource groups." + }, + "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": { + "/providers/Microsoft.Resources/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available Microsoft.Resources REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}": { + "delete": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_DeleteAtSubscriptionScope", + "summary": "Deletes a deployment from the deployment history.", + "description": "A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.", + "parameters": [ + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to delete.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "202": { + "description": "Accepted - Returns this status until the asynchronous operation has completed." + }, + "204": { + "description": "No Content" + } + }, + "x-ms-long-running-operation": true + }, + "head": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_CheckExistenceAtSubscriptionScope", + "description": "Checks whether the deployment exists.", + "parameters": [ + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to check.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" + } + } + }, + "put": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_CreateOrUpdateAtSubscriptionScope", + "summary": "Deploys resources at subscription scope.", + "description": "You can provide the template and parameters directly in the request or link to JSON files.", + "parameters": [ + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Deployment" + }, + "description": "Additional parameters supplied to the operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deployment, including provisioning status.", + "schema": { + "$ref": "#/definitions/DeploymentExtended" + } + }, + "201": { + "description": "Created - Returns information about the deployment, including provisioning status.", + "schema": { + "$ref": "#/definitions/DeploymentExtended" + } + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_GetAtSubscriptionScope", + "description": "Gets a deployment.", + "parameters": [ + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to get.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deployment, including provisioning status.", + "schema": { + "$ref": "#/definitions/DeploymentExtended" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel": { + "post": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_CancelAtSubscriptionScope", + "summary": "Cancels a currently running template deployment.", + "description": "You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.", + "parameters": [ + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to cancel.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate": { + "post": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_ValidateAtSubscriptionScope", + "description": "Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..", + "parameters": [ + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Deployment" + }, + "description": "Parameters to validate." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the validation result.", + "schema": { + "$ref": "#/definitions/DeploymentValidateResult" + } + }, + "400": { + "description": "Returns the validation result.", + "schema": { + "$ref": "#/definitions/DeploymentValidateResult" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate": { + "post": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_ExportTemplateAtSubscriptionScope", + "description": "Exports the template used for specified deployment.", + "parameters": [ + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment from which to get the template.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the template.", + "schema": { + "$ref": "#/definitions/DeploymentExportResult" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/": { + "get": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_ListAtSubscriptionScope", + "description": "Get all the deployments for a subscription.", + "parameters": [ + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'." + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to get. If null is passed, returns all deployments." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of deployments.", + "schema": { + "$ref": "#/definitions/DeploymentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/DeploymentExtendedFilter" + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}": { + "delete": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_Delete", + "summary": "Deletes a deployment from the deployment history.", + "description": "A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. Deleting a template deployment does not affect the state of the resource group. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group with the deployment to delete. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to delete.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "202": { + "description": "Accepted - Returns this status until the asynchronous operation has completed." + }, + "204": { + "description": "No Content" + } + }, + "x-ms-long-running-operation": true + }, + "head": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_CheckExistence", + "description": "Checks whether the deployment exists.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group with the deployment to check. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to check.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" + } + } + }, + "put": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_CreateOrUpdate", + "summary": "Deploys resources to a resource group.", + "description": "You can provide the template and parameters directly in the request or link to JSON files.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group to deploy the resources to. The name is case insensitive. The resource group must already exist.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Deployment" + }, + "description": "Additional parameters supplied to the operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deployment, including provisioning status.", + "schema": { + "$ref": "#/definitions/DeploymentExtended" + } + }, + "201": { + "description": "Created - Returns information about the deployment, including provisioning status.", + "schema": { + "$ref": "#/definitions/DeploymentExtended" + } + } + }, + "x-ms-examples": { + "Create a deployment that will redeploy the last successful deployment on failure": { + "$ref": "./examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json" + }, + "Create a deployment that will redeploy another deployment on failure": { + "$ref": "./examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json" + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_Get", + "description": "Gets a deployment.", + "parameters": [ + { + "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 + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to get.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deployment, including provisioning status.", + "schema": { + "$ref": "#/definitions/DeploymentExtended" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel": { + "post": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_Cancel", + "summary": "Cancels a currently running template deployment.", + "description": "You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resource group partially deployed.", + "parameters": [ + { + "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 + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to cancel.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate": { + "post": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_Validate", + "description": "Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group the template will be deployed to. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Deployment" + }, + "description": "Parameters to validate." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the validation result.", + "schema": { + "$ref": "#/definitions/DeploymentValidateResult" + } + }, + "400": { + "description": "Returns the validation result.", + "schema": { + "$ref": "#/definitions/DeploymentValidateResult" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate": { + "post": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_ExportTemplate", + "description": "Exports the template used for specified deployment.", + "parameters": [ + { + "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 + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment from which to get the template.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the template.", + "schema": { + "$ref": "#/definitions/DeploymentExportResult" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/": { + "get": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_ListByResourceGroup", + "description": "Get all the deployments for a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group with the deployments to get. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'." + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to get. If null is passed, returns all deployments." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of deployments.", + "schema": { + "$ref": "#/definitions/DeploymentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/DeploymentExtendedFilter" + } + }, + "/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister": { + "post": { + "tags": [ + "Providers" + ], + "operationId": "Providers_Unregister", + "description": "Unregisters a subscription from a resource provider.", + "parameters": [ + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider to unregister." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the resource provider.", + "schema": { + "$ref": "#/definitions/Provider" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register": { + "post": { + "tags": [ + "Providers" + ], + "operationId": "Providers_Register", + "description": "Registers a subscription with a resource provider.", + "parameters": [ + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider to register." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the resource provider.", + "schema": { + "$ref": "#/definitions/Provider" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers": { + "get": { + "tags": [ + "Providers" + ], + "operationId": "Providers_List", + "description": "Gets all resource providers for a subscription.", + "parameters": [ + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to return. If null is passed returns all deployments." + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "The properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider metadata. To include property aliases in response, use $expand=resourceTypes/aliases." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of resource providers.", + "schema": { + "$ref": "#/definitions/ProviderListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}": { + "get": { + "tags": [ + "Providers" + ], + "operationId": "Providers_Get", + "description": "Gets the specified resource provider.", + "parameters": [ + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases." + }, + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the resource provider.", + "schema": { + "$ref": "#/definitions/Provider" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources": { + "get": { + "tags": [ + "ResourceGroups" + ], + "operationId": "Resources_ListByResourceGroup", + "description": "Get all the resources for a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group with the resources to get.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation.

The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.

For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'

You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.

For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)

You can link more than one substringof together by adding and/or operators.

You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'

You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId." + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "The $expand query parameter. You can expand createdTime and changedTime. For example, to expand both properties, use $expand=changedTime,createdTime" + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to return. If null is passed, returns all resources." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of resources", + "schema": { + "$ref": "#/definitions/ResourceListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/GenericResourceFilter" + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}": { + "head": { + "tags": [ + "ResourceGroups" + ], + "operationId": "ResourceGroups_CheckExistence", + "description": "Checks whether a resource group exists.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group to check. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" + } + } + }, + "put": { + "tags": [ + "ResourceGroups" + ], + "x-ms-examples": { + "Create or update a resource group": { "$ref": "./examples/CreateResourceGroup.json" } + }, + "operationId": "ResourceGroups_CreateOrUpdate", + "description": "Creates or updates a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ResourceGroup" + }, + "description": "Parameters supplied to the create or update a resource group." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "Created - Returns information about the new resource group.", + "schema": { + "$ref": "#/definitions/ResourceGroup" + } + }, + "200": { + "description": "OK - Returns information about the new resource group.", + "schema": { + "$ref": "#/definitions/ResourceGroup" + } + } + } + }, + "delete": { + "tags": [ + "ResourceGroups" + ], + "operationId": "ResourceGroups_Delete", + "summary": "Deletes a resource group.", + "description": "When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group to delete. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "200": { + "description": "OK" + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "ResourceGroups" + ], + "operationId": "ResourceGroups_Get", + "description": "Gets a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group to get. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the resource group.", + "schema": { + "$ref": "#/definitions/ResourceGroup" + } + } + } + }, + "patch": { + "tags": [ + "ResourceGroups" + ], + "operationId": "ResourceGroups_Update", + "summary": "Updates a resource group.", + "description": "Resource groups can be updated through a simple PATCH operation to a group address. The format of the request is the same as that for creating a resource group. If a field is unspecified, the current value is retained.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group to update. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ResourceGroupPatchable" + }, + "description": "Parameters supplied to update a resource group." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the resource group.", + "schema": { + "$ref": "#/definitions/ResourceGroup" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate": { + "post": { + "tags": [ + "ResourceGroups" + ], + "operationId": "ResourceGroups_ExportTemplate", + "description": "Captures the specified resource group as a template.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group to export as a template.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ExportTemplateRequest" + }, + "description": "Parameters for exporting the template." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the result of the export.", + "schema": { + "$ref": "#/definitions/ResourceGroupExportResult" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups": { + "get": { + "tags": [ + "ResourceGroups" + ], + "operationId": "ResourceGroups_List", + "description": "Gets all the resource groups for a subscription.", + "parameters": [ + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation.

You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'" + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to return. If null is passed, returns all resource groups." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of resource groups.", + "schema": { + "$ref": "#/definitions/ResourceGroupListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/ResourceGroupFilter" + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources": { + "post": { + "tags": [ + "Resources" + ], + "operationId": "Resources_MoveResources", + "summary": "Moves resources from one resource group to another resource group.", + "description": "The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. ", + "parameters": [ + { + "name": "sourceResourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing the resources to move.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ResourcesMoveInfo" + }, + "description": "Parameters for moving resources." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "204": { + "description": "No Content" + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources": { + "post": { + "tags": [ + "Resources" + ], + "operationId": "Resources_ValidateMoveResources", + "summary": "Validates whether resources can be moved from one resource group to another resource group.", + "description": "This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation.", + "parameters": [ + { + "name": "sourceResourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing the resources to validate for move.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ResourcesMoveInfo" + }, + "description": "Parameters for moving resources." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "204": { + "description": "No Content" + }, + "409": { + "description": "Conflict" + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resources": { + "get": { + "tags": [ + "Resources" + ], + "operationId": "Resources_List", + "description": "Get all the resources in a subscription.", + "parameters": [ + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation.

The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.

For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'

You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.

For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)

You can link more than one substringof together by adding and/or operators.

You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'

You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId." + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "The $expand query parameter. You can expand createdTime and changedTime. For example, to expand both properties, use $expand=changedTime,createdTime" + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to return. If null is passed, returns all resource groups." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of resources.", + "schema": { + "$ref": "#/definitions/ResourceListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/GenericResourceFilter" + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}": { + "head": { + "tags": [ + "Resources" + ], + "operationId": "Resources_CheckExistence", + "description": "Checks whether a resource exists.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing the resource to check. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The resource provider of the resource to check." + }, + { + "name": "parentResourcePath", + "in": "path", + "required": true, + "type": "string", + "description": "The parent resource identity.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The resource type.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource to check whether it exists." + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" + } + } + }, + "delete": { + "tags": [ + "Resources" + ], + "operationId": "Resources_Delete", + "description": "Deletes a resource.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group that contains the resource to delete. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." + }, + { + "name": "parentResourcePath", + "in": "path", + "required": true, + "type": "string", + "description": "The parent resource identity.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The resource type.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource to delete." + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "No Content" + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true + }, + "put": { + "tags": [ + "Resources" + ], + "operationId": "Resources_CreateOrUpdate", + "description": "Creates a resource.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group for the resource. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." + }, + { + "name": "parentResourcePath", + "in": "path", + "required": true, + "type": "string", + "description": "The parent resource identity.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The resource type of the resource to create.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource to create." + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GenericResource" + }, + "description": "Parameters for creating or updating the resource." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "Created - Returns information about the resource.", + "schema": { + "$ref": "#/definitions/GenericResource" + } + }, + "200": { + "description": "OK - Returns information about the resource.", + "schema": { + "$ref": "#/definitions/GenericResource" + } + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "Resources" + ], + "operationId": "Resources_Update", + "description": "Updates a resource.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group for the resource. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." + }, + { + "name": "parentResourcePath", + "in": "path", + "required": true, + "type": "string", + "description": "The parent resource identity.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The resource type of the resource to update.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource to update." + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GenericResource" + }, + "description": "Parameters for updating the resource." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the resource.", + "schema": { + "$ref": "#/definitions/GenericResource" + } + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "Resources" + ], + "operationId": "Resources_Get", + "description": "Gets a resource.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing the resource to get. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." + }, + { + "name": "parentResourcePath", + "in": "path", + "required": true, + "type": "string", + "description": "The parent resource identity.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The resource type of the resource.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource to get." + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the resource.", + "schema": { + "$ref": "#/definitions/GenericResource" + } + } + } + } + }, + "/{resourceId}": { + "head": { + "tags": [ + "Resources" + ], + "operationId": "Resources_CheckExistenceById", + "description": "Checks by ID whether a resource exists.", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}", + "x-ms-skip-url-encoding": true + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" + } + } + }, + "delete": { + "tags": [ + "Resources" + ], + "operationId": "Resources_DeleteById", + "description": "Deletes a resource by ID.", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}", + "x-ms-skip-url-encoding": true + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "No Content" + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true + }, + "put": { + "tags": [ + "Resources" + ], + "operationId": "Resources_CreateOrUpdateById", + "description": "Create a resource by ID.", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}", + "x-ms-skip-url-encoding": true + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GenericResource" + }, + "description": "Create or update resource parameters." + } + ], + "responses": { + "201": { + "description": "Created - Returns information about the resource.", + "schema": { + "$ref": "#/definitions/GenericResource" + } + }, + "200": { + "description": "OK - Returns information about the resource.", + "schema": { + "$ref": "#/definitions/GenericResource" + } + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "Resources" + ], + "operationId": "Resources_UpdateById", + "description": "Updates a resource by ID.", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}", + "x-ms-skip-url-encoding": true + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GenericResource" + }, + "description": "Update resource parameters." + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the resource.", + "schema": { + "$ref": "#/definitions/GenericResource" + } + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "Resources" + ], + "operationId": "Resources_GetById", + "description": "Gets a resource by ID.", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}", + "x-ms-skip-url-encoding": true + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the resource.", + "schema": { + "$ref": "#/definitions/GenericResource" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}": { + "delete": { + "tags": [ + "Tags" + ], + "operationId": "Tags_DeleteValue", + "description": "Deletes a tag value.", + "parameters": [ + { + "name": "tagName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the tag." + }, + { + "name": "tagValue", + "in": "path", + "required": true, + "type": "string", + "description": "The value of the tag to delete." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "No Content" + } + } + }, + "put": { + "tags": [ + "Tags" + ], + "operationId": "Tags_CreateOrUpdateValue", + "description": "Creates a tag value. The name of the tag must already exist.", + "parameters": [ + { + "name": "tagName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the tag." + }, + { + "name": "tagValue", + "in": "path", + "required": true, + "type": "string", + "description": "The value of the tag to create." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the tag value.", + "schema": { + "$ref": "#/definitions/TagValue" + } + }, + "201": { + "description": "Created - Returns information about the tag value.", + "schema": { + "$ref": "#/definitions/TagValue" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/tagNames/{tagName}": { + "put": { + "tags": [ + "Tags" + ], + "operationId": "Tags_CreateOrUpdate", + "summary": "Creates a tag in the subscription.", + "description": "The tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes.", + "parameters": [ + { + "name": "tagName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the tag to create." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the tag.", + "schema": { + "$ref": "#/definitions/TagDetails" + } + }, + "201": { + "description": "Created - Returns information about the tag.", + "schema": { + "$ref": "#/definitions/TagDetails" + } + } + } + }, + "delete": { + "tags": [ + "Tags" + ], + "operationId": "Tags_Delete", + "summary": "Deletes a tag from the subscription.", + "description": "You must remove all values from a resource tag before you can delete it.", + "parameters": [ + { + "name": "tagName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the tag." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/subscriptions/{subscriptionId}/tagNames": { + "get": { + "tags": [ + "Tags" + ], + "operationId": "Tags_List", + "description": "Gets the names and values of all resource tags that are defined in a subscription.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of tag names and values.", + "schema": { + "$ref": "#/definitions/TagsListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}": { + "get": { + "tags": [ + "DeploymentOperations" + ], + "operationId": "DeploymentOperations_GetAtSubscriptionScope", + "description": "Gets a deployments operation.", + "parameters": [ + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the operation to get." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deployment operation.", + "schema": { + "$ref": "#/definitions/DeploymentOperation" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations": { + "get": { + "tags": [ + "DeploymentOperations" + ], + "operationId": "DeploymentOperations_ListAtSubscriptionScope", + "description": "Gets all deployments operations for a deployment.", + "parameters": [ + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment with the operation to get.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to return." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Return an array of deployment operations.", + "schema": { + "$ref": "#/definitions/DeploymentOperationsListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}": { + "get": { + "tags": [ + "DeploymentOperations" + ], + "operationId": "DeploymentOperations_Get", + "description": "Gets a deployments operation.", + "parameters": [ + { + "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 + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the operation to get." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deployment operation.", + "schema": { + "$ref": "#/definitions/DeploymentOperation" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations": { + "get": { + "tags": [ + "DeploymentOperations" + ], + "operationId": "DeploymentOperations_List", + "description": "Gets all deployments operations for a deployment.", + "parameters": [ + { + "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 + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment with the operation to get.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to return." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Return an array of deployment operations.", + "schema": { + "$ref": "#/definitions/DeploymentOperationsListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "DeploymentExtendedFilter": { + "properties": { + "provisioningState": { + "type": "string", + "description": "The provisioning state." + } + }, + "description": "Deployment filter." + }, + "GenericResourceFilter": { + "properties": { + "resourceType": { + "type": "string", + "description": "The resource type." + }, + "tagname": { + "type": "string", + "description": "The tag name." + }, + "tagvalue": { + "type": "string", + "description": "The tag value." + } + }, + "description": "Resource filter." + }, + "ResourceGroupFilter": { + "properties": { + "tagName": { + "type": "string", + "description": "The tag name." + }, + "tagValue": { + "type": "string", + "description": "The tag value." + } + }, + "description": "Resource group filter." + }, + "TemplateLink": { + "properties": { + "uri": { + "type": "string", + "description": "The URI of the template to deploy." + }, + "contentVersion": { + "type": "string", + "description": "If included, must match the ContentVersion in the template." + } + }, + "required": [ + "uri" + ], + "description": "Entity representing the reference to the template." + }, + "ParametersLink": { + "properties": { + "uri": { + "type": "string", + "description": "The URI of the parameters file." + }, + "contentVersion": { + "type": "string", + "description": "If included, must match the ContentVersion in the template." + } + }, + "required": [ + "uri" + ], + "description": "Entity representing the reference to the deployment parameters." + }, + "DeploymentProperties": { + "properties": { + "template": { + "type": "object", + "description": "The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both." + }, + "templateLink": { + "$ref": "#/definitions/TemplateLink", + "description": "The URI of the template. Use either the templateLink property or the template property, but not both." + }, + "parameters": { + "type": "object", + "description": "Name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string." + }, + "parametersLink": { + "$ref": "#/definitions/ParametersLink", + "description": "The URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both." + }, + "mode": { + "type": "string", + "description": "The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources.", + "enum": [ + "Incremental", + "Complete" + ], + "x-ms-enum": { + "name": "DeploymentMode", + "modelAsString": false + } + }, + "debugSetting": { + "$ref": "#/definitions/DebugSetting", + "description": "The debug setting of the deployment." + }, + "onErrorDeployment": { + "$ref": "#/definitions/OnErrorDeployment", + "description": "The deployment on error behavior." + } + }, + "required": [ + "mode" + ], + "description": "Deployment properties." + }, + "DebugSetting": { + "properties": { + "detailLevel": { + "type": "string", + "description": "Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations." + } + } + }, + "Deployment": { + "properties": { + "location": { + "type": "string", + "description": "The location to store the deployment data." + }, + "properties": { + "$ref": "#/definitions/DeploymentProperties", + "description": "The deployment properties." + } + }, + "required": [ + "properties" + ], + "description": "Deployment operation parameters." + }, + "DeploymentExportResult": { + "properties": { + "template": { + "type": "object", + "description": "The template content." + } + }, + "description": "The deployment export result. " + }, + "ResourceManagementErrorWithDetails": { + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code returned when exporting the template." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message describing the export error." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The target of the error." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ResourceManagementErrorWithDetails" + }, + "description": "Validation error." + } + }, + "description": "The detailed error message of resource management." + }, + "AliasPathType": { + "properties": { + "path": { + "type": "string", + "description": "The path of an alias." + }, + "apiVersions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The API versions." + } + }, + "description": "The type of the paths for alias. " + }, + "AliasType": { + "properties": { + "name": { + "type": "string", + "description": "The alias name." + }, + "paths": { + "type": "array", + "items": { + "$ref": "#/definitions/AliasPathType" + }, + "description": "The paths for an alias." + } + }, + "description": "The alias type. " + }, + "ProviderResourceType": { + "properties": { + "resourceType": { + "type": "string", + "description": "The resource type." + }, + "locations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The collection of locations where this resource type can be created." + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/AliasType" + }, + "description": "The aliases that are supported by this resource type." + }, + "apiVersions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The API version." + }, + "capabilities": { + "type": "string", + "description": "The additional capabilities offered by this resource type." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string", + "description": "The additional properties. " + }, + "description": "The properties." + } + }, + "description": "Resource type managed by the resource provider." + }, + "Provider": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The provider ID." + }, + "namespace": { + "type": "string", + "description": "The namespace of the resource provider." + }, + "registrationState": { + "readOnly": true, + "type": "string", + "description": "The registration state of the resource provider." + }, + "registrationPolicy": { + "readOnly": true, + "type": "string", + "description": "The registration policy of the resource provider." + }, + "resourceTypes": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ProviderResourceType" + }, + "description": "The collection of provider resource types." + } + }, + "description": "Resource provider information." + }, + "BasicDependency": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the dependency." + }, + "resourceType": { + "type": "string", + "description": "The dependency resource type." + }, + "resourceName": { + "type": "string", + "description": "The dependency resource name." + } + }, + "description": "Deployment dependency information." + }, + "Dependency": { + "properties": { + "dependsOn": { + "type": "array", + "items": { + "$ref": "#/definitions/BasicDependency" + }, + "description": "The list of dependencies." + }, + "id": { + "type": "string", + "description": "The ID of the dependency." + }, + "resourceType": { + "type": "string", + "description": "The dependency resource type." + }, + "resourceName": { + "type": "string", + "description": "The dependency resource name." + } + }, + "description": "Deployment dependency information." + }, + "DeploymentPropertiesExtended": { + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "The state of the provisioning." + }, + "correlationId": { + "readOnly": true, + "type": "string", + "description": "The correlation ID of the deployment." + }, + "timestamp": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The timestamp of the template deployment." + }, + "outputs": { + "type": "object", + "description": "Key/value pairs that represent deployment output." + }, + "providers": { + "type": "array", + "items": { + "$ref": "#/definitions/Provider" + }, + "description": "The list of resource providers needed for the deployment." + }, + "dependencies": { + "type": "array", + "items": { + "$ref": "#/definitions/Dependency" + }, + "description": "The list of deployment dependencies." + }, + "template": { + "type": "object", + "description": "The template content. Use only one of Template or TemplateLink." + }, + "templateLink": { + "$ref": "#/definitions/TemplateLink", + "description": "The URI referencing the template. Use only one of Template or TemplateLink." + }, + "parameters": { + "type": "object", + "description": "Deployment parameters. Use only one of Parameters or ParametersLink." + }, + "parametersLink": { + "$ref": "#/definitions/ParametersLink", + "description": "The URI referencing the parameters. Use only one of Parameters or ParametersLink." + }, + "mode": { + "type": "string", + "description": "The deployment mode. Possible values are Incremental and Complete.", + "enum": [ + "Incremental", + "Complete" + ], + "x-ms-enum": { + "name": "DeploymentMode", + "modelAsString": false + } + }, + "debugSetting": { + "$ref": "#/definitions/DebugSetting", + "description": "The debug setting of the deployment." + }, + "onErrorDeployment": { + "$ref": "#/definitions/OnErrorDeploymentExtended", + "description": "The deployment on error behavior." + } + }, + "description": "Deployment properties with additional details." + }, + "OnErrorDeployment": { + "properties": { + "type": { + "type": "string", + "description": "The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.", + "enum": [ + "LastSuccessful", + "SpecificDeployment" + ], + "x-ms-enum": { + "name": "OnErrorDeploymentType", + "modelAsString": false + } + }, + "deploymentName": { + "type": "string", + "description": "The deployment to be used on error case." + } + }, + "description": "Deployment on error behavior." + }, + "OnErrorDeploymentExtended": { + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "The state of the provisioning for the on error deployment." + }, + "type": { + "type": "string", + "description": "The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.", + "enum": [ + "LastSuccessful", + "SpecificDeployment" + ], + "x-ms-enum": { + "name": "OnErrorDeploymentType", + "modelAsString": false + } + }, + "deploymentName": { + "type": "string", + "description": "The deployment to be used on error case." + } + }, + "description": "Deployment on error behavior with additional details." + }, + "DeploymentValidateResult": { + "properties": { + "error": { + "$ref": "#/definitions/ResourceManagementErrorWithDetails", + "description": "Validation error." + }, + "properties": { + "$ref": "#/definitions/DeploymentPropertiesExtended", + "description": "The template deployment properties." + } + }, + "description": "Information from validate template deployment response." + }, + "DeploymentExtended": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The ID of the deployment." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the deployment." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The type of the deployment." + }, + "location": { + "type": "string", + "description": "the location of the deployment." + }, + "properties": { + "$ref": "#/definitions/DeploymentPropertiesExtended", + "description": "Deployment properties." + } + }, + "x-ms-azure-resource": true, + "description": "Deployment information." + }, + "DeploymentListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentExtended" + }, + "description": "An array of deployments." + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "List of deployments." + }, + "ProviderListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Provider" + }, + "description": "An array of resource providers." + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "List of resource providers." + }, + "GenericResource": { + "properties": { + "plan": { + "$ref": "#/definitions/Plan", + "description": "The plan of the resource." + }, + "properties": { + "type": "object", + "description": "The resource properties." + }, + "kind": { + "type": "string", + "description": "The kind of the resource.", + "pattern": "^[-\\w\\._,\\(\\)]+$" + }, + "managedBy": { + "type": "string", + "description": "ID of the resource that manages this resource." + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "The SKU of the resource." + }, + "identity": { + "$ref": "#/definitions/Identity", + "description": "The identity of the resource." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "description": "Resource information." + }, + "Plan": { + "properties": { + "name": { + "type": "string", + "description": "The plan ID." + }, + "publisher": { + "type": "string", + "description": "The publisher ID." + }, + "product": { + "type": "string", + "description": "The offer ID." + }, + "promotionCode": { + "type": "string", + "description": "The promotion code." + }, + "version": { + "type": "string", + "description": "The plan's version." + } + }, + "description": "Plan for the resource." + }, + "Sku": { + "properties": { + "name": { + "type": "string", + "description": "The SKU name." + }, + "tier": { + "type": "string", + "description": "The SKU tier." + }, + "size": { + "type": "string", + "description": "The SKU size." + }, + "family": { + "type": "string", + "description": "The SKU family." + }, + "model": { + "type": "string", + "description": "The SKU model." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "The SKU capacity." + } + }, + "description": "SKU for the resource." + }, + "Identity": { + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + }, + "userAssignedIdentities": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal id of user assigned identity." + }, + "clientId": { + "readOnly": true, + "type": "string", + "description": "The client id of user assigned identity." + } + } + }, + "description": "The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'." + } + }, + "description": "Identity for the resource." + }, + "ResourceListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/GenericResource" + }, + "description": "An array of resources." + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "List of resource groups." + }, + "ResourceGroup": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The ID of the resource group." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource group." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The type of the resource group." + }, + "properties": { + "$ref": "#/definitions/ResourceGroupProperties" + }, + "location": { + "type": "string", + "description": "The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations." + }, + "managedBy": { + "type": "string", + "description": "The ID of the resource that manages this resource group." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "description": "The additional properties. " + }, + "description": "The tags attached to the resource group." + } + }, + "required": [ + "location" + ], + "x-ms-azure-resource": true, + "description": "Resource group information." + }, + "ResourceGroupPatchable": { + "properties": { + "name": { + "type": "string", + "description": "The name of the resource group." + }, + "properties": { + "$ref": "#/definitions/ResourceGroupProperties" + }, + "managedBy": { + "type": "string", + "description": "The ID of the resource that manages this resource group." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "description": "The additional properties. " + }, + "description": "The tags attached to the resource group." + } + }, + "description": "Resource group information." + }, + "ResourceGroupProperties": { + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "The provisioning state. " + } + }, + "description": "The resource group properties." + }, + "ResourceGroupListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceGroup" + }, + "description": "An array of resource groups." + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "List of resource groups." + }, + "ResourcesMoveInfo": { + "properties": { + "resources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The IDs of the resources." + }, + "targetResourceGroup": { + "type": "string", + "description": "The target resource group." + } + }, + "description": "Parameters of move resources." + }, + "ExportTemplateRequest": { + "properties": { + "resources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The IDs of the resources. The only supported string currently is '*' (all resources). Future updates will support exporting specific resources." + }, + "options": { + "type": "string", + "description": "The export template options. Supported values include 'IncludeParameterDefaultValue', 'IncludeComments' or 'IncludeParameterDefaultValue, IncludeComments" + } + }, + "description": "Export resource group template request parameters." + }, + "TagCount": { + "properties": { + "type": { + "type": "string", + "description": "Type of count." + }, + "value": { + "type": "integer", + "description": "Value of count." + } + }, + "description": "Tag count." + }, + "TagValue": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The tag ID." + }, + "tagValue": { + "type": "string", + "description": "The tag value." + }, + "count": { + "$ref": "#/definitions/TagCount", + "description": "The tag value count." + } + }, + "x-ms-azure-resource": true, + "description": "Tag information." + }, + "TagDetails": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The tag ID." + }, + "tagName": { + "type": "string", + "description": "The tag name." + }, + "count": { + "$ref": "#/definitions/TagCount", + "description": "The total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0." + }, + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/TagValue" + }, + "description": "The list of tag values." + } + }, + "description": "Tag details." + }, + "TagsListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/TagDetails" + }, + "description": "An array of tags." + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "List of subscription tags." + }, + "TargetResource": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the resource." + }, + "resourceName": { + "type": "string", + "description": "The name of the resource." + }, + "resourceType": { + "type": "string", + "description": "The type of the resource." + } + }, + "description": "Target resource." + }, + "HttpMessage": { + "properties": { + "content": { + "type": "object", + "description": "HTTP message content." + } + }, + "description": "HTTP message." + }, + "DeploymentOperationProperties": { + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "The state of the provisioning." + }, + "timestamp": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The date and time of the operation." + }, + "serviceRequestId": { + "readOnly": true, + "type": "string", + "description": "Deployment operation service request id." + }, + "statusCode": { + "readOnly": true, + "type": "string", + "description": "Operation status code." + }, + "statusMessage": { + "readOnly": true, + "type": "object", + "description": "Operation status message." + }, + "targetResource": { + "readOnly": true, + "$ref": "#/definitions/TargetResource", + "description": "The target resource." + }, + "request": { + "readOnly": true, + "$ref": "#/definitions/HttpMessage", + "description": "The HTTP request message." + }, + "response": { + "readOnly": true, + "$ref": "#/definitions/HttpMessage", + "description": "The HTTP response message." + } + }, + "description": "Deployment operation properties." + }, + "DeploymentOperation": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Full deployment operation ID." + }, + "operationId": { + "readOnly": true, + "type": "string", + "description": "Deployment operation ID." + }, + "properties": { + "$ref": "#/definitions/DeploymentOperationProperties", + "description": "Deployment properties." + } + }, + "description": "Deployment operation information." + }, + "DeploymentOperationsListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentOperation" + }, + "description": "An array of deployment operations." + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "List of deployment operations." + }, + "ResourceProviderOperationDisplayProperties": { + "properties": { + "publisher": { + "type": "string", + "description": "Operation description." + }, + "provider": { + "type": "string", + "description": "Operation provider." + }, + "resource": { + "type": "string", + "description": "Operation resource." + }, + "operation": { + "type": "string", + "description": "Resource provider operation." + }, + "description": { + "type": "string", + "description": "Operation description." + } + }, + "description": "Resource provider operation's display properties." + }, + "Resource": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource ID" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type" + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "x-ms-azure-resource": true, + "description": "Specified resource." + }, + "SubResource": { + "properties": { + "id": { + "type": "string", + "description": "Resource ID" + } + }, + "x-ms-azure-resource": true, + "description": "Sub-resource." + }, + "ResourceGroupExportResult": { + "properties": { + "template": { + "type": "object", + "description": "The template content." + }, + "error": { + "$ref": "#/definitions/ResourceManagementErrorWithDetails", + "description": "The error." + } + }, + "description": "Resource group export result." + }, + "Operation": { + "description": "Microsoft.Resources operation", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Resources", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed: Profile, endpoint, etc.", + "type": "string" + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string" + }, + "description": { + "description": "Description of the operation.", + "type": "string" + } + } + } + } + }, + "OperationListResult": { + "description": "Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of Microsoft.Resources operations." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation." + } + } +} From 53ffdba46f400f94a1834ef9cb988a1b94137c5b Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Tue, 23 Apr 2019 00:43:39 +0000 Subject: [PATCH 02/11] Add changes for management group deployment. --- .../examples/CreateResourceGroup.json | 2 +- .../PutDeploymentAtManagementGroup.json | 0 ...ntWithOnErrorDeploymentLastSuccessful.json | 2 +- ...thOnErrorDeploymentSpecificDeployment.json | 2 +- .../stable/2019-05-01/resources.json | 412 ++++++++++++++++++ 5 files changed, 415 insertions(+), 3 deletions(-) create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/CreateResourceGroup.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/CreateResourceGroup.json index 312f1ceba2f5..4bbd729add54 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/CreateResourceGroup.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/CreateResourceGroup.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", - "api-version": "2018-05-01", + "api-version": "2019-05-01", "parameters": { "location": "eastus" } diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json index 6f95a718c309..8ccbdfdbbb6c 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json @@ -3,7 +3,7 @@ "subscriptionId": "{subscriptionId}", "resourceGroupName": "myResourceGroup", "deploymentName": "exampleDeploymentName", - "api-version": "2018-05-01", + "api-version": "2019-05-01", "parameters": { "properties": { "templateLink": "{templateUri}", diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json index 6ef4b13d1b5d..869acfd61511 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json @@ -3,7 +3,7 @@ "subscriptionId": "{subscriptionId}", "resourceGroupName": "myResourceGroup", "deploymentName": "exampleDeploymentName", - "api-version": "2018-05-01", + "api-version": "2019-05-01", "parameters": { "properties": { "templateLink": "{templateUri}", diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json index 971d5c30eb41..d31b2a6ec262 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json @@ -59,6 +59,321 @@ } } }, + "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}": { + "delete": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_DeleteAtManagementGroupScope", + "summary": "Deletes a deployment from the deployment history.", + "description": "A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to delete.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted - Returns this status until the asynchronous operation has completed." + }, + "204": { + "description": "No Content" + } + }, + "x-ms-long-running-operation": true + }, + "head": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_CheckExistenceAtManagementGroupScope", + "description": "Checks whether the deployment exists.", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to check.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" + } + } + }, + "put": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_CreateOrUpdateAtManagementGroupScope", + "summary": "Deploys resources at management group scope.", + "description": "You can provide the template and parameters directly in the request or link to JSON files.", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Deployment" + }, + "description": "Additional parameters supplied to the operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deployment, including provisioning status.", + "schema": { + "$ref": "#/definitions/DeploymentExtended" + } + }, + "201": { + "description": "Created - Returns information about the deployment, including provisioning status.", + "schema": { + "$ref": "#/definitions/DeploymentExtended" + } + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_GetAtManagementGroupScope", + "description": "Gets a deployment.", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to get.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deployment, including provisioning status.", + "schema": { + "$ref": "#/definitions/DeploymentExtended" + } + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel": { + "post": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_CancelAtManagementGroupScope", + "summary": "Cancels a currently running template deployment.", + "description": "You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to cancel.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate": { + "post": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_ValidateAtManagementGroupScope", + "description": "Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Deployment" + }, + "description": "Parameters to validate." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the validation result.", + "schema": { + "$ref": "#/definitions/DeploymentValidateResult" + } + }, + "400": { + "description": "Returns the validation result.", + "schema": { + "$ref": "#/definitions/DeploymentValidateResult" + } + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate": { + "post": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_ExportTemplateAtManagementGroupScope", + "description": "Exports the template used for specified deployment.", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment from which to get the template.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the template.", + "schema": { + "$ref": "#/definitions/DeploymentExportResult" + } + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/": { + "get": { + "tags": [ + "Deployments" + ], + "operationId": "Deployments_ListAtManagementGroupScope", + "description": "Get all the deployments for a management group.", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'." + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to get. If null is passed, returns all deployments." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of deployments.", + "schema": { + "$ref": "#/definitions/DeploymentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/DeploymentExtendedFilter" + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}": { "delete": { "tags": [ @@ -2166,6 +2481,94 @@ } } }, + "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}": { + "get": { + "tags": [ + "DeploymentOperations" + ], + "operationId": "DeploymentOperations_GetAtManagementGroupScope", + "description": "Gets a deployments operation.", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the operation to get." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deployment operation.", + "schema": { + "$ref": "#/definitions/DeploymentOperation" + } + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations": { + "get": { + "tags": [ + "DeploymentOperations" + ], + "operationId": "DeploymentOperations_ListAtSubscriptionScope", + "description": "Gets all deployments operations for a deployment.", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment with the operation to get.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64 + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The number of results to return." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Return an array of deployment operations.", + "schema": { + "$ref": "#/definitions/DeploymentOperationsListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}": { "get": { "tags": [ @@ -3477,6 +3880,15 @@ } }, "parameters": { + "GroupIdParameter": { + "name": "groupId", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the deployment to delete.", + "minLength": 1, + "maxLength": 90 + }, "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", From dff86dcb7f32d5b58147c195161d217933bfce85 Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Tue, 23 Apr 2019 01:28:22 +0000 Subject: [PATCH 03/11] add changes in readme.md. --- .../resource-manager/readme.csharp.md | 80 +++++++++++++++++++ .../resources/resource-manager/readme.md | 35 ++++++-- 2 files changed, 109 insertions(+), 6 deletions(-) diff --git a/specification/resources/resource-manager/readme.csharp.md b/specification/resources/resource-manager/readme.csharp.md index 8dbbc8578b4a..1ffef3d1f00d 100644 --- a/specification/resources/resource-manager/readme.csharp.md +++ b/specification/resources/resource-manager/readme.csharp.md @@ -71,6 +71,19 @@ batch: ApiVersionName: Api2018_05_01 - policyD-2016-12-01: true ApiVersionName: Api2018_05_01 + + - resources-2019-05-01: true + ApiVersionName: Api2019_05_01 + - links-2016-09-01: true + ApiVersionName: Api2019_05_01 + - subscription-2016-06-01: true + ApiVersionName: Api2019_05_01 + - locks-2016-09-01: true + ApiVersionName: Api2019_05_01 + - policyA-2016-12-01: true + ApiVersionName: Api2019_05_01 + - policyD-2016-12-01: true + ApiVersionName: Api2019_05_01 ``` @@ -261,6 +274,73 @@ input-file: - Microsoft.Authorization/stable/2016-12-01/policyDefinitions.json ``` +``` yaml $(Separator) +########################################################################### +########################################################################### +``` + + +``` yaml $(resources-2019-05-01) +tag: pkg-2019-05-Az-res +``` + +``` yaml $(links-2016-09-01) +tag: pkg-2019-05-Az-lnk +``` + +``` yaml $(subscription-2016-06-01) +tag: pkg-2019-05-Az-sub +``` + +``` yaml $(locks-2016-09-01) +tag: pkg-2019-05-Az-loc +``` + +``` yaml $(policyA-2016-12-01) +tag: pkg-2019-05-Az-polA +``` + +``` yaml $(policyD-2016-12-01) +tag: pkg-2019-05-Az-polD +``` + + +## Tag: Packages for Azure Stack +### 1) pkg-2019-05-AzStk-res +``` yaml $(tag) == 'pkg-2019-05-Az-res' +input-file: +- Microsoft.Resources/stable/2019-05-01/resources.json +``` + +### 2) pkg-2019-05-AzStk-lnk +``` yaml $(tag) == 'pkg-2019-05-Az-lnk' +input-file: +- Microsoft.Resources/stable/2016-09-01/links.json +``` + +### 3) pkg-2019-05-AzStk-sub +``` yaml $(tag) == 'pkg-2019-05-Az-sub' +input-file: +- Microsoft.Resources/stable/2016-06-01/subscriptions.json +``` + +### 4) pkg-2019-05-AzStk-loc +``` yaml $(tag) == 'pkg-2019-05-Az-loc' +input-file: +- Microsoft.Authorization/stable/2016-09-01/locks.json +``` + +### 5) pkg-2019-05-AzStk-polA +``` yaml $(tag) == 'pkg-2019-05-Az-polA' +input-file: +- Microsoft.Authorization/stable/2016-12-01/policyAssignments.json +``` + +### 6) pkg-2019-05-AzStk-polD +``` yaml $(tag) == 'pkg-2019-05-Az-polD' +input-file: +- Microsoft.Authorization/stable/2016-12-01/policyDefinitions.json + ```yaml $(profile)=='hybrid_2018_03_01' namespace: Microsoft.Azure.Management.Profiles.$(profile).ResourceManager output-folder: $(csharp-sdks-folder)/$(profile)/Resource/Management.ResourceManager/Generated diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index 9384eb8ca206..d7c55389cb91 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -41,7 +41,7 @@ tag: package-policy-2018-05 ``` ``` yaml $(package-resources) -tag: package-resources-2019-03 +tag: package-resources-2019-05 ``` ``` yaml $(package-subscriptions) @@ -164,6 +164,14 @@ input-file: - Microsoft.Authorization/preview/2015-10-01-preview/policy.json ``` +### Tag: package-resources-2019-05 +These settings apply only when `--tag=package-resources-2019-05` is specified on the command line. + +``` yaml $(tag) == 'package-resources-2019-05' +input-file: +- Microsoft.Resources/stable/2019-05-01/resources.json +``` + ### Tag: package-resources-2019-03 These settings apply only when `--tag=package-resources-2019-03` is specified on the command line. @@ -412,6 +420,7 @@ batch: - tag: package-policy-2016-12 - tag: package-policy-2016-04 - tag: package-policy-2015-10 + - tag: package-resources-2019-05 - tag: package-resources-2019-03 - tag: package-resources-2018-05 - tag: package-resources-2018-02 @@ -554,15 +563,15 @@ python: output-folder: $(python-sdks-folder)/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview ``` -### Tag: package-resources-2019-11 and python +### Tag: package-resources-2019-05 and python -These settings apply only when `--tag=package-resources-2019-11 --python` is specified on the command line. +These settings apply only when `--tag=package-resources-2019-05 --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-resources-2019-11' && $(python) +``` yaml $(tag) == 'package-resources-2019-05' && $(python) python: - namespace: azure.mgmt.resource.resources.v2019_11_01 - output-folder: $(python-sdks-folder)/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_11_01 + namespace: azure.mgmt.resource.resources.v2019_05_01 + output-folder: $(python-sdks-folder)/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01 ``` ### Tag: package-resources-2018-05 and python @@ -671,6 +680,7 @@ batch: - tag: package-policy-2018-05 - tag: package-policy-2018-03 - tag: package-policy-2016-12 + - tag: package-resources-2019-05 - tag: package-resources-2019-03 - tag: package-resources-2018-02 - tag: package-resources-2016-09 @@ -760,6 +770,19 @@ directive: transform: $['x-ms-client-name'] = 'scopeProperty' ``` +### Tag: package-resources-2019-05 and java + +These settings apply only when `--tag=package-resources-2019-05 --java` is specified on the command line. +Please also specify `--azure-libraries-for-java-folder=`. + +``` yaml $(tag) == 'package-resources-2019-05' && $(java) && $(multiapi) +java: + namespace: com.microsoft.azure.management.resources.v2019_05_01 + output-folder: $(azure-libraries-for-java-folder)/resources/resource-manager/v2019_05_01 +regenerate-manager: true +generate-interface: true +``` + ### Tag: package-resources-2019-03 and java These settings apply only when `--tag=package-resources-2019-03 --java` is specified on the command line. From b66c68e73bf77c15772676955c1010c317dd2218 Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Fri, 26 Apr 2019 00:36:05 +0000 Subject: [PATCH 04/11] refactor. --- .../stable/2019-05-01/resources.json | 259 +++--------------- .../resource-manager/readme.csharp.md | 1 + 2 files changed, 41 insertions(+), 219 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json index d31b2a6ec262..713b37794754 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json @@ -72,14 +72,7 @@ "$ref": "#/parameters/GroupIdParameter" }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to delete.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -106,14 +99,7 @@ "$ref": "#/parameters/GroupIdParameter" }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to check.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -140,14 +126,7 @@ "$ref": "#/parameters/GroupIdParameter" }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "parameters", @@ -189,14 +168,7 @@ "$ref": "#/parameters/GroupIdParameter" }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to get.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -225,14 +197,7 @@ "$ref": "#/parameters/GroupIdParameter" }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to cancel.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -257,14 +222,7 @@ "$ref": "#/parameters/GroupIdParameter" }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "parameters", @@ -307,14 +265,7 @@ "$ref": "#/parameters/GroupIdParameter" }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment from which to get the template.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -384,14 +335,7 @@ "description": "A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.", "parameters": [ { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to delete.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -418,14 +362,7 @@ "description": "Checks whether the deployment exists.", "parameters": [ { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to check.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -452,14 +389,7 @@ "description": "You can provide the template and parameters directly in the request or link to JSON files.", "parameters": [ { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "parameters", @@ -501,14 +431,7 @@ "description": "Gets a deployment.", "parameters": [ { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to get.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -537,14 +460,7 @@ "description": "You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.", "parameters": [ { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to cancel.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -569,14 +485,7 @@ "description": "Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..", "parameters": [ { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "parameters", @@ -619,14 +528,7 @@ "description": "Exports the template used for specified deployment.", "parameters": [ { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment from which to get the template.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -709,14 +611,7 @@ "maxLength": 90 }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to delete.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -753,14 +648,7 @@ "maxLength": 90 }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to check.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -797,14 +685,7 @@ "maxLength": 90 }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "parameters", @@ -864,14 +745,7 @@ "maxLength": 90 }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to get.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -910,14 +784,7 @@ "maxLength": 90 }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment to cancel.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -952,14 +819,7 @@ "maxLength": 90 }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "parameters", @@ -1012,14 +872,7 @@ "maxLength": 90 }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment from which to get the template.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -2493,14 +2346,7 @@ "$ref": "#/parameters/GroupIdParameter" }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "operationId", @@ -2535,14 +2381,7 @@ "$ref": "#/parameters/GroupIdParameter" }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment with the operation to get.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "$top", @@ -2578,14 +2417,7 @@ "description": "Gets a deployments operation.", "parameters": [ { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "operationId", @@ -2620,14 +2452,7 @@ "description": "Gets all deployments operations for a deployment.", "parameters": [ { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment with the operation to get.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "$top", @@ -2676,14 +2501,7 @@ "maxLength": 90 }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "operationId", @@ -2728,14 +2546,7 @@ "maxLength": 90 }, { - "name": "deploymentName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the deployment with the operation to get.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 64 + "$ref": "#/parameters/DeploymentNameParameter" }, { "name": "$top", @@ -2782,11 +2593,11 @@ "type": "string", "description": "The resource type." }, - "tagname": { + "tagName": { "type": "string", "description": "The tag name." }, - "tagvalue": { + "tagValue": { "type": "string", "description": "The tag value." } @@ -3885,7 +3696,7 @@ "in": "path", "required": true, "type": "string", - "description": "The name of the deployment to delete.", + "description": "The management group ID.", "minLength": 1, "maxLength": 90 }, @@ -3896,6 +3707,16 @@ "type": "string", "description": "The ID of the target subscription." }, + "DeploymentNameParameter": { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 64, + "description": "The name of the deployment." + }, "ApiVersionParameter": { "name": "api-version", "in": "query", diff --git a/specification/resources/resource-manager/readme.csharp.md b/specification/resources/resource-manager/readme.csharp.md index 1ffef3d1f00d..c1a19804c0e6 100644 --- a/specification/resources/resource-manager/readme.csharp.md +++ b/specification/resources/resource-manager/readme.csharp.md @@ -340,6 +340,7 @@ input-file: ``` yaml $(tag) == 'pkg-2019-05-Az-polD' input-file: - Microsoft.Authorization/stable/2016-12-01/policyDefinitions.json +``` ```yaml $(profile)=='hybrid_2018_03_01' namespace: Microsoft.Azure.Management.Profiles.$(profile).ResourceManager From e44e929c7400eede16d202d6bf5aabea96279832 Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Fri, 26 Apr 2019 01:33:15 +0000 Subject: [PATCH 05/11] add example. --- .../PutDeploymentAtManagementGroup.json | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json index e69de29bb2d1..6e95058ac43f 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "groupId": "{managementGroupId}", + "deploymentName": "{deploymentName}", + "api-version": "2019-05-01", + "parameters": { + "properties": { + "templateLink": "{templateUri}", + "parameters": {}, + "mode": "Incremental", + "location": "eastus" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}", + "name": "{deploymentName}", + "type": "Microsoft.Resources/deployments", + "location": "eastus", + "properties": { + "templateHash": "7800326632997247042", + "parameters": {}, + "mode": "Incremental", + "provisioningState": "Accepted", + "timestamp": "2019-04-24T22:52:38.7895563Z", + "duration": "PT1.2970875S", + "correlationId": "{correlationId}", + "providers": [ + { + "namespace": "Microsoft.Authorization", + "resourceTypes": [ + { + "resourceType": "policyDefinitions", + "locations": [ + null + ] + }, + { + "resourceType": "policyAssignments", + "locations": [ + null + ] + } + ] + }, + { + "namespace": "Microsoft.Resources", + "resourceTypes": [ + { + "resourceType": "deployments", + "locations": [ + "eastus" + ] + } + ] + } + ], + "dependencies": [ + { + "dependsOn": [ + { + "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/policy2", + "resourceType": "Microsoft.Authorization/policyDefinitions", + "resourceName": "policy2" + } + ], + "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyAssignments/location-lock", + "resourceType": "Microsoft.Authorization/policyAssignments", + "resourceName": "location-lock" + } + ] + } + } + }, + "201": { + "body": { + "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}", + "name": "{deploymentName}", + "type": "Microsoft.Resources/deployments", + "location": "eastus", + "properties": { + "templateHash": "7800326632997247042", + "parameters": {}, + "mode": "Incremental", + "provisioningState": "Accepted", + "timestamp": "2019-04-24T22:52:38.7895563Z", + "duration": "PT1.2970875S", + "correlationId": "{correlationId}", + "providers": [ + { + "namespace": "Microsoft.Authorization", + "resourceTypes": [ + { + "resourceType": "policyDefinitions", + "locations": [ + null + ] + }, + { + "resourceType": "policyAssignments", + "locations": [ + null + ] + } + ] + }, + { + "namespace": "Microsoft.Resources", + "resourceTypes": [ + { + "resourceType": "deployments", + "locations": [ + "eastus" + ] + } + ] + } + ], + "dependencies": [ + { + "dependsOn": [ + { + "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/policy2", + "resourceType": "Microsoft.Authorization/policyDefinitions", + "resourceName": "policy2" + } + ], + "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyAssignments/location-lock", + "resourceType": "Microsoft.Authorization/policyAssignments", + "resourceName": "location-lock" + } + ] + } + } + } + } +} \ No newline at end of file From 3861ead790616224e5f992b28f5a85f0afeac3d2 Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Wed, 22 May 2019 01:41:33 +0000 Subject: [PATCH 06/11] more changes. --- .../stable/2019-05-01/resources.json | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json index 713b37794754..84be14d3ff0c 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json @@ -184,7 +184,7 @@ } } }, - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel": { + "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel": { "post": { "tags": [ "Deployments" @@ -210,7 +210,7 @@ } } }, - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate": { + "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate": { "post": { "tags": [ "Deployments" @@ -253,7 +253,7 @@ } } }, - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate": { + "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate": { "post": { "tags": [ "Deployments" @@ -281,7 +281,7 @@ } } }, - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/": { + "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/": { "get": { "tags": [ "Deployments" @@ -2374,7 +2374,7 @@ "tags": [ "DeploymentOperations" ], - "operationId": "DeploymentOperations_ListAtSubscriptionScope", + "operationId": "DeploymentOperations_ListAtManagementGroupScope", "description": "Gets all deployments operations for a deployment.", "parameters": [ { @@ -3493,6 +3493,11 @@ "format": "date-time", "description": "The date and time of the operation." }, + "duration": { + "readOnly": true, + "type": "string", + "description": "The duration of the operation." + }, "serviceRequestId": { "readOnly": true, "type": "string", @@ -3697,6 +3702,7 @@ "required": true, "type": "string", "description": "The management group ID.", + "x-ms-parameter-location": "method", "minLength": 1, "maxLength": 90 }, @@ -3713,6 +3719,7 @@ "required": true, "type": "string", "pattern": "^[-\\w\\._\\(\\)]+$", + "x-ms-parameter-location": "method", "minLength": 1, "maxLength": 64, "description": "The name of the deployment." From 2327cba0ebc83b23fb6eae66c0959bc97d4b971e Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Wed, 22 May 2019 18:33:46 +0000 Subject: [PATCH 07/11] revert the tagname and tagvalue change. --- .../Microsoft.Resources/stable/2019-05-01/resources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json index 84be14d3ff0c..c40fcd521fac 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json @@ -2593,11 +2593,11 @@ "type": "string", "description": "The resource type." }, - "tagName": { + "tagname": { "type": "string", "description": "The tag name." }, - "tagValue": { + "tagvalue": { "type": "string", "description": "The tag value." } From acbe2765795783a866bbc1e14f363cfa10aa39ef Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Wed, 22 May 2019 23:51:41 +0000 Subject: [PATCH 08/11] reference exmple file. --- .../Microsoft.Resources/stable/2019-05-01/resources.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json index c40fcd521fac..543c7cc7baa2 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json @@ -155,7 +155,12 @@ } } }, - "x-ms-long-running-operation": true + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create deployment at management group scope.": { + "$ref": "./examples/PutDeploymentAtManagementGroup.json" + } + } }, "get": { "tags": [ From 8dcf9c33a2073769dc4951842963e7d432774528 Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Thu, 23 May 2019 01:32:37 +0000 Subject: [PATCH 09/11] update example file. --- .../PutDeploymentAtManagementGroup.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json index 6e95058ac43f..2f5dc349b046 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json @@ -1,7 +1,7 @@ { "parameters": { - "groupId": "{managementGroupId}", - "deploymentName": "{deploymentName}", + "groupId": "tiano-group1", + "deploymentName": "mg-dep01", "api-version": "2019-05-01", "parameters": { "properties": { @@ -15,8 +15,8 @@ "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}", - "name": "{deploymentName}", + "id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Resources/deployments/mg-dep01", + "name": "mg-dep01", "type": "Microsoft.Resources/deployments", "location": "eastus", "properties": { @@ -61,12 +61,12 @@ { "dependsOn": [ { - "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/policy2", + "id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Authorization/policyDefinitions/policy2", "resourceType": "Microsoft.Authorization/policyDefinitions", "resourceName": "policy2" } ], - "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyAssignments/location-lock", + "id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Authorization/policyAssignments/location-lock", "resourceType": "Microsoft.Authorization/policyAssignments", "resourceName": "location-lock" } @@ -76,8 +76,8 @@ }, "201": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}", - "name": "{deploymentName}", + "id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Resources/deployments/mg-dep01", + "name": "mg-dep01", "type": "Microsoft.Resources/deployments", "location": "eastus", "properties": { @@ -122,12 +122,12 @@ { "dependsOn": [ { - "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/policy2", + "id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Authorization/policyDefinitions/policy2", "resourceType": "Microsoft.Authorization/policyDefinitions", "resourceName": "policy2" } ], - "id": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyAssignments/location-lock", + "id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Authorization/policyAssignments/location-lock", "resourceType": "Microsoft.Authorization/policyAssignments", "resourceName": "location-lock" } From 56031e910f28b966f9cbea55fde34c8e1c86b567 Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Thu, 23 May 2019 20:22:48 +0000 Subject: [PATCH 10/11] fixes --- .../2019-05-01/examples/PutDeploymentAtManagementGroup.json | 6 ++---- .../Microsoft.Resources/stable/2019-05-01/resources.json | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json index 2f5dc349b046..f4263ff58a74 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.json @@ -4,11 +4,11 @@ "deploymentName": "mg-dep01", "api-version": "2019-05-01", "parameters": { + "location": "eastus", "properties": { "templateLink": "{templateUri}", "parameters": {}, - "mode": "Incremental", - "location": "eastus" + "mode": "Incremental" } } }, @@ -20,7 +20,6 @@ "type": "Microsoft.Resources/deployments", "location": "eastus", "properties": { - "templateHash": "7800326632997247042", "parameters": {}, "mode": "Incremental", "provisioningState": "Accepted", @@ -81,7 +80,6 @@ "type": "Microsoft.Resources/deployments", "location": "eastus", "properties": { - "templateHash": "7800326632997247042", "parameters": {}, "mode": "Incremental", "provisioningState": "Accepted", diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json index 543c7cc7baa2..b97c93cdbd11 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json @@ -2924,6 +2924,11 @@ "format": "date-time", "description": "The timestamp of the template deployment." }, + "duration": { + "readOnly": true, + "type": "string", + "description": "The duration of the template deployment." + }, "outputs": { "type": "object", "description": "Key/value pairs that represent deployment output." From 621a104fcefa006dfdef9a4bb62a49f5d5280eeb Mon Sep 17 00:00:00 2001 From: Tian Ouyang Date: Wed, 29 May 2019 16:16:32 -0700 Subject: [PATCH 11/11] Add descriptions. --- .../Microsoft.Resources/stable/2019-05-01/resources.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json index b97c93cdbd11..ab751cf36d0a 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json @@ -2704,7 +2704,8 @@ "type": "string", "description": "Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations." } - } + }, + "description": "The debug setting." }, "Deployment": { "properties": { @@ -3282,7 +3283,8 @@ "description": "The type of the resource group." }, "properties": { - "$ref": "#/definitions/ResourceGroupProperties" + "$ref": "#/definitions/ResourceGroupProperties", + "description": "The resource group properties." }, "location": { "type": "string", @@ -3314,7 +3316,8 @@ "description": "The name of the resource group." }, "properties": { - "$ref": "#/definitions/ResourceGroupProperties" + "$ref": "#/definitions/ResourceGroupProperties", + "description": "The resource group properties." }, "managedBy": { "type": "string",