Share via


Deployment Stacks - List At Management Group

Lists Deployment stacks at the specified scope.

GET https://management.azure.com/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks?api-version=2022-08-01-preview

URI Parameters

Name In Required Type Description
managementGroupId
path True

string

minLength: 1

The management group ID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

DeploymentStackListResult

Azure operation completed successfully.

Other Status Codes

ErrorResponse

An unexpected error response.

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

Examples

List management group Deployment stacks

Sample request

GET https://management.azure.com/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks?api-version=2022-08-01-preview

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack",
      "type": "Microsoft.Resources/deploymentStacks",
      "name": "simpleDeploymentStack",
      "location": "eastus",
      "tags": {
        "tagkey": "tagVal"
      },
      "systemData": {
        "createdBy": "string",
        "createdByType": "Application",
        "createdAt": "2020-02-01T01:01:01.1075056Z",
        "lastModifiedBy": "string",
        "lastModifiedByType": "Application",
        "lastModifiedAt": "2020-02-02T02:03:01.1974346Z"
      },
      "properties": {
        "actionOnUnmanage": {
          "resources": "delete",
          "resourceGroups": "delete",
          "managementGroups": "detach"
        },
        "denySettings": {
          "mode": "denyDelete",
          "excludedPrincipals": [
            "principal"
          ],
          "excludedActions": [
            "action"
          ],
          "applyToChildScopes": false
        },
        "parameters": {
          "parameter1": {
            "value": "a string"
          }
        },
        "outputs": {
          "myOut": "myVal"
        },
        "duration": "PT1D12H"
      }
    },
    {
      "id": "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack2",
      "type": "Microsoft.Resources/deploymentStacks",
      "name": "simpleDeploymentStack2",
      "location": "eastus",
      "tags": {
        "tagkey": "tagVal"
      },
      "systemData": {
        "createdBy": "string",
        "createdByType": "Application",
        "createdAt": "2020-02-01T01:01:01.1075056Z",
        "lastModifiedBy": "string",
        "lastModifiedByType": "Application",
        "lastModifiedAt": "2020-02-02T02:03:01.1974346Z"
      },
      "properties": {
        "deploymentId": "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deployments/simpleDeploymentStack2-20210301-3f41c",
        "provisioningState": "SucceededWithFailures",
        "resources": [
          {
            "id": "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0",
            "status": "managed",
            "denyStatus": "denyDelete"
          },
          {
            "id": "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
            "status": "managed",
            "denyStatus": "denyDelete"
          }
        ],
        "actionOnUnmanage": {
          "resources": "delete",
          "resourceGroups": "delete",
          "managementGroups": "detach"
        },
        "denySettings": {
          "mode": "denyDelete",
          "excludedPrincipals": [
            "principal"
          ],
          "excludedActions": [
            "action"
          ],
          "applyToChildScopes": false
        },
        "parameters": {
          "parameter1": {
            "value": "a string"
          }
        },
        "outputs": {
          "myOut": "myVal"
        },
        "duration": "PT1D12H"
      }
    }
  ]
}

Definitions

Name Description
ActionOnUnmanage

Defines the behavior of resources that are no longer managed after the stack is updated or deleted.

createdByType

The type of identity that created the resource.

DenySettings

Defines how resources deployed by the Deployment stack are locked.

DenySettingsMode

denySettings Mode that defines denied actions.

DenyStatusMode

denyAssignment settings applied to the resource.

DeploymentParameter

Deployment parameter for the template.

DeploymentStack

Deployment stack object.

DeploymentStackListResult

The response of a DeploymentStack list operation.

DeploymentStackProvisioningState

State of the deployment stack.

DeploymentStacksDebugSetting

The debug setting.

DeploymentStacksParametersLink

Entity representing the reference to the deployment parameters.

DeploymentStacksTemplateLink

Entity representing the reference to the template.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

KeyVaultParameterReference

Azure Key Vault parameter reference.

KeyVaultReference

Azure Key Vault reference.

ManagedResourceReference

The managed resource model.

ResourceReference

The resourceId model.

ResourceReferenceExtended

The resourceId extended model. This is used to document failed resources with a resourceId and a corresponding error.

ResourceStatusMode

Current management state of the resource in the deployment stack.

systemData

Metadata pertaining to creation and last modification of the resource.

UnmanageActionManagementGroupMode

Specifies an action for a newly unmanaged resource.

UnmanageActionResourceGroupMode

Specifies an action for a newly unmanaged resource group.

UnmanageActionResourceMode

Specifies an action for a newly unmanaged resource.

ActionOnUnmanage

Defines the behavior of resources that are no longer managed after the stack is updated or deleted.

Name Type Description
managementGroups

UnmanageActionManagementGroupMode

Specifies an action for a newly unmanaged resource management group.

resourceGroups

UnmanageActionResourceGroupMode

Specifies an action for a newly unmanaged resource group.

resources

UnmanageActionResourceMode

Specifies an action for a newly unmanaged resource.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DenySettings

Defines how resources deployed by the Deployment stack are locked.

Name Type Description
applyToChildScopes

boolean

DenySettings will be applied to child resource scopes of every managed resource with a deny assignment.

excludedActions

string[]

List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.

excludedPrincipals

string[]

List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.

mode

DenySettingsMode

denySettings Mode that defines denied actions.

DenySettingsMode

denySettings Mode that defines denied actions.

Value Description
denyDelete

Authorized users are able to read and modify the resources, but cannot delete.

denyWriteAndDelete

Authorized users can read from a resource, but cannot modify or delete it.

none

No denyAssignments have been applied.

DenyStatusMode

denyAssignment settings applied to the resource.

Value Description
denyDelete

Authorized users are able to read and modify the resources, but cannot delete.

notSupported

Resource type does not support denyAssignments.

