azure.mgmt.resource.resources.v2018_02_01.operations module

class azure.mgmt.resource.resources.v2018_02_01.operations.DeploymentOperationsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ResourceManagementClient’s deployment_operations attribute.

get(resource_group_name: str, deployment_name: str, operation_id: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.DeploymentOperation[source]

Gets a deployments operation.

Parameters
  • resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.

  • deployment_name (str) – The name of the deployment. Required.

  • operation_id (str) – The ID of the operation to get. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

DeploymentOperation or the result of cls(response)

Return type

DeploymentOperation

Raises

HttpResponseError

list(resource_group_name: str, deployment_name: str, top: Optional[int] = None, **kwargs: Any)Iterable[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.DeploymentOperation][source]

Gets all deployments operations for a deployment.

Parameters
  • resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.

  • deployment_name (str) – The name of the deployment with the operation to get. Required.

  • top (int) – The number of results to return. Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[DeploymentOperation]

Raises

HttpResponseError

models = <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>
class azure.mgmt.resource.resources.v2018_02_01.operations.DeploymentsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ResourceManagementClient’s deployments 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, *, 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) – Additional parameters supplied to the operation. Is either a Deployment type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

LROPoller[DeploymentExtended]

Raises

HttpResponseError

begin_delete(resource_group_name: str, deployment_name: str, **kwargs: Any)azure.core.polling._poller.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
  • resource_group_name (str) – The name of the resource group with the deployment to delete. The name is case insensitive. Required.

  • deployment_name (str) – The name of the deployment to delete. Required.

Keyword Arguments
  • 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

LROPoller[None]

Raises

HttpResponseError

calculate_template_hash(template: collections.abc.MutableMapping[str, Any], **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.TemplateHashResult[source]

Calculate the hash of the given template.

Parameters

template (JSON) – The template provided to calculate hash. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

TemplateHashResult or the result of cls(response)

Return type

TemplateHashResult

Raises

HttpResponseError

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
  • resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.

  • deployment_name (str) – The name of the deployment to cancel. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None or the result of cls(response)

Return type

None

Raises

HttpResponseError

check_existence(resource_group_name: str, deployment_name: str, **kwargs: Any)bool[source]

Checks whether the deployment exists.

Parameters
  • resource_group_name (str) – The name of the resource group with the deployment to check. The name is case insensitive. Required.

  • deployment_name (str) – The name of the deployment to check. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

bool or the result of cls(response)

Return type

bool

Raises

HttpResponseError

export_template(resource_group_name: str, deployment_name: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.DeploymentExportResult[source]

Exports the template used for specified deployment.

Parameters
  • resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.

  • deployment_name (str) – The name of the deployment from which to get the template. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

DeploymentExportResult or the result of cls(response)

Return type

DeploymentExportResult

Raises

HttpResponseError

get(resource_group_name: str, deployment_name: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.DeploymentExtended[source]

Gets a deployment.

Parameters
  • resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.

  • deployment_name (str) – The name of the deployment to get. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

DeploymentExtended or the result of cls(response)

Return type

DeploymentExtended

Raises

HttpResponseError

list_by_resource_group(resource_group_name: str, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any)Iterable[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[DeploymentExtended]

Raises

HttpResponseError

validate(resource_group_name: str, deployment_name: str, parameters: _models.Deployment, *, content_type: str = "'application/json'", **kwargs: Any)_models.DeploymentValidateResult[source]
validate(resource_group_name: str, deployment_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_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) – Parameters to validate. Is either a Deployment type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • cls (callable) – A custom type or function that will be passed the direct response

Returns

DeploymentValidateResult or the result of cls(response)

Return type

DeploymentValidateResult

Raises

HttpResponseError

models = <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>
class azure.mgmt.resource.resources.v2018_02_01.operations.ProvidersOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ResourceManagementClient’s providers attribute.

get(resource_provider_namespace: str, expand: Optional[str] = None, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.Provider[source]

Gets the specified resource provider.

Parameters
  • resource_provider_namespace (str) – The namespace of the resource provider. Required.

  • expand (str) – The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Provider or the result of cls(response)

Return type

Provider

Raises

HttpResponseError

list(top: Optional[int] = None, expand: Optional[str] = None, **kwargs: Any)Iterable[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.Provider][source]

Gets all resource providers for a subscription.

Parameters
  • top (int) – The number of results to return. If null is passed returns all deployments. Default value is None.

  • 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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[Provider]

Raises

HttpResponseError

register(resource_provider_namespace: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.Provider[source]

Registers a subscription with a resource provider.

Parameters

resource_provider_namespace (str) – The namespace of the resource provider to register. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Provider or the result of cls(response)

Return type

Provider

Raises

HttpResponseError

unregister(resource_provider_namespace: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.Provider[source]

Unregisters a subscription from a resource provider.

Parameters

resource_provider_namespace (str) – The namespace of the resource provider to unregister. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Provider or the result of cls(response)

Return type

Provider

Raises

HttpResponseError

models = <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>
class azure.mgmt.resource.resources.v2018_02_01.operations.ResourceGroupsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ResourceManagementClient’s resource_groups attribute.

begin_delete(resource_group_name: str, **kwargs: Any)azure.core.polling._poller.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.

Keyword Arguments
  • 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

LROPoller[None]

Raises

HttpResponseError

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

bool or the result of cls(response)

Return type

bool

Raises

HttpResponseError

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, *, 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. Required.

  • parameters (ResourceGroup or IO) – Parameters supplied to the create or update a resource group. Is either a ResourceGroup type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • cls (callable) – A custom type or function that will be passed the direct response

Returns

ResourceGroup or the result of cls(response)

Return type

ResourceGroup

Raises

HttpResponseError

export_template(resource_group_name: str, parameters: _models.ExportTemplateRequest, *, content_type: str = "'application/json'", **kwargs: Any)_models.ResourceGroupExportResult[source]
export_template(resource_group_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.ResourceGroupExportResult

Captures the specified resource group as a template.

Parameters
  • resource_group_name (str) – The name of the resource group to export as a template. Required.

  • parameters (ExportTemplateRequest or IO) – Parameters for exporting the template. Is either a ExportTemplateRequest type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • cls (callable) – A custom type or function that will be passed the direct response

Returns

ResourceGroupExportResult or the result of cls(response)

Return type

ResourceGroupExportResult

Raises

HttpResponseError

get(resource_group_name: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ResourceGroup or the result of cls(response)

Return type

ResourceGroup

Raises

HttpResponseError

list(filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any)Iterable[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.ResourceGroup][source]

Gets all the resource groups for a subscription.

Parameters
  • filter (str) – The filter to apply on the operation. Default value is None.

  • top (int) – The number of results to return. If null is passed, returns all resource groups. Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[ResourceGroup]

Raises

HttpResponseError

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, *, 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) – Parameters supplied to update a resource group. Is either a ResourceGroupPatchable type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • cls (callable) – A custom type or function that will be passed the direct response

Returns

ResourceGroup or the result of cls(response)

Return type

ResourceGroup

Raises

HttpResponseError

models = <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>
class azure.mgmt.resource.resources.v2018_02_01.operations.ResourcesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ResourceManagementClient’s resources 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, *, 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) – Parameters for creating or updating the resource. Is either a GenericResource type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 GenericResource or the result of cls(response)

Return type

LROPoller[GenericResource]

Raises

HttpResponseError

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, *, 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) – Create or update resource parameters. Is either a GenericResource type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 GenericResource or the result of cls(response)

Return type

LROPoller[GenericResource]

Raises

HttpResponseError

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)azure.core.polling._poller.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.

Keyword Arguments
  • 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

LROPoller[None]

Raises

HttpResponseError

begin_delete_by_id(resource_id: str, api_version: str, **kwargs: Any)azure.core.polling._poller.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.

Keyword Arguments
  • 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

LROPoller[None]

Raises

HttpResponseError

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, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[None]

Moves resources from one resource group to another resource group.

The resources to move must be in the same source resource group. 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 containing the resources to move. Required.

  • parameters (ResourcesMoveInfo or IO) – Parameters for moving resources. Is either a ResourcesMoveInfo type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

LROPoller[None]

Raises

HttpResponseError

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, *, 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) – Parameters for updating the resource. Is either a GenericResource type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 GenericResource or the result of cls(response)

Return type

LROPoller[GenericResource]

Raises

HttpResponseError

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, *, 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) – Update resource parameters. Is either a GenericResource type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 GenericResource or the result of cls(response)

Return type

LROPoller[GenericResource]

Raises

HttpResponseError

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, *, 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 move must be in the same source resource group. 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 containing the resources to validate for move. Required.

  • parameters (ResourcesMoveInfo or IO) – Parameters for moving resources. Is either a ResourcesMoveInfo type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

LROPoller[None]

Raises

HttpResponseError

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

bool or the result of cls(response)

Return type

bool

Raises

HttpResponseError

check_existence_by_id(resource_id: str, api_version: str, **kwargs: Any)bool[source]

Checks by ID whether a resource exists.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

bool or the result of cls(response)

Return type

bool

Raises

HttpResponseError

get(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

GenericResource or the result of cls(response)

Return type

GenericResource

Raises

HttpResponseError

get_by_id(resource_id: str, api_version: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

GenericResource or the result of cls(response)

Return type

GenericResource

Raises

HttpResponseError

list(filter: Optional[str] = None, expand: Optional[str] = None, top: Optional[int] = None, **kwargs: Any)Iterable[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.GenericResourceExpanded][source]

Get all the resources in a subscription.

Parameters
  • filter (str) – The filter to apply on the operation. Default value is None.

  • expand (str) – The $expand query parameter. Default value is None.

  • top (int) – The number of results to return. If null is passed, returns all resources. Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[GenericResourceExpanded]

Raises

HttpResponseError

list_by_resource_group(resource_group_name: str, filter: Optional[str] = None, expand: Optional[str] = None, top: Optional[int] = None, **kwargs: Any)Iterable[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.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. Default value is None.

  • expand (str) – Comma-separated list of additional properties to be included in the response. Valid values include createdTime, changedTime and provisioningState. 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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[GenericResourceExpanded]

Raises

HttpResponseError

models = <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>
class azure.mgmt.resource.resources.v2018_02_01.operations.TagsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ResourceManagementClient’s tags attribute.

create_or_update(tag_name: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.TagDetails[source]

Creates a tag in the subscription.

The tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes.

Parameters

tag_name (str) – The name of the tag to create. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

TagDetails or the result of cls(response)

Return type

TagDetails

Raises

HttpResponseError

create_or_update_value(tag_name: str, tag_value: str, **kwargs: Any)azure.mgmt.resource.resources.v2018_02_01.models._models_py3.TagValue[source]

Creates a tag value. The name of the tag must already exist.

Parameters
  • tag_name (str) – The name of the tag. Required.

  • tag_value (str) – The value of the tag to create. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

TagValue or the result of cls(response)

Return type

TagValue

Raises

HttpResponseError

delete(tag_name: str, **kwargs: Any)None[source]

Deletes a tag from the subscription.

You must remove all values from a resource tag before you can delete it.

Parameters

tag_name (str) – The name of the tag. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None or the result of cls(response)

Return type

None

Raises

HttpResponseError

delete_value(tag_name: str, tag_value: str, **kwargs: Any)None[source]

Deletes a tag value.

Parameters
  • tag_name (str) – The name of the tag. Required.

  • tag_value (str) – The value of the tag to delete. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None or the result of cls(response)

Return type

None

Raises

HttpResponseError

list(**kwargs: Any)Iterable[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.TagDetails][source]

Gets the names and values of all resource tags that are defined in a subscription.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[TagDetails]

Raises

HttpResponseError

models = <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>