Skip to main content

deployment_stacks

Creates, updates, deletes, gets or lists a deployment_stacks resource.

Overview

Namedeployment_stacks
TypeResource
Idazure.resource.deployment_stacks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
actionOnUnmanageobjectDefines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. Required.
bypassStackOutOfSyncErrorbooleanFlag to bypass service errors that indicate the stack resource list is not correctly synchronized.
correlationIdstringThe correlation id of the last Deployment stack upsert or delete operation. It is in GUID format and is used for tracing.
debugSettingobjectThe debug setting of the deployment.
deletedResourcesarrayAn 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.
denySettingsobjectDefines how resources deployed by the stack are locked. Required.
deploymentExtensionsarrayThe extensions used during deployment. Contains extension data for all extensible resources managed by the stack.
deploymentIdstringThe resourceId of the deployment resource created by the deployment stack.
deploymentScopestringThe 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}').
descriptionstringDeployment stack description. Max length of 4096 characters.
detachedResourcesarrayAn 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.
durationstringThe duration of the last successful Deployment stack update.
errorobjectThe error detail.
extensionConfigsobjectThe deployment extension configs. Keys of this object are extension aliases as defined in the deployment template.
externalInputDefinitionsobjectExternal input definitions, used by external tooling to define expected external input values.
externalInputsobjectExternal input values, used by external tooling for parameter evaluation.
failedResourcesarrayAn array of resources that failed to reach goal state during the most recent update. Each resourceId is accompanied by an error message.
locationstringThe 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.
outputsobjectThe outputs of the deployment resource created by the deployment stack.
parametersobjectName 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.
parametersLinkobjectThe 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.
provisioningStatestringState of the deployment stack. Known values are: "creating", "validating", "waiting", "deploying", "canceling", "updatingDenyAssignments", "deletingResources", "succeeded", "failed", "canceled", "deleting", "initializing", and "running". (creating, validating, waiting, deploying, canceling, updatingDenyAssignments, deletingResources, succeeded, failed, canceled, deleting, initializing, running)
resourcesarrayAn array of resources currently managed by the deployment stack.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
templateobjectThe 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.
templateLinkobjectThe URI of the template. Use either the templateLink property or the template property, but not both.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
validationLevelstringThe validation level of the deployment stack. Known values are: "Template", "Provider", and "ProviderNoRbac". (Template, Provider, ProviderNoRbac)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_at_resource_groupselectresource_group_name, deployment_stack_name, subscription_idGets the Deployment stack with the given name.
list_at_resource_groupselectresource_group_name, subscription_idLists Deployment stacks at the specified scope.
get_at_subscriptionselectdeployment_stack_name, subscription_idGets the Deployment stack with the given name.
get_at_management_groupselectmanagement_group_id, deployment_stack_nameGets the Deployment stack with the given name.
list_at_subscriptionselectsubscription_idLists Deployment stacks at the specified scope.
list_at_management_groupselectmanagement_group_idLists Deployment stacks at the specified scope.
create_or_update_at_resource_groupinsertresource_group_name, deployment_stack_name, subscription_idCreates or updates a Deployment stack at the specified scope.
create_or_update_at_subscriptioninsertdeployment_stack_name, subscription_idCreates or updates a Deployment stack at the specified scope.
create_or_update_at_management_groupinsertmanagement_group_id, deployment_stack_nameCreates or updates a Deployment stack at the specified scope.
create_or_update_at_resource_groupreplaceresource_group_name, deployment_stack_name, subscription_idCreates or updates a Deployment stack at the specified scope.
create_or_update_at_subscriptionreplacedeployment_stack_name, subscription_idCreates or updates a Deployment stack at the specified scope.
create_or_update_at_management_groupreplacemanagement_group_id, deployment_stack_nameCreates or updates a Deployment stack at the specified scope.
delete_at_resource_groupdeleteresource_group_name, deployment_stack_name, subscription_idunmanageAction.Resources, unmanageAction.ResourceGroups, unmanageAction.ManagementGroups, unmanageAction.ResourcesWithoutDeleteSupport, bypassStackOutOfSyncErrorDeletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned without content.
delete_at_subscriptiondeletedeployment_stack_name, subscription_idunmanageAction.Resources, unmanageAction.ResourceGroups, unmanageAction.ManagementGroups, unmanageAction.ResourcesWithoutDeleteSupport, bypassStackOutOfSyncErrorDeletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned without content.
delete_at_management_groupdeletemanagement_group_id, deployment_stack_nameunmanageAction.Resources, unmanageAction.ResourceGroups, unmanageAction.ManagementGroups, unmanageAction.ResourcesWithoutDeleteSupport, bypassStackOutOfSyncErrorDeletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned without content.
validate_stack_at_resource_groupexecresource_group_name, deployment_stack_name, subscription_idRuns preflight validation on the Deployment stack template at the specified scope to verify its acceptance to Azure Resource Manager.
export_template_at_resource_groupexecresource_group_name, deployment_stack_name, subscription_idExports the template used to create the Deployment stack at the specified scope.
validate_stack_at_subscriptionexecdeployment_stack_name, subscription_idRuns preflight validation on the Deployment stack template at the specified scope to verify its acceptance to Azure Resource Manager.
export_template_at_subscriptionexecdeployment_stack_name, subscription_idExports the template used to create the Deployment stack at the specified scope.
validate_stack_at_management_groupexecmanagement_group_id, deployment_stack_nameRuns preflight validation on the Deployment stack template at the specified scope to verify its acceptance to Azure Resource Manager.
export_template_at_management_groupexecmanagement_group_id, deployment_stack_nameExports the template used to create the Deployment stack at the specified scope.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_stack_namestringName of the deployment stack. Required.
management_group_idstringThe management group ID. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
bypassStackOutOfSyncErrorbooleanFlag to bypass service errors that indicate the stack resource list is not correctly synchronized. Default value is None.
unmanageAction.ManagementGroupsstringFlag to indicate delete rather than detach for unmanaged management groups. Known values are: "delete" and "detach". Default value is None.
unmanageAction.ResourceGroupsstringFlag to indicate delete rather than detach for unmanaged resource groups. Known values are: "delete" and "detach". Default value is None.
unmanageAction.ResourcesstringFlag to indicate delete rather than detach for unmanaged resources. Known values are: "delete" and "detach". Default value is None.
unmanageAction.ResourcesWithoutDeleteSupportstringSome resources do not support deletion. This flag will denote how the stack should handle those resources. Known values are: "detach" and "fail". Default value is None.