inapplicable

denyAssignments are not supported on resources outside the scope of the deployment stack.

denyWriteAndDelete

Authorized users can only read from a resource, but cannot modify or delete it.

removedBySystem

Deny assignment has been removed by Azure due to a resource management change (management group move, etc.)

none

No denyAssignments have been applied.

DeploymentParameter

Deployment parameter for the template.

Name Type Description
reference

KeyVaultParameterReference

Azure Key Vault parameter reference.

type

string

Type of the value.

value

Input value to the parameter.

DeploymentStack

Deployment stack object.

Name Type Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

The geo-location where the resource lives. Required for subscription and management group scoped stacks. The location is inherited from the resource group for resource group scoped stacks.

name

string

The name of the resource

properties.actionOnUnmanage

ActionOnUnmanage

Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted.

properties.debugSetting

DeploymentStacksDebugSetting

The debug setting of the deployment.

properties.deletedResources

ResourceReference[]

An array of resources that were deleted during the most recent Deployment stack update. Deleted means that the resource was removed from the template and relevant deletion operations were specified.

properties.denySettings

DenySettings

Defines how resources deployed by the stack are locked.

properties.deploymentId

string

The resourceId of the deployment resource created by the deployment stack.

properties.deploymentScope

string

The scope at which the initial deployment should be created. If a scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').

properties.description

string

maxLength: 4096

Deployment stack description. Max length of 4096 characters.

properties.detachedResources

ResourceReference[]

An array of resources that were detached during the most recent Deployment stack update. Detached means that the resource was removed from the template, but no relevant deletion operations were specified. So, the resource still exists while no longer being associated with the stack.

properties.duration

string

The duration of the last successful Deployment stack update.

properties.error

ErrorDetail

The error detail.

properties.failedResources

ResourceReferenceExtended[]

An array of resources that failed to reach goal state during the most recent update. Each resourceId is accompanied by an error message.

properties.outputs

The outputs of the deployment resource created by the deployment stack.

properties.parameters

<string,  DeploymentParameter>

Name and value pairs that define the deployment parameters for the template. Use this element when providing the parameter values directly in the request, rather than linking to an existing parameter file. Use either the parametersLink property or the parameters property, but not both.

properties.parametersLink

DeploymentStacksParametersLink

The URI of parameters file. Use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both.

properties.provisioningState

DeploymentStackProvisioningState

State of the deployment stack.

properties.resources

ManagedResourceReference[]

An array of resources currently managed by the deployment stack.

properties.template

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.

properties.templateLink

DeploymentStacksTemplateLink

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

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

DeploymentStackListResult

The response of a DeploymentStack list operation.

Name Type Description
nextLink

string (uri)

The link to the next page of items

value

DeploymentStack[]

The DeploymentStack items on this page

DeploymentStackProvisioningState

State of the deployment stack.

Value Description
creating

The deployment stack is currently being created

validating

The deployment stack is currently being validated

waiting

The deployment stack is currently waiting

deploying

The deployment stack is currently deploying

canceling

The deployment stack is being cancelled

updatingDenyAssignments

The deployment stack is updating deny assignments

deletingResources

The deployment stack is deleting resources

succeeded

The deployment stack completed successfully

failed

The deployment stack has failed

canceled

The deployment stack has been cancelled

deleting

The deployment stack is being deleted

DeploymentStacksDebugSetting

The debug setting.

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 that is being passed in during deployment. By logging information about the request or response, sensitive data that is retrieved through the deployment operations could potentially be exposed.

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.

Entity representing the reference to the template.

Name Type Description
contentVersion

string

If included, must match the ContentVersion in the template.

id

string

The resourceId of a Template Spec. Use either the id or uri property, but not both.

queryString

string

The query string (for example, a SAS token) to be used with the templateLink URI.

relativePath

string

The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec. If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs.

uri

string

The URI of the template to deploy. Use either the uri or id property, but not both.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

KeyVaultParameterReference

Azure Key Vault parameter reference.

Name Type Description
keyVault

KeyVaultReference

Azure Key Vault reference.

secretName

string

Azure Key Vault secret name.

secretVersion

string

Azure Key Vault secret version.

KeyVaultReference

Azure Key Vault reference.

Name Type Description
id

string

Azure Key Vault resourceId.

ManagedResourceReference

The managed resource model.

Name Type Default value Description
denyStatus

DenyStatusMode

none

denyAssignment settings applied to the resource.

id

string

The ARM Resource ID of a resource managed by the deployment stack.

status

ResourceStatusMode

none

Current management state of the resource in the deployment stack.

ResourceReference

The resourceId model.

Name Type Description
id

string

The ARM Resource ID of a resource managed by the deployment stack.

ResourceReferenceExtended

The resourceId extended model. This is used to document failed resources with a resourceId and a corresponding error.

Name Type Description
error

ErrorDetail

The error detail.

id

string

The ARM Resource ID of a resource managed by the deployment stack.

ResourceStatusMode

Current management state of the resource in the deployment stack.

Value Description
managed

This resource is managed by the deployment stack.

removeDenyFailed

Unable to remove the deny assignment on resource.

deleteFailed

Unable to delete the resource from Azure. The delete will be retried on the next stack deployment, or can be deleted manually.

none

No management state.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

UnmanageActionManagementGroupMode

Specifies an action for a newly unmanaged resource.

Value Description
delete

Delete the management groups from Azure.

detach

Keep the management groups in Azure.

UnmanageActionResourceGroupMode

Specifies an action for a newly unmanaged resource group.

Value Description
delete

Delete the resource groups from Azure.

detach

Keep the resource groups in Azure.

UnmanageActionResourceMode

Specifies an action for a newly unmanaged resource.

Value Description
delete

Delete the resources from Azure

detach

Keep the resources in Azure