azure.mgmt.resource.resources.v2024_07_01.operations module
- class azure.mgmt.resource.resources.v2024_07_01.operations.DeploymentOperationsOperations(*args, **kwargs)[source]
Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ResourceManagementClient
’sdeployment_operations
attribute.- get(resource_group_name: str, deployment_name: str, operation_id: str, **kwargs: Any) DeploymentOperation [source]
Gets a deployments operation.
- Parameters:
- Returns:
DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- get_at_management_group_scope(group_id: str, deployment_name: str, operation_id: str, **kwargs: Any) DeploymentOperation [source]
Gets a deployments operation.
- Parameters:
- Returns:
DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- get_at_scope(scope: str, deployment_name: str, operation_id: str, **kwargs: Any) DeploymentOperation [source]
Gets a deployments operation.
- Parameters:
- Returns:
DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- get_at_subscription_scope(deployment_name: str, operation_id: str, **kwargs: Any) DeploymentOperation [source]
Gets a deployments operation.
- Parameters:
- Returns:
DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- get_at_tenant_scope(deployment_name: str, operation_id: str, **kwargs: Any) DeploymentOperation [source]
Gets a deployments operation.
- Parameters:
- Returns:
DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- list(resource_group_name: str, deployment_name: str, top: int | None = None, **kwargs: Any) Iterable[DeploymentOperation] [source]
Gets all deployments operations for a deployment.
- Parameters:
- Returns:
An iterator like instance of either DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- list_at_management_group_scope(group_id: str, deployment_name: str, top: int | None = None, **kwargs: Any) Iterable[DeploymentOperation] [source]
Gets all deployments operations for a deployment.
- Parameters:
- Returns:
An iterator like instance of either DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- list_at_scope(scope: str, deployment_name: str, top: int | None = None, **kwargs: Any) Iterable[DeploymentOperation] [source]
Gets all deployments operations for a deployment.
- Parameters:
- Returns:
An iterator like instance of either DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- list_at_subscription_scope(deployment_name: str, top: int | None = None, **kwargs: Any) Iterable[DeploymentOperation] [source]
Gets all deployments operations for a deployment.
- Parameters:
- Returns:
An iterator like instance of either DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- list_at_tenant_scope(deployment_name: str, top: int | None = None, **kwargs: Any) Iterable[DeploymentOperation] [source]
Gets all deployments operations for a deployment.
- Parameters:
- Returns:
An iterator like instance of either DeploymentOperation or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.resource.resources.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/resource/resources/v2024_07_01/models/__init__.py'>
- class azure.mgmt.resource.resources.v2024_07_01.operations.DeploymentsOperations(*args, **kwargs)[source]
Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ResourceManagementClient
’sdeployments
attribute.- begin_create_or_update(resource_group_name: str, deployment_name: str, parameters: _models.Deployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended] [source]
- begin_create_or_update(resource_group_name: str, deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended]
Deploys resources to a resource group.
You can provide the template and parameters directly in the request or link to JSON files.
- Parameters:
resource_group_name (str) – The name of the resource group to deploy the resources to. The name is case insensitive. The resource group must already exist. Required.
deployment_name (str) – The name of the deployment. Required.
parameters (Deployment or IO[bytes]) – Additional parameters supplied to the operation. Is either a Deployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- begin_create_or_update_at_management_group_scope(group_id: str, deployment_name: str, parameters: _models.ScopedDeployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended] [source]
- begin_create_or_update_at_management_group_scope(group_id: str, deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended]
Deploys resources at management group scope.
You can provide the template and parameters directly in the request or link to JSON files.
- Parameters:
group_id (str) – The management group ID. Required.
deployment_name (str) – The name of the deployment. Required.
parameters (ScopedDeployment or IO[bytes]) – Additional parameters supplied to the operation. Is either a ScopedDeployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- begin_create_or_update_at_scope(scope: str, deployment_name: str, parameters: _models.Deployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended] [source]
- begin_create_or_update_at_scope(scope: str, deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended]
Deploys resources at a given scope.
You can provide the template and parameters directly in the request or link to JSON files.
- Parameters:
scope (str) – The resource scope. Required.
deployment_name (str) – The name of the deployment. Required.
parameters (Deployment or IO[bytes]) – Additional parameters supplied to the operation. Is either a Deployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- begin_create_or_update_at_subscription_scope(deployment_name: str, parameters: _models.Deployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended] [source]
- begin_create_or_update_at_subscription_scope(deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended]
Deploys resources at subscription scope.
You can provide the template and parameters directly in the request or link to JSON files.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
parameters (Deployment or IO[bytes]) – Additional parameters supplied to the operation. Is either a Deployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- begin_create_or_update_at_tenant_scope(deployment_name: str, parameters: _models.ScopedDeployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended] [source]
- begin_create_or_update_at_tenant_scope(deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentExtended]
Deploys resources at tenant scope.
You can provide the template and parameters directly in the request or link to JSON files.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
parameters (ScopedDeployment or IO[bytes]) – Additional parameters supplied to the operation. Is either a ScopedDeployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- begin_delete(resource_group_name: str, deployment_name: str, **kwargs: Any) LROPoller[None] [source]
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.
- Parameters:
- Returns:
An instance of LROPoller that returns either None or the result of cls(response)
- Return type:
LROPoller[None]
- Raises:
- begin_delete_at_management_group_scope(group_id: str, deployment_name: str, **kwargs: Any) LROPoller[None] [source]
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.
- Parameters:
- Returns:
An instance of LROPoller that returns either None or the result of cls(response)
- Return type:
LROPoller[None]
- Raises:
- begin_delete_at_scope(scope: str, deployment_name: str, **kwargs: Any) LROPoller[None] [source]
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.
- Parameters:
- Returns:
An instance of LROPoller that returns either None or the result of cls(response)
- Return type:
LROPoller[None]
- Raises:
- begin_delete_at_subscription_scope(deployment_name: str, **kwargs: Any) LROPoller[None] [source]
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_tenant_scope(deployment_name: str, **kwargs: Any) LROPoller[None] [source]
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_validate(resource_group_name: str, deployment_name: str, parameters: _models.Deployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult] [source]
- begin_validate(resource_group_name: str, deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult]
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
- Parameters:
resource_group_name (str) – The name of the resource group the template will be deployed to. The name is case insensitive. Required.
deployment_name (str) – The name of the deployment. Required.
parameters (Deployment or IO[bytes]) – Parameters to validate. Is either a Deployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentValidateResult or the result of cls(response)
- Return type:
- Raises:
- begin_validate_at_management_group_scope(group_id: str, deployment_name: str, parameters: _models.ScopedDeployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult] [source]
- begin_validate_at_management_group_scope(group_id: str, deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult]
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
- Parameters:
group_id (str) – The management group ID. Required.
deployment_name (str) – The name of the deployment. Required.
parameters (ScopedDeployment or IO[bytes]) – Parameters to validate. Is either a ScopedDeployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentValidateResult or the result of cls(response)
- Return type:
- Raises:
- begin_validate_at_scope(scope: str, deployment_name: str, parameters: _models.Deployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult] [source]
- begin_validate_at_scope(scope: str, deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult]
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
- Parameters:
scope (str) – The resource scope. Required.
deployment_name (str) – The name of the deployment. Required.
parameters (Deployment or IO[bytes]) – Parameters to validate. Is either a Deployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentValidateResult or the result of cls(response)
- Return type:
- Raises:
- begin_validate_at_subscription_scope(deployment_name: str, parameters: _models.Deployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult] [source]
- begin_validate_at_subscription_scope(deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult]
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
- Parameters:
deployment_name (str) – The name of the deployment. Required.
parameters (Deployment or IO[bytes]) – Parameters to validate. Is either a Deployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentValidateResult or the result of cls(response)
- Return type:
- Raises:
- begin_validate_at_tenant_scope(deployment_name: str, parameters: _models.ScopedDeployment, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult] [source]
- begin_validate_at_tenant_scope(deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DeploymentValidateResult]
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
- Parameters:
deployment_name (str) – The name of the deployment. Required.
parameters (ScopedDeployment or IO[bytes]) – Parameters to validate. Is either a ScopedDeployment type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either DeploymentValidateResult or the result of cls(response)
- Return type:
- Raises:
- begin_what_if(resource_group_name: str, deployment_name: str, parameters: _models.DeploymentWhatIf, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.WhatIfOperationResult] [source]
- begin_what_if(resource_group_name: str, deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.WhatIfOperationResult]
Returns changes that will be made by the deployment if executed at the scope of the resource group.
- Parameters:
resource_group_name (str) – The name of the resource group the template will be deployed to. The name is case insensitive. Required.
deployment_name (str) – The name of the deployment. Required.
parameters (DeploymentWhatIf or IO[bytes]) – Parameters to validate. Is either a DeploymentWhatIf type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either WhatIfOperationResult or the result of cls(response)
- Return type:
- Raises:
- begin_what_if_at_management_group_scope(group_id: str, deployment_name: str, parameters: _models.ScopedDeploymentWhatIf, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.WhatIfOperationResult] [source]
- begin_what_if_at_management_group_scope(group_id: str, deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.WhatIfOperationResult]
Returns changes that will be made by the deployment if executed at the scope of the management group.
- Parameters:
group_id (str) – The management group ID. Required.
deployment_name (str) – The name of the deployment. Required.
parameters (ScopedDeploymentWhatIf or IO[bytes]) – Parameters to validate. Is either a ScopedDeploymentWhatIf type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either WhatIfOperationResult or the result of cls(response)
- Return type:
- Raises:
- begin_what_if_at_subscription_scope(deployment_name: str, parameters: _models.DeploymentWhatIf, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.WhatIfOperationResult] [source]
- begin_what_if_at_subscription_scope(deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.WhatIfOperationResult]
Returns changes that will be made by the deployment if executed at the scope of the subscription.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
parameters (DeploymentWhatIf or IO[bytes]) – Parameters to What If. Is either a DeploymentWhatIf type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either WhatIfOperationResult or the result of cls(response)
- Return type:
- Raises:
- begin_what_if_at_tenant_scope(deployment_name: str, parameters: _models.ScopedDeploymentWhatIf, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.WhatIfOperationResult] [source]
- begin_what_if_at_tenant_scope(deployment_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.WhatIfOperationResult]
Returns changes that will be made by the deployment if executed at the scope of the tenant group.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
parameters (ScopedDeploymentWhatIf or IO[bytes]) – Parameters to validate. Is either a ScopedDeploymentWhatIf type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either WhatIfOperationResult or the result of cls(response)
- Return type:
- Raises:
- calculate_template_hash(template: MutableMapping[str, Any], **kwargs: Any) TemplateHashResult [source]
Calculate the hash of the given template.
- Parameters:
template (JSON) – The template provided to calculate hash. Required.
- Returns:
TemplateHashResult or the result of cls(response)
- Return type:
- Raises:
- cancel(resource_group_name: str, deployment_name: str, **kwargs: Any) None [source]
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.
- Parameters:
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- cancel_at_management_group_scope(group_id: str, deployment_name: str, **kwargs: Any) None [source]
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.
- Parameters:
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- cancel_at_scope(scope: str, deployment_name: str, **kwargs: Any) None [source]
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.
- Parameters:
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- cancel_at_subscription_scope(deployment_name: str, **kwargs: Any) None [source]
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.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- cancel_at_tenant_scope(deployment_name: str, **kwargs: Any) None [source]
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.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- check_existence(resource_group_name: str, deployment_name: str, **kwargs: Any) bool [source]
Checks whether the deployment exists.
- Parameters:
- Returns:
bool or the result of cls(response)
- Return type:
- Raises:
- check_existence_at_management_group_scope(group_id: str, deployment_name: str, **kwargs: Any) bool [source]
Checks whether the deployment exists.
- Parameters:
- Returns:
bool or the result of cls(response)
- Return type:
- Raises:
- check_existence_at_scope(scope: str, deployment_name: str, **kwargs: Any) bool [source]
Checks whether the deployment exists.
- Parameters:
- Returns:
bool or the result of cls(response)
- Return type:
- Raises:
- check_existence_at_subscription_scope(deployment_name: str, **kwargs: Any) bool [source]
Checks whether the deployment exists.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
- Returns:
bool or the result of cls(response)
- Return type:
- Raises:
- check_existence_at_tenant_scope(deployment_name: str, **kwargs: Any) bool [source]
Checks whether the deployment exists.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
- Returns:
bool or the result of cls(response)
- Return type:
- Raises:
- export_template(resource_group_name: str, deployment_name: str, **kwargs: Any) DeploymentExportResult [source]
Exports the template used for specified deployment.
- Parameters:
- Returns:
DeploymentExportResult or the result of cls(response)
- Return type:
- Raises:
- export_template_at_management_group_scope(group_id: str, deployment_name: str, **kwargs: Any) DeploymentExportResult [source]
Exports the template used for specified deployment.
- Parameters:
- Returns:
DeploymentExportResult or the result of cls(response)
- Return type:
- Raises:
- export_template_at_scope(scope: str, deployment_name: str, **kwargs: Any) DeploymentExportResult [source]
Exports the template used for specified deployment.
- Parameters:
- Returns:
DeploymentExportResult or the result of cls(response)
- Return type:
- Raises:
- export_template_at_subscription_scope(deployment_name: str, **kwargs: Any) DeploymentExportResult [source]
Exports the template used for specified deployment.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
- Returns:
DeploymentExportResult or the result of cls(response)
- Return type:
- Raises:
- export_template_at_tenant_scope(deployment_name: str, **kwargs: Any) DeploymentExportResult [source]
Exports the template used for specified deployment.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
- Returns:
DeploymentExportResult or the result of cls(response)
- Return type:
- Raises:
- get(resource_group_name: str, deployment_name: str, **kwargs: Any) DeploymentExtended [source]
Gets a deployment.
- Parameters:
- Returns:
DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- get_at_management_group_scope(group_id: str, deployment_name: str, **kwargs: Any) DeploymentExtended [source]
Gets a deployment.
- Parameters:
- Returns:
DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- get_at_scope(scope: str, deployment_name: str, **kwargs: Any) DeploymentExtended [source]
Gets a deployment.
- Parameters:
- Returns:
DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- get_at_subscription_scope(deployment_name: str, **kwargs: Any) DeploymentExtended [source]
Gets a deployment.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
- Returns:
DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- get_at_tenant_scope(deployment_name: str, **kwargs: Any) DeploymentExtended [source]
Gets a deployment.
- Parameters:
deployment_name (str) – The name of the deployment. Required.
- Returns:
DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- list_at_management_group_scope(group_id: str, filter: str | None = None, top: int | None = None, **kwargs: Any) Iterable[DeploymentExtended] [source]
Get all the deployments for a management group.
- Parameters:
group_id (str) – The management group ID. Required.
filter (str) – The filter to apply on the operation. For example, you can use $filter=provisioningState eq ‘{state}’. Default value is None.
top (int) – The number of results to get. If null is passed, returns all deployments. Default value is None.
- Returns:
An iterator like instance of either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- list_at_scope(scope: str, filter: str | None = None, top: int | None = None, **kwargs: Any) Iterable[DeploymentExtended] [source]
Get all the deployments at the given scope.
- Parameters:
- Returns:
An iterator like instance of either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- list_at_subscription_scope(filter: str | None = None, top: int | None = None, **kwargs: Any) Iterable[DeploymentExtended] [source]
Get all the deployments for a subscription.
- Parameters:
- Returns:
An iterator like instance of either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- list_at_tenant_scope(filter: str | None = None, top: int | None = None, **kwargs: Any) Iterable[DeploymentExtended] [source]
Get all the deployments at the tenant scope.
- Parameters:
- Returns:
An iterator like instance of either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- list_by_resource_group(resource_group_name: str, filter: str | None = None, top: int | None = None, **kwargs: Any) Iterable[DeploymentExtended] [source]
Get all the deployments for a resource group.
- Parameters:
resource_group_name (str) – The name of the resource group with the deployments to get. The name is case insensitive. Required.
filter (str) – The filter to apply on the operation. For example, you can use $filter=provisioningState eq ‘{state}’. Default value is None.
top (int) – The number of results to get. If null is passed, returns all deployments. Default value is None.
- Returns:
An iterator like instance of either DeploymentExtended or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.resource.resources.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/resource/resources/v2024_07_01/models/__init__.py'>
- class azure.mgmt.resource.resources.v2024_07_01.operations.Operations(*args, **kwargs)[source]
Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ResourceManagementClient
’soperations
attribute.- list(**kwargs: Any) Iterable[Operation] [source]
Lists all of the available Microsoft.Resources REST API operations.
- Returns:
An iterator like instance of either Operation or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.resource.resources.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/resource/resources/v2024_07_01/models/__init__.py'>
- class azure.mgmt.resource.resources.v2024_07_01.operations.ProviderResourceTypesOperations(*args, **kwargs)[source]
Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ResourceManagementClient
’sprovider_resource_types
attribute.- list(resource_provider_namespace: str, expand: str | None = None, **kwargs: Any) ProviderResourceTypeListResult [source]
List the resource types for a specified resource provider.
- Parameters:
- Returns:
ProviderResourceTypeListResult or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.resource.resources.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/resource/resources/v2024_07_01/models/__init__.py'>
- class azure.mgmt.resource.resources.v2024_07_01.operations.ProvidersOperations(*args, **kwargs)[source]
Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ResourceManagementClient
’sproviders
attribute.- get(resource_provider_namespace: str, expand: str | None = None, **kwargs: Any) Provider [source]
Gets the specified resource provider.
- Parameters:
- Returns:
Provider or the result of cls(response)
- Return type:
- Raises:
- get_at_tenant_scope(resource_provider_namespace: str, expand: str | None = None, **kwargs: Any) Provider [source]
Gets the specified resource provider at the tenant level.
- Parameters:
- Returns:
Provider or the result of cls(response)
- Return type:
- Raises:
- list(expand: str | None = None, **kwargs: Any) Iterable[Provider] [source]
Gets all resource providers for a subscription.
- Parameters:
expand (str) – The properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider metadata. To include property aliases in response, use $expand=resourceTypes/aliases. Default value is None.
- Returns:
An iterator like instance of either Provider or the result of cls(response)
- Return type:
- Raises:
- list_at_tenant_scope(expand: str | None = None, **kwargs: Any) Iterable[Provider] [source]
Gets all resource providers for the tenant.
- Parameters:
expand (str) – The properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider metadata. To include property aliases in response, use $expand=resourceTypes/aliases. Default value is None.
- Returns:
An iterator like instance of either Provider or the result of cls(response)
- Return type:
- Raises:
- provider_permissions(resource_provider_namespace: str, **kwargs: Any) ProviderPermissionListResult [source]
Get the provider permissions.
- Parameters:
resource_provider_namespace (str) – The namespace of the resource provider. Required.
- Returns:
ProviderPermissionListResult or the result of cls(response)
- Return type:
- Raises:
- register(resource_provider_namespace: str, properties: _models.ProviderRegistrationRequest | None = None, *, content_type: str = 'application/json', **kwargs: Any) _models.Provider [source]
- register(resource_provider_namespace: str, properties: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) _models.Provider
Registers a subscription with a resource provider.
- Parameters:
resource_provider_namespace (str) – The namespace of the resource provider to register. Required.
properties (ProviderRegistrationRequest or IO[bytes]) – The third party consent for S2S. Is either a ProviderRegistrationRequest type or a IO[bytes] type. Default value is None.
- Returns:
Provider or the result of cls(response)
- Return type:
- Raises:
- register_at_management_group_scope(resource_provider_namespace: str, group_id: str, **kwargs: Any) None [source]
Registers a management group with a resource provider. Use this operation to register a resource provider with resource types that can be deployed at the management group scope. It does not recursively register subscriptions within the management group. Instead, you must register subscriptions individually.
- Parameters:
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- unregister(resource_provider_namespace: str, **kwargs: Any) Provider [source]
Unregisters a subscription from a resource provider.
- Parameters:
resource_provider_namespace (str) – The namespace of the resource provider to unregister. Required.
- Returns:
Provider or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.resource.resources.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/resource/resources/v2024_07_01/models/__init__.py'>
- class azure.mgmt.resource.resources.v2024_07_01.operations.ResourceGroupsOperations(*args, **kwargs)[source]
Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ResourceManagementClient
’sresource_groups
attribute.- begin_delete(resource_group_name: str, force_deletion_types: str | None = None, **kwargs: Any) LROPoller[None] [source]
Deletes a resource group.
When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.
- Parameters:
resource_group_name (str) – The name of the resource group to delete. The name is case insensitive. Required.
force_deletion_types (str) – The resource types you want to force delete. Currently, only the following is supported: forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets. Default value is None.
- Returns:
An instance of LROPoller that returns either None or the result of cls(response)
- Return type:
LROPoller[None]
- Raises:
- begin_export_template(resource_group_name: str, parameters: _models.ExportTemplateRequest, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.ResourceGroupExportResult] [source]
- begin_export_template(resource_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.ResourceGroupExportResult]
Captures the specified resource group as a template.
- Parameters:
resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.
parameters (ExportTemplateRequest or IO[bytes]) – Parameters for exporting the template. Is either a ExportTemplateRequest type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either ResourceGroupExportResult or the result of cls(response)
- Return type:
- Raises:
- check_existence(resource_group_name: str, **kwargs: Any) bool [source]
Checks whether a resource group exists.
- Parameters:
resource_group_name (str) – The name of the resource group to check. The name is case insensitive. Required.
- Returns:
bool or the result of cls(response)
- Return type:
- Raises:
- create_or_update(resource_group_name: str, parameters: _models.ResourceGroup, *, content_type: str = 'application/json', **kwargs: Any) _models.ResourceGroup [source]
- create_or_update(resource_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.ResourceGroup
Creates or updates a resource group.
- Parameters:
resource_group_name (str) – The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters. Required.
parameters (ResourceGroup or IO[bytes]) – Parameters supplied to the create or update a resource group. Is either a ResourceGroup type or a IO[bytes] type. Required.
- Returns:
ResourceGroup or the result of cls(response)
- Return type:
- Raises:
- get(resource_group_name: str, **kwargs: Any) ResourceGroup [source]
Gets a resource group.
- Parameters:
resource_group_name (str) – The name of the resource group to get. The name is case insensitive. Required.
- Returns:
ResourceGroup or the result of cls(response)
- Return type:
- Raises:
- list(filter: str | None = None, top: int | None = None, **kwargs: Any) Iterable[ResourceGroup] [source]
Gets all the resource groups for a subscription.
- Parameters:
filter (str) – The filter to apply on the operation.
<br>
:code:`<br>`You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq ‘tag1’ and tagValue eq ‘Value1’. Default value is None.top (int) – The number of results to return. If null is passed, returns all resource groups. Default value is None.
- Returns:
An iterator like instance of either ResourceGroup or the result of cls(response)
- Return type:
- Raises:
- update(resource_group_name: str, parameters: _models.ResourceGroupPatchable, *, content_type: str = 'application/json', **kwargs: Any) _models.ResourceGroup [source]
- update(resource_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.ResourceGroup
Updates a resource group.
Resource groups can be updated through a simple PATCH operation to a group address. The format of the request is the same as that for creating a resource group. If a field is unspecified, the current value is retained.
- Parameters:
resource_group_name (str) – The name of the resource group to update. The name is case insensitive. Required.
parameters (ResourceGroupPatchable or IO[bytes]) – Parameters supplied to update a resource group. Is either a ResourceGroupPatchable type or a IO[bytes] type. Required.
- Returns:
ResourceGroup or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.resource.resources.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/resource/resources/v2024_07_01/models/__init__.py'>
- class azure.mgmt.resource.resources.v2024_07_01.operations.ResourcesOperations(*args, **kwargs)[source]
Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ResourceManagementClient
’sresources
attribute.- begin_create_or_update(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, parameters: _models.GenericResource, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.GenericResource] [source]
- begin_create_or_update(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.GenericResource]
Creates a resource.
- Parameters:
resource_group_name (str) – The name of the resource group for the resource. The name is case insensitive. Required.
resource_provider_namespace (str) – The namespace of the resource provider. Required.
parent_resource_path (str) – The parent resource identity. Required.
resource_type (str) – The resource type of the resource to create. Required.
resource_name (str) – The name of the resource to create. Required.
api_version (str) – The API version to use for the operation. Required.
parameters (GenericResource or IO[bytes]) – Parameters for creating or updating the resource. Is either a GenericResource type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either GenericResource or the result of cls(response)
- Return type:
- Raises:
- begin_create_or_update_by_id(resource_id: str, api_version: str, parameters: _models.GenericResource, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.GenericResource] [source]
- begin_create_or_update_by_id(resource_id: str, api_version: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.GenericResource]
Create a resource by ID.
- Parameters:
resource_id (str) – The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. Required.
api_version (str) – The API version to use for the operation. Required.
parameters (GenericResource or IO[bytes]) – Create or update resource parameters. Is either a GenericResource type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either GenericResource or the result of cls(response)
- Return type:
- Raises:
- begin_delete(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) LROPoller[None] [source]
Deletes a resource.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the resource to delete. The name is case insensitive. Required.
resource_provider_namespace (str) – The namespace of the resource provider. Required.
parent_resource_path (str) – The parent resource identity. Required.
resource_type (str) – The resource type. Required.
resource_name (str) – The name of the resource to delete. Required.
api_version (str) – The API version to use for the operation. Required.
- Returns:
An instance of LROPoller that returns either None or the result of cls(response)
- Return type:
LROPoller[None]
- Raises:
- begin_delete_by_id(resource_id: str, api_version: str, **kwargs: Any) LROPoller[None] [source]
Deletes a resource by ID.
- Parameters:
resource_id (str) – The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. Required.
api_version (str) – The API version to use for the operation. Required.
- Returns:
An instance of LROPoller that returns either None or the result of cls(response)
- Return type:
LROPoller[None]
- Raises:
- begin_move_resources(source_resource_group_name: str, parameters: _models.ResourcesMoveInfo, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None] [source]
- begin_move_resources(source_resource_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]
Moves resources from one resource group to another resource group.
The resources to be moved must be in the same source resource group in the source subscription being used. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes.
- Parameters:
source_resource_group_name (str) – The name of the resource group from the source subscription containing the resources to be moved. Required.
parameters (ResourcesMoveInfo or IO[bytes]) – Parameters for moving resources. Is either a ResourcesMoveInfo type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either None or the result of cls(response)
- Return type:
LROPoller[None]
- Raises:
- begin_update(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, parameters: _models.GenericResource, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.GenericResource] [source]
- begin_update(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.GenericResource]
Updates a resource.
- Parameters:
resource_group_name (str) – The name of the resource group for the resource. The name is case insensitive. Required.
resource_provider_namespace (str) – The namespace of the resource provider. Required.
parent_resource_path (str) – The parent resource identity. Required.
resource_type (str) – The resource type of the resource to update. Required.
resource_name (str) – The name of the resource to update. Required.
api_version (str) – The API version to use for the operation. Required.
parameters (GenericResource or IO[bytes]) – Parameters for updating the resource. Is either a GenericResource type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either GenericResource or the result of cls(response)
- Return type:
- Raises:
- begin_update_by_id(resource_id: str, api_version: str, parameters: _models.GenericResource, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.GenericResource] [source]
- begin_update_by_id(resource_id: str, api_version: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.GenericResource]
Updates a resource by ID.
- Parameters:
resource_id (str) – The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. Required.
api_version (str) – The API version to use for the operation. Required.
parameters (GenericResource or IO[bytes]) – Update resource parameters. Is either a GenericResource type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either GenericResource or the result of cls(response)
- Return type:
- Raises:
- begin_validate_move_resources(source_resource_group_name: str, parameters: _models.ResourcesMoveInfo, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None] [source]
- begin_validate_move_resources(source_resource_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]
Validates whether resources can be moved from one resource group to another resource group.
This operation checks whether the specified resources can be moved to the target. The resources to be moved must be in the same source resource group in the source subscription being used. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation.
- Parameters:
source_resource_group_name (str) – The name of the resource group from the source subscription containing the resources to be validated for move. Required.
parameters (ResourcesMoveInfo or IO[bytes]) – Parameters for moving resources. Is either a ResourcesMoveInfo type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either None or the result of cls(response)
- Return type:
LROPoller[None]
- Raises:
- check_existence(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) bool [source]
Checks whether a resource exists.
- Parameters:
resource_group_name (str) – The name of the resource group containing the resource to check. The name is case insensitive. Required.
resource_provider_namespace (str) – The resource provider of the resource to check. Required.
parent_resource_path (str) – The parent resource identity. Required.
resource_type (str) – The resource type. Required.
resource_name (str) – The name of the resource to check whether it exists. Required.
api_version (str) – The API version to use for the operation. Required.
- Returns:
bool or the result of cls(response)
- Return type:
- Raises:
- check_existence_by_id(resource_id: str, api_version: str, **kwargs: Any) bool [source]
Checks by ID whether a resource exists. This API currently works only for a limited set of Resource providers. In the event that a Resource provider does not implement this API, ARM will respond with a 405. The alternative then is to use the GET API to check for the existence of the resource.
- Parameters:
resource_id (str) – The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. Required.
api_version (str) – The API version to use for the operation. Required.
- Returns:
bool or the result of cls(response)
- Return type:
- Raises:
- get(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) GenericResource [source]
Gets a resource.
- Parameters:
resource_group_name (str) – The name of the resource group containing the resource to get. The name is case insensitive. Required.
resource_provider_namespace (str) – The namespace of the resource provider. Required.
parent_resource_path (str) – The parent resource identity. Required.
resource_type (str) – The resource type of the resource. Required.
resource_name (str) – The name of the resource to get. Required.
api_version (str) – The API version to use for the operation. Required.
- Returns:
GenericResource or the result of cls(response)
- Return type:
- Raises:
- get_by_id(resource_id: str, api_version: str, **kwargs: Any) GenericResource [source]
Gets a resource by ID.
- Parameters:
resource_id (str) – The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. Required.
api_version (str) – The API version to use for the operation. Required.
- Returns:
GenericResource or the result of cls(response)
- Return type:
- Raises:
- list(filter: str | None = None, expand: str | None = None, top: int | None = None, **kwargs: Any) Iterable[GenericResourceExpanded] [source]
Get all the resources in a subscription.
- Parameters:
filter (str) – The filter to apply on the operation.
<br>
<br>`Filter comparison operators include ``eq`
(equals) andne
(not equals) and may be used with the following properties:location
,resourceType
,name
,resourceGroup
,identity
,identity/principalId
,plan
,plan/publisher
,plan/product
,plan/name
,plan/version
, andplan/promotionCode
.<br>
<br>`For example, to filter by a resource type, use ``$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`
<br>
<br>
<br>
substringof(value, property)
can be used to filter for substrings of the following currently-supported properties:name
andresourceGroup
<br>
<br>`For example, to get all resources with 'demo' anywhere in the resource name, use ``$filter=substringof('demo', name)`
<br>
<br>`Multiple substring operations can also be combined using ``and`
/or
operators.<br>
<br>`Note that any truncated number of results queried via ``$top`
may also not be compatible when using a filter.<br>
<br>
<br>`Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use ``$filter=tagName eq 'tag1' and tagValue eq 'Value1'`
. Note that when resources are filtered by tag name and value,<b>the original tags for each resource will not be returned in the results.</b>
Any list of additional properties queried via$expand
may also not be compatible when filtering by tag names/values.<br>
<br>`For tag names only, resources can be filtered by prefix using the following syntax: ``$filter=startswith(tagName, 'depart')`
. This query will return all resources with a tag name prefixed by the phrasedepart
(i.e.department
,departureDate
,departureTime
, etc.)<br>
<br>
<br>`Note that some properties can be combined when filtering resources, which include the following: ``substringof() and/or resourceType`
,plan and plan/publisher and plan/name
, andidentity and identity/principalId
. Default value is None.expand (str) – Comma-separated list of additional properties to be included in the response. Valid values include
createdTime
,changedTime
andprovisioningState
. For example,$expand=createdTime,changedTime
. Default value is None.top (int) – The number of recommendations per page if a paged version of this API is being used. Default value is None.
- Returns:
An iterator like instance of either GenericResourceExpanded or the result of cls(response)
- Return type:
- Raises:
- list_by_resource_group(resource_group_name: str, filter: str | None = None, expand: str | None = None, top: int | None = None, **kwargs: Any) Iterable[GenericResourceExpanded] [source]
Get all the resources for a resource group.
- Parameters:
resource_group_name (str) – The resource group with the resources to get. Required.
filter (str) – The filter to apply on the operation.
<br>
<br>`The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.:code:`<br>
<br>`For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks':code:`<br>
<br>`You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.:code:`<br>
<br>`For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name):code:`<br>
<br>`You can link more than one substringof together by adding and/or operators.:code:`<br>
<br>`You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each resource are not returned in the results.:code:`<br>
:code:`<br>`You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. Default value is None.expand (str) – Comma-separated list of additional properties to be included in the response. Valid values include
createdTime
,changedTime
andprovisioningState
. For example,$expand=createdTime,changedTime
. Default value is None.top (int) – The number of results to return. If null is passed, returns all resources. Default value is None.
- Returns:
An iterator like instance of either GenericResourceExpanded or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.resource.resources.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/resource/resources/v2024_07_01/models/__init__.py'>
- class azure.mgmt.resource.resources.v2024_07_01.operations.TagsOperations(*args, **kwargs)[source]
Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ResourceManagementClient
’stags
attribute.- begin_create_or_update_at_scope(scope: str, parameters: _models.TagsResource, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.TagsResource] [source]
- begin_create_or_update_at_scope(scope: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.TagsResource]
Creates or updates the entire set of tags on a resource or subscription.
This operation allows adding or replacing the entire set of tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags.
- Parameters:
scope (str) – The resource scope. Required.
parameters (TagsResource or IO[bytes]) – Is either a TagsResource type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either TagsResource or the result of cls(response)
- Return type:
- Raises:
- begin_delete_at_scope(scope: str, **kwargs: Any) LROPoller[None] [source]
Deletes the entire set of tags on a resource or subscription.
Deletes the entire set of tags on a resource or subscription.
- begin_update_at_scope(scope: str, parameters: _models.TagsPatchResource, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.TagsResource] [source]
- begin_update_at_scope(scope: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.TagsResource]
Selectively updates the set of tags on a resource or subscription.
This operation allows replacing, merging or selectively deleting tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags at the end of the operation. The ‘replace’ option replaces the entire set of existing tags with a new set. The ‘merge’ option allows adding tags with new names and updating the values of tags with existing names. The ‘delete’ option allows selectively deleting tags based on given names or name/value pairs.
- Parameters:
scope (str) – The resource scope. Required.
parameters (TagsPatchResource or IO[bytes]) – Is either a TagsPatchResource type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either TagsResource or the result of cls(response)
- Return type:
- Raises:
- create_or_update(tag_name: str, **kwargs: Any) TagDetails [source]
Creates a predefined tag name.
This operation allows adding a name to the list of predefined tag names for the given subscription. A tag name can have a maximum of 512 characters and is case-insensitive. Tag names cannot have the following prefixes which are reserved for Azure use: ‘microsoft’, ‘azure’, ‘windows’.
- Parameters:
tag_name (str) – The name of the tag to create. Required.
- Returns:
TagDetails or the result of cls(response)
- Return type:
- Raises:
- create_or_update_value(tag_name: str, tag_value: str, **kwargs: Any) TagValue [source]
Creates a predefined value for a predefined tag name.
This operation allows adding a value to the list of predefined values for an existing predefined tag name. A tag value can have a maximum of 256 characters.
- Parameters:
- Returns:
TagValue or the result of cls(response)
- Return type:
- Raises:
- delete(tag_name: str, **kwargs: Any) None [source]
Deletes a predefined tag name.
This operation allows deleting a name from the list of predefined tag names for the given subscription. The name being deleted must not be in use as a tag name for any resource. All predefined values for the given name must have already been deleted.
- Parameters:
tag_name (str) – The name of the tag. Required.
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- delete_value(tag_name: str, tag_value: str, **kwargs: Any) None [source]
Deletes a predefined tag value for a predefined tag name.
This operation allows deleting a value from the list of predefined values for an existing predefined tag name. The value being deleted must not be in use as a tag value for the given tag name for any resource.
- Parameters:
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- get_at_scope(scope: str, **kwargs: Any) TagsResource [source]
Gets the entire set of tags on a resource or subscription.
Gets the entire set of tags on a resource or subscription.
- Parameters:
scope (str) – The resource scope. Required.
- Returns:
TagsResource or the result of cls(response)
- Return type:
- Raises:
- list(**kwargs: Any) Iterable[TagDetails] [source]
Gets a summary of tag usage under the subscription.
This operation performs a union of predefined tags, resource tags, resource group tags and subscription tags, and returns a summary of usage for each tag name and value under the given subscription. In case of a large number of tags, this operation may return a previously cached result.
- Returns:
An iterator like instance of either TagDetails or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.resource.resources.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/resource/resources/v2024_07_01/models/__init__.py'>