Deployments - Create Or Update At Subscription Scope

Deploys resources at subscription scope.
You can provide the template and parameters directly in the request or link to JSON files.

PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}?api-version=2018-05-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The ID of the target subscription.

deploymentName
path True
  • string

The name of the deployment.

Regex pattern: ^[-\w\._\(\)]+$

api-version
query True
  • string

The API version to use for this operation.

Request Body

Name Required Type Description
location
  • string

The location to store the deployment data.

properties True

The deployment properties.

Responses

Name Type Description
200 OK

OK - Returns information about the deployment, including provisioning status.

201 Created

Created - Returns information about the deployment, including provisioning status.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Definitions

AliasPathType

The type of the paths for alias.

AliasType

The alias type.

BasicDependency

Deployment dependency information.

DebugSetting
Dependency

Deployment dependency information.

Deployment

Deployment operation parameters.

DeploymentExtended

Deployment information.

DeploymentMode

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.

DeploymentProperties

Deployment properties.

DeploymentPropertiesExtended

Deployment properties with additional details.

OnErrorDeployment

Deployment on error behavior.

OnErrorDeploymentExtended

Deployment on error behavior with additional details.

OnErrorDeploymentType

The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.

ParametersLink

Entity representing the reference to the deployment parameters.

Provider

Resource provider information.

ProviderResourceType

Resource type managed by the resource provider.

TemplateLink

Entity representing the reference to the template.

AliasPathType

The type of the paths for alias.

Name Type Description
apiVersions
  • string[]

The API versions.

path
  • string

The path of an alias.

AliasType

The alias type.

Name Type Description
name
  • string

The alias name.

paths

The paths for an alias.

BasicDependency

Deployment dependency information.

Name Type Description
id
  • string

The ID of the dependency.

resourceName
  • string

The dependency resource name.

resourceType
  • string

The dependency resource type.

DebugSetting

Name Type Description
detailLevel
  • string

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.

Dependency

Deployment dependency information.

Name Type Description
dependsOn

The list of dependencies.

id
  • string

The ID of the dependency.

resourceName
  • string

The dependency resource name.

resourceType
  • string

The dependency resource type.

Deployment

Deployment operation parameters.

Name Type Description
location
  • string

The location to store the deployment data.

properties

The deployment properties.

DeploymentExtended

Deployment information.

Name Type Description
id
  • string

The ID of the deployment.

location
  • string

the location of the deployment.

name
  • string

The name of the deployment.

properties

Deployment properties.

type
  • string

The type of the deployment.

DeploymentMode

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.

Name Type Description
Complete
  • string
Incremental
  • string

DeploymentProperties

Deployment properties.

Name Type Description
debugSetting

The debug setting of the deployment.

mode

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.

onErrorDeployment

The deployment on error behavior.

parameters
  • object

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

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.

template
  • object

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

The URI of the template. Use either the templateLink property or the template property, but not both.

DeploymentPropertiesExtended

Deployment properties with additional details.

Name Type Description
correlationId
  • string

The correlation ID of the deployment.

debugSetting

The debug setting of the deployment.

dependencies

The list of deployment dependencies.

mode

The deployment mode. Possible values are Incremental and Complete.

onErrorDeployment

The deployment on error behavior.

outputs
  • object

Key/value pairs that represent deployment output.

parameters
  • object

Deployment parameters. Use only one of Parameters or ParametersLink.

parametersLink

The URI referencing the parameters. Use only one of Parameters or ParametersLink.

providers

The list of resource providers needed for the deployment.

provisioningState
  • string

The state of the provisioning.

template
  • object

The template content. Use only one of Template or TemplateLink.

templateLink

The URI referencing the template. Use only one of Template or TemplateLink.

timestamp
  • string

The timestamp of the template deployment.

OnErrorDeployment

Deployment on error behavior.

Name Type Description
deploymentName
  • string

The deployment to be used on error case.

type

The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.

OnErrorDeploymentExtended

Deployment on error behavior with additional details.

Name Type Description
deploymentName
  • string

The deployment to be used on error case.

provisioningState
  • string

The state of the provisioning for the on error deployment.

type

The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.

OnErrorDeploymentType

The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.

Name Type Description
LastSuccessful
  • string
SpecificDeployment
  • string

Entity representing the reference to the deployment parameters.

Name Type Description
contentVersion
  • string

If included, must match the ContentVersion in the template.

uri
  • string

The URI of the parameters file.

Provider

Resource provider information.

Name Type Description
id
  • string

The provider ID.

namespace
  • string

The namespace of the resource provider.

registrationPolicy
  • string

The registration policy of the resource provider.

registrationState
  • string

The registration state of the resource provider.

resourceTypes

The collection of provider resource types.

ProviderResourceType

Resource type managed by the resource provider.

Name Type Description
aliases

The aliases that are supported by this resource type.

apiVersions
  • string[]

The API version.

capabilities
  • string

The additional capabilities offered by this resource type.

locations
  • string[]

The collection of locations where this resource type can be created.

properties
  • object

The properties.

resourceType
  • string

The resource type.

Entity representing the reference to the template.

Name Type Description
contentVersion
  • string

If included, must match the ContentVersion in the template.

uri
  • string

The URI of the template to deploy.