deployments
Creates, updates, deletes, gets or lists a deployments
resource.
Overview
Name | deployments |
Type | Resource |
Id | azure.resources.deployments |
Fields
- vw_deployments
- deployments
Name | Datatype | Description |
---|---|---|
id | text | The ID of the deployment. |
name | text | The name of the deployment. |
correlation_id | text | field from the properties object |
debug_setting | text | field from the properties object |
dependencies | text | field from the properties object |
deploymentName | text | field from the properties object |
duration | text | field from the properties object |
error | text | field from the properties object |
location | text | the location of the deployment. |
mode | text | field from the properties object |
on_error_deployment | text | field from the properties object |
output_resources | text | field from the properties object |
outputs | text | field from the properties object |
parameters | text | field from the properties object |
parameters_link | text | field from the properties object |
providers | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Deployment tags |
template_hash | text | field from the properties object |
template_link | text | field from the properties object |
timestamp | text | field from the properties object |
type | text | The type of the deployment. |
validated_resources | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | The ID of the deployment. |
name | string | The name of the deployment. |
location | string | the location of the deployment. |
properties | object | Deployment properties with additional details. |
tags | object | Deployment tags |
type | string | The type of the deployment. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | deploymentName, resourceGroupName, subscriptionId | Gets a deployment. |
get_at_management_group_scope | SELECT | deploymentName, groupId | Gets a deployment. |
get_at_scope | SELECT | deploymentName, scope | Gets a deployment. |
get_at_subscription_scope | SELECT | deploymentName, subscriptionId | Gets a deployment. |
get_at_tenant_scope | SELECT | deploymentName | Gets a deployment. |
list_at_management_group_scope | SELECT | groupId | Get all the deployments for a management group. |
list_at_scope | SELECT | scope | Get all the deployments at the given scope. |
list_at_subscription_scope | SELECT | subscriptionId | Get all the deployments for a subscription. |
list_at_tenant_scope | SELECT |
| Get all the deployments at the tenant scope. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Get all the deployments for a resource group. |
create_or_update | INSERT | deploymentName, resourceGroupName, subscriptionId, data__properties | You can provide the template and parameters directly in the request or link to JSON files. |
create_or_update_at_management_group_scope | INSERT | deploymentName, groupId, data__location, data__properties | You can provide the template and parameters directly in the request or link to JSON files. |
create_or_update_at_scope | INSERT | deploymentName, scope, data__properties | You can provide the template and parameters directly in the request or link to JSON files. |
create_or_update_at_subscription_scope | INSERT | deploymentName, subscriptionId, data__properties | You can provide the template and parameters directly in the request or link to JSON files. |
create_or_update_at_tenant_scope | INSERT | deploymentName, data__location, data__properties | You can provide the template and parameters directly in the request or link to JSON files. |
delete | DELETE | deploymentName, resourceGroupName, subscriptionId | A 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_hash | EXEC |
| Calculate the hash of the given template. |
cancel | EXEC | deploymentName, resourceGroupName, subscriptionId | You 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_scope | EXEC | deploymentName, groupId | You 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_scope | EXEC | deploymentName, scope | You 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_scope | EXEC | deploymentName, subscriptionId | You 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_scope | EXEC | deploymentName | You 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_scope | EXEC | deploymentName, groupId | A 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_scope | EXEC | deploymentName, scope | A 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_scope | EXEC | deploymentName, subscriptionId | A 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_scope | EXEC | deploymentName | A 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_template | EXEC | deploymentName, resourceGroupName, subscriptionId | Exports the template used for specified deployment. |
export_template_at_management_group_scope | EXEC | deploymentName, groupId | Exports the template used for specified deployment. |
export_template_at_scope | EXEC | deploymentName, scope | Exports the template used for specified deployment. |
export_template_at_subscription_scope | EXEC | deploymentName, subscriptionId | Exports the template used for specified deployment. |
export_template_at_tenant_scope | EXEC | deploymentName | Exports the template used for specified deployment. |
validate | EXEC | deploymentName, resourceGroupName, subscriptionId, data__properties | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. |
validate_at_management_group_scope | EXEC | deploymentName, groupId, data__location, data__properties | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. |
validate_at_scope | EXEC | deploymentName, scope, data__properties | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. |
validate_at_subscription_scope | EXEC | deploymentName, subscriptionId, data__properties | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. |
validate_at_tenant_scope | EXEC | deploymentName, data__location, data__properties | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. |
what_if | EXEC | deploymentName, resourceGroupName, subscriptionId, data__properties | Returns changes that will be made by the deployment if executed at the scope of the resource group. |
what_if_at_management_group_scope | EXEC | deploymentName, groupId, data__location, data__properties | Returns changes that will be made by the deployment if executed at the scope of the management group. |
what_if_at_subscription_scope | EXEC | deploymentName, subscriptionId, data__properties | Returns changes that will be made by the deployment if executed at the scope of the subscription. |
what_if_at_tenant_scope | EXEC | deploymentName, data__location, data__properties | Returns 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.
- vw_deployments
- deployments
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
;
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.resources.deployments
;
INSERT
example
Use the following StackQL query and manifest file to create a new deployments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.resources.deployments (
deploymentName,
scope,
data__properties,
location,
properties,
tags
)
SELECT
'{{ deploymentName }}',
'{{ scope }}',
'{{ data__properties }}',
'{{ location }}',
'{{ properties }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: location
value: string
- name: properties
value:
- name: template
value: object
- name: templateLink
value:
- name: uri
value: string
- name: id
value: string
- name: relativePath
value: string
- name: contentVersion
value: string
- name: queryString
value: string
- name: parameters
value: object
- name: parametersLink
value:
- name: uri
value: string
- name: contentVersion
value: string
- name: mode
value: string
- name: debugSetting
value:
- name: detailLevel
value: string
- name: onErrorDeployment
value:
- name: type
value: string
- name: deploymentName
value: string
- name: expressionEvaluationOptions
value:
- name: scope
value: string
- name: tags
value: object
DELETE
example
Deletes the specified deployments
resource.
/*+ delete */
DELETE FROM azure.resources.deployments
WHERE deploymentName = '{{ deploymentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';