SELECT examples

Gets the Deployment stack with the given name.

SELECT
id,
name,
actionOnUnmanage,
bypassStackOutOfSyncError,
correlationId,
debugSetting,
deletedResources,
denySettings,
deploymentExtensions,
deploymentId,
deploymentScope,
description,
detachedResources,
duration,
error,
extensionConfigs,
externalInputDefinitions,
externalInputs,
failedResources,
location,
outputs,
parameters,
parametersLink,
provisioningState,
resources,
systemData,
tags,
template,
templateLink,
type,
validationLevel
FROM azure.resource.deployment_stacks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND deployment_stack_name = '{{ deployment_stack_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a Deployment stack at the specified scope.

INSERT INTO azure.resource.deployment_stacks (
properties,
location,
tags,
resource_group_name,
deployment_stack_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ location }}',
'{{ tags }}',
'{{ resource_group_name }}',
'{{ deployment_stack_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

REPLACE examples

Creates or updates a Deployment stack at the specified scope.

REPLACE azure.resource.deployment_stacks
SET
properties = '{{ properties }}',
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND deployment_stack_name = '{{ deployment_stack_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned without content.

DELETE FROM azure.resource.deployment_stacks
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND deployment_stack_name = '{{ deployment_stack_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND unmanageAction.Resources = '{{ unmanageAction.Resources }}'
AND unmanageAction.ResourceGroups = '{{ unmanageAction.ResourceGroups }}'
AND unmanageAction.ManagementGroups = '{{ unmanageAction.ManagementGroups }}'
AND unmanageAction.ResourcesWithoutDeleteSupport = '{{ unmanageAction.ResourcesWithoutDeleteSupport }}'
AND bypassStackOutOfSyncError = '{{ bypassStackOutOfSyncError }}'
;

Lifecycle Methods

Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to Azure Resource Manager.

EXEC azure.resource.deployment_stacks.validate_stack_at_resource_group 
@resource_group_name='{{ resource_group_name }}' --required,
@deployment_stack_name='{{ deployment_stack_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}",
"location": "{{ location }}",
"tags": "{{ tags }}"
}'
;