---
title: "Deploys resources at a given scope."
method: PUT
path: "/{scope}/providers/Microsoft.Resources/deployments/{deploymentName}"
tags: ["Deployments"]
---

# Deploys resources at a given scope.

`PUT /{scope}/providers/Microsoft.Resources/deployments/{deploymentName}`

You can provide the template and parameters directly in the request or link to JSON files.

## Path parameters

- `scope` string, required
- `deploymentName` string, required

## Query parameters

- `api-version` string, required

## Request body

- Deployment — Deployment operation parameters.
  - `location` string — The location to store the deployment data.
  - `properties` DeploymentProperties, required — Deployment properties.
    - `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` TemplateLink — Entity representing the reference to the template.
      - `uri` string, required — The URI of the template to deploy.
      - `contentVersion` string — If included, must match the ContentVersion in the template.
    - `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` ParametersLink — Entity representing the reference to the deployment parameters.
      - `uri` string, required — The URI of the parameters file.
      - `contentVersion` string — If included, must match the ContentVersion in the template.
    - `mode` 'Incremental' | 'Complete', required — 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.
    - `debugSetting` DebugSetting — The debug setting.
      - `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.
    - `onErrorDeployment` OnErrorDeployment — Deployment on error behavior.
      - `type` 'LastSuccessful' | 'SpecificDeployment' — The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.
      - `deploymentName` string — The deployment to be used on error case.

## Response `200`

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

- DeploymentExtended — Deployment information.
  - `id` string — The ID of the deployment.
  - `name` string — The name of the deployment.
  - `type` string — The type of the deployment.
  - `location` string — the location of the deployment.
  - `properties` DeploymentPropertiesExtended — Deployment properties with additional details.
    - `provisioningState` string — The state of the provisioning.
    - `correlationId` string — The correlation ID of the deployment.
    - `timestamp` string, date-time — The timestamp of the template deployment.
    - `duration` string — The duration of the template deployment.
    - `outputs` object — Key/value pairs that represent deployment output.
    - `providers` Provider[] — The list of resource providers needed for the deployment.
      - `id` string — The provider ID.
      - `namespace` string — The namespace of the resource provider.
      - `registrationState` string — The registration state of the resource provider.
      - `registrationPolicy` string — The registration policy of the resource provider.
      - `resourceTypes` ProviderResourceType[] — The collection of provider resource types.
        - `resourceType` string — The resource type.
        - `locations` string[] — The collection of locations where this resource type can be created.
        - `aliases` AliasType[] — The aliases that are supported by this resource type.
          - `name` string — The alias name.
          - `paths` AliasPathType[] — The paths for an alias.
            - `path` string — The path of an alias.
            - `apiVersions` string[] — The API versions.
        - `apiVersions` string[] — The API version.
        - `zoneMappings` ZoneMapping[]
          - `location` string — The location of the zone mapping.
          - `zones` string[]
        - `capabilities` string — The additional capabilities offered by this resource type.
        - `properties` object — The properties.
    - `dependencies` Dependency[] — The list of deployment dependencies.
      - `dependsOn` BasicDependency[] — The list of dependencies.
        - `id` string — The ID of the dependency.
        - `resourceType` string — The dependency resource type.
        - `resourceName` string — The dependency resource name.
      - `id` string — The ID of the dependency.
      - `resourceType` string — The dependency resource type.
      - `resourceName` string — The dependency resource name.
    - `template` object — The template content. Use only one of Template or TemplateLink.
    - `templateLink` TemplateLink — Entity representing the reference to the template.
      - `uri` string, required — The URI of the template to deploy.
      - `contentVersion` string — If included, must match the ContentVersion in the template.
    - `parameters` object — Deployment parameters. Use only one of Parameters or ParametersLink.
    - `parametersLink` ParametersLink — Entity representing the reference to the deployment parameters.
      - `uri` string, required — The URI of the parameters file.
      - `contentVersion` string — If included, must match the ContentVersion in the template.
    - `mode` 'Incremental' | 'Complete' — The deployment mode. Possible values are Incremental and Complete.
    - `debugSetting` DebugSetting — The debug setting.
      - `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.
    - `onErrorDeployment` OnErrorDeploymentExtended — Deployment on error behavior with additional details.
      - `provisioningState` string — The state of the provisioning for the on error deployment.
      - `type` 'LastSuccessful' | 'SpecificDeployment' — The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.
      - `deploymentName` string — The deployment to be used on error case.
    - `error` ErrorResponse — unresolved $ref

## Other responses

- `201` — Created - Returns information about the deployment, including provisioning status.
- `default` — Error response describing why the operation failed.

---

[API](https://skmtc.net/azure/apis/resourcemanagementclient.md) · [All operations](https://skmtc.net/azure/apis/resourcemanagementclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/resourcemanagementclient/revisions/917e67faecf0/schema)
