Skip to main content

deployments

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

Overview

Namedeployments
TypeResource
Idazure.resources.deployments

Fields

NameDatatypeDescription
idtextThe ID of the deployment.
nametextThe name of the deployment.
correlation_idtextfield from the properties object
debug_settingtextfield from the properties object
dependenciestextfield from the properties object
deploymentNametextfield from the properties object
durationtextfield from the properties object
errortextfield from the properties object
locationtextthe location of the deployment.
modetextfield from the properties object
on_error_deploymenttextfield from the properties object
output_resourcestextfield from the properties object
outputstextfield from the properties object
parameterstextfield from the properties object
parameters_linktextfield from the properties object
providerstextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextDeployment tags
template_hashtextfield from the properties object
template_linktextfield from the properties object
timestamptextfield from the properties object
typetextThe type of the deployment.
validated_resourcestextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdeploymentName, resourceGroupName, subscriptionIdGets a deployment.
get_at_management_group_scopeSELECTdeploymentName, groupIdGets a deployment.
get_at_scopeSELECTdeploymentName, scopeGets a deployment.
get_at_subscription_scopeSELECTdeploymentName, subscriptionIdGets a deployment.
get_at_tenant_scopeSELECTdeploymentNameGets a deployment.
list_at_management_group_scopeSELECTgroupIdGet all the deployments for a management group.
list_at_scopeSELECTscopeGet all the deployments at the given scope.
list_at_subscription_scopeSELECTsubscriptionIdGet all the deployments for a subscription.
list_at_tenant_scopeSELECTGet all the deployments at the tenant scope.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGet all the deployments for a resource group.
create_or_updateINSERTdeploymentName, resourceGroupName, subscriptionId, data__propertiesYou can provide the template and parameters directly in the request or link to JSON files.
create_or_update_at_management_group_scopeINSERTdeploymentName, groupId, data__location, data__propertiesYou can provide the template and parameters directly in the request or link to JSON files.
create_or_update_at_scopeINSERTdeploymentName, scope, data__propertiesYou can provide the template and parameters directly in the request or link to JSON files.
create_or_update_at_subscription_scopeINSERTdeploymentName, subscriptionId, data__propertiesYou can provide the template and parameters directly in the request or link to JSON files.
create_or_update_at_tenant_scopeINSERTdeploymentName, data__location, data__propertiesYou can provide the template and parameters directly in the request or link to JSON files.
deleteDELETEdeploymentName, resourceGroupName, subscriptionIdA 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.
calculate_template_hashEXECCalculate the hash of the given template.
cancelEXECdeploymentName, resourceGroupName, subscriptionIdYou 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.
cancel_at_management_group_scopeEXECdeploymentName, groupIdYou 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.
cancel_at_scopeEXECdeploymentName, scopeYou 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.
cancel_at_subscription_scopeEXECdeploymentName, subscriptionIdYou 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.
cancel_at_tenant_scopeEXECdeploymentNameYou 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.
delete_at_management_group_scopeEXECdeploymentName, groupIdA 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.
delete_at_scopeEXECdeploymentName, scopeA 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.
delete_at_subscription_scopeEXECdeploymentName, subscriptionIdA 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.
delete_at_tenant_scopeEXECdeploymentNameA 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.
export_templateEXECdeploymentName, resourceGroupName, subscriptionIdExports the template used for specified deployment.
export_template_at_management_group_scopeEXECdeploymentName, groupIdExports the template used for specified deployment.
export_template_at_scopeEXECdeploymentName, scopeExports the template used for specified deployment.
export_template_at_subscription_scopeEXECdeploymentName, subscriptionIdExports the template used for specified deployment.
export_template_at_tenant_scopeEXECdeploymentNameExports the template used for specified deployment.
validateEXECdeploymentName, resourceGroupName, subscriptionId, data__propertiesValidates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
validate_at_management_group_scopeEXECdeploymentName, groupId, data__location, data__propertiesValidates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
validate_at_scopeEXECdeploymentName, scope, data__propertiesValidates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
validate_at_subscription_scopeEXECdeploymentName, subscriptionId, data__propertiesValidates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
validate_at_tenant_scopeEXECdeploymentName, data__location, data__propertiesValidates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
what_ifEXECdeploymentName, resourceGroupName, subscriptionId, data__propertiesReturns changes that will be made by the deployment if executed at the scope of the resource group.
what_if_at_management_group_scopeEXECdeploymentName, groupId, data__location, data__propertiesReturns changes that will be made by the deployment if executed at the scope of the management group.
what_if_at_subscription_scopeEXECdeploymentName, subscriptionId, data__propertiesReturns changes that will be made by the deployment if executed at the scope of the subscription.
what_if_at_tenant_scopeEXECdeploymentName, data__location, data__propertiesReturns changes that will be made by the deployment if executed at the scope of the tenant group.

SELECT examples

Get all the deployments at the tenant scope.

SELECT
id,
name,
correlation_id,
debug_setting,
dependencies,
deploymentName,
duration,
error,
location,
mode,
on_error_deployment,
output_resources,
outputs,
parameters,
parameters_link,
providers,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
template_hash,
template_link,
timestamp,
type,
validated_resources
FROM azure.resources.vw_deployments
;

INSERT example

Use the following StackQL query and manifest file to create a new deployments resource.

/*+ create */
INSERT INTO azure.resources.deployments (
deploymentName,
scope,
data__properties,
location,
properties,
tags
)
SELECT
'{{ deploymentName }}',
'{{ scope }}',
'{{ data__properties }}',
'{{ location }}',
'{{ properties }}',
'{{ tags }}'
;

DELETE example

Deletes the specified deployments resource.

/*+ delete */
DELETE FROM azure.resources.deployments
WHERE deploymentName = '{{ deploymentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';