DeploymentsOperations Class

DeploymentsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
DeploymentsOperations

Constructor

DeploymentsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

begin_create_or_update

Deploys resources to a resource group.

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

begin_create_or_update_at_subscription_scope

Deploys resources at subscription scope.

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

begin_delete

Deletes a deployment from the deployment history.

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.

begin_delete_at_subscription_scope

Deletes a deployment from the deployment history.

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.

calculate_template_hash

Calculate the hash of the given template.

cancel

Cancels a currently running template deployment.

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_subscription_scope

Cancels a currently running template deployment.

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.

check_existence

Checks whether the deployment exists.

check_existence_at_subscription_scope

Checks whether the deployment exists.

export_template

Exports the template used for specified deployment.

export_template_at_subscription_scope

Exports the template used for specified deployment.

get

Gets a deployment.

get_at_subscription_scope

Gets a deployment.

list_at_subscription_scope

Get all the deployments for a subscription.

list_by_resource_group

Get all the deployments for a resource group.

validate

Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..

validate_at_subscription_scope

Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..

begin_create_or_update

Deploys resources to a resource group.

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

begin_create_or_update(resource_group_name: str, deployment_name: str, parameters: azure.mgmt.resource.resources.v2018_05_01.models._models_py3.Deployment, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentExtended]

Parameters

resource_group_name
str
Required

The name of the resource group to deploy the resources to. The name is case insensitive. The resource group must already exist.

deployment_name
str
Required

The name of the deployment.

parameters
Deployment
Required

Additional parameters supplied to the operation.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either DeploymentExtended or the result of cls(response)

Return type

Exceptions

begin_create_or_update_at_subscription_scope

Deploys resources at subscription scope.

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

begin_create_or_update_at_subscription_scope(deployment_name: str, parameters: azure.mgmt.resource.resources.v2018_05_01.models._models_py3.Deployment, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentExtended]

Parameters

deployment_name
str
Required

The name of the deployment.

parameters
Deployment
Required

Additional parameters supplied to the operation.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either DeploymentExtended or the result of cls(response)

Return type

Exceptions

begin_delete

Deletes a deployment from the deployment history.

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.

begin_delete(resource_group_name: str, deployment_name: str, **kwargs: Any) -> azure.core.polling._poller.LROPoller[None]

Parameters

resource_group_name
str
Required

The name of the resource group with the deployment to delete. The name is case insensitive.

deployment_name
str
Required

The name of the deployment to delete.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either None or the result of cls(response)

Return type

Exceptions

begin_delete_at_subscription_scope

Deletes a deployment from the deployment history.

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.

begin_delete_at_subscription_scope(deployment_name: str, **kwargs: Any) -> azure.core.polling._poller.LROPoller[None]

Parameters

deployment_name
str
Required

The name of the deployment to delete.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either None or the result of cls(response)

Return type

Exceptions

calculate_template_hash

Calculate the hash of the given template.

calculate_template_hash(template: Any, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_05_01.models._models_py3.TemplateHashResult

Parameters

template
any
Required

The template provided to calculate hash.

cls
callable

A custom type or function that will be passed the direct response

Returns

TemplateHashResult, or the result of cls(response)

Return type

Exceptions

cancel

Cancels a currently running template deployment.

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(resource_group_name: str, deployment_name: str, **kwargs: Any) -> None

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

deployment_name
str
Required

The name of the deployment to cancel.

cls
callable

A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

Exceptions

cancel_at_subscription_scope

Cancels a currently running template deployment.

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(deployment_name: str, **kwargs: Any) -> None

Parameters

deployment_name
str
Required

The name of the deployment to cancel.

cls
callable

A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

Exceptions

check_existence

Checks whether the deployment exists.

check_existence(resource_group_name: str, deployment_name: str, **kwargs: Any) -> bool

Parameters

resource_group_name
str
Required

The name of the resource group with the deployment to check. The name is case insensitive.

deployment_name
str
Required

The name of the deployment to check.

cls
callable

A custom type or function that will be passed the direct response

Returns

bool, or the result of cls(response)

Return type

Exceptions

check_existence_at_subscription_scope

Checks whether the deployment exists.

check_existence_at_subscription_scope(deployment_name: str, **kwargs: Any) -> bool

Parameters

deployment_name
str
Required

The name of the deployment to check.

cls
callable

A custom type or function that will be passed the direct response

Returns

bool, or the result of cls(response)

Return type

Exceptions

export_template

Exports the template used for specified deployment.

export_template(resource_group_name: str, deployment_name: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentExportResult

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

deployment_name
str
Required

The name of the deployment from which to get the template.

cls
callable

A custom type or function that will be passed the direct response

Returns

DeploymentExportResult, or the result of cls(response)

Return type

Exceptions

export_template_at_subscription_scope

Exports the template used for specified deployment.

export_template_at_subscription_scope(deployment_name: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentExportResult

Parameters

deployment_name
str
Required

The name of the deployment from which to get the template.

cls
callable

A custom type or function that will be passed the direct response

Returns

DeploymentExportResult, or the result of cls(response)

Return type

Exceptions

get

Gets a deployment.

get(resource_group_name: str, deployment_name: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentExtended

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

deployment_name
str
Required

The name of the deployment to get.

cls
callable

A custom type or function that will be passed the direct response

Returns

DeploymentExtended, or the result of cls(response)

Return type

Exceptions

get_at_subscription_scope

Gets a deployment.

get_at_subscription_scope(deployment_name: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentExtended

Parameters

deployment_name
str
Required

The name of the deployment to get.

cls
callable

A custom type or function that will be passed the direct response

Returns

DeploymentExtended, or the result of cls(response)

Return type

Exceptions

list_at_subscription_scope

Get all the deployments for a subscription.

list_at_subscription_scope(filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) -> Iterable[azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentListResult]

Parameters

filter
str
Required

The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. Default value is None.

top
int
Required

The number of results to get. If null is passed, returns all deployments. Default value is None.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either DeploymentListResult or the result of cls(response)

Return type

Exceptions

list_by_resource_group

Get all the deployments for a resource group.

list_by_resource_group(resource_group_name: str, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) -> Iterable[azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentListResult]

Parameters

resource_group_name
str
Required

The name of the resource group with the deployments to get. The name is case insensitive.

filter
str
Required

The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. Default value is None.

top
int
Required

The number of results to get. If null is passed, returns all deployments. Default value is None.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either DeploymentListResult or the result of cls(response)

Return type

Exceptions

validate

Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..

validate(resource_group_name: str, deployment_name: str, parameters: azure.mgmt.resource.resources.v2018_05_01.models._models_py3.Deployment, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentValidateResult

Parameters

resource_group_name
str
Required

The name of the resource group the template will be deployed to. The name is case insensitive.

deployment_name
str
Required

The name of the deployment.

parameters
Deployment
Required

Parameters to validate.

cls
callable

A custom type or function that will be passed the direct response

Returns

DeploymentValidateResult, or the result of cls(response)

Return type

Exceptions

validate_at_subscription_scope

Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..

validate_at_subscription_scope(deployment_name: str, parameters: azure.mgmt.resource.resources.v2018_05_01.models._models_py3.Deployment, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_05_01.models._models_py3.DeploymentValidateResult

Parameters

deployment_name
str
Required

The name of the deployment.

parameters
Deployment
Required

Parameters to validate.

cls
callable

A custom type or function that will be passed the direct response

Returns

DeploymentValidateResult, or the result of cls(response)

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.resource.resources.v2018_05_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\resource\\resources\\v2018_05_01\\models\\__init__.py'>