azure.mgmt.resource.resources.v2018_02_01.operations module¶
-
class
azure.mgmt.resource.resources.v2018_02_01.operations.
DeploymentOperationsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
DeploymentOperationsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Variables
models – Alias to model classes used in this operation group.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
get
(resource_group_name: str, deployment_name: str, operation_id: str, **kwargs: Any) → ’models.DeploymentOperation’[source]¶ Gets a deployments operation.
- Parameters
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
list
(resource_group_name: str, deployment_name: str, top: Optional[int] = None, **kwargs: Any) → Iterable[‘models.DeploymentOperationsListResult’][source]¶ Gets all deployments operations for a deployment.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either DeploymentOperationsListResult or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
models
= <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/home/vsts/work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>¶
-
class
azure.mgmt.resource.resources.v2018_02_01.operations.
DeploymentsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
DeploymentsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Variables
models – Alias to model classes used in this operation group.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
begin_create_or_update
(resource_group_name: str, deployment_name: str, parameters: ‘models.Deployment’, **kwargs: Any) → LROPoller[source]¶ Deploys resources to a resource group.
You can provide the template and parameters directly in the request or link to JSON files.
- param resource_group_name
The name of the resource group to deploy the resources to. The name
- is case insensitive. The resource group must already exist.
- type resource_group_name
str
- param deployment_name
The name of the deployment.
- type deployment_name
str
- param parameters
Additional parameters supplied to the operation.
- type parameters
~azure.mgmt.resource.resources.v2018_02_01.models.Deployment
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either DeploymentExtended or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExtended]
- raises ~azure.core.exceptions.HttpResponseError
-
begin_delete
(resource_group_name: str, deployment_name: str, **kwargs: Any) → LROPoller[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.
- param resource_group_name
The name of the resource group with the deployment to delete. The
- name is case insensitive.
- type resource_group_name
str
- param deployment_name
The name of the deployment to delete.
- type deployment_name
str
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either None or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[None]
- raises ~azure.core.exceptions.HttpResponseError
-
calculate_template_hash
(template: object, **kwargs: Any) → ’models.TemplateHashResult’[source]¶ Calculate the hash of the given template.
-
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
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
check_existence
(resource_group_name: str, deployment_name: str, **kwargs: Any) → None[source]¶ Checks whether the deployment exists.
- Parameters
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
export_template
(resource_group_name: str, deployment_name: str, **kwargs: Any) → ’models.DeploymentExportResult’[source]¶ Exports the template used for specified deployment.
- Parameters
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
get
(resource_group_name: str, deployment_name: str, **kwargs: Any) → ’models.DeploymentExtended’[source]¶ Gets a deployment.
- Parameters
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
list_by_resource_group
(resource_group_name: str, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) → Iterable[‘models.DeploymentListResult’][source]¶ Get all the deployments for a resource group.
- param resource_group_name
The name of the resource group with the deployments to get. The
- name is case insensitive.
- type resource_group_name
str
- param filter
The filter to apply on the operation. For example, you can use
- $filter=provisioningState eq ‘{state}’.
- type filter
str
- param top
The number of results to get. If null is passed, returns all deployments.
- type top
int
- keyword callable cls
A custom type or function that will be passed the direct response
- return
An iterator like instance of either DeploymentListResult or the result of cls(response)
- rtype
~azure.core.paging.ItemPaged[~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentListResult]
- raises
~azure.core.exceptions.HttpResponseError
-
validate
(resource_group_name: str, deployment_name: str, parameters: ‘models.Deployment’, **kwargs: Any) → ’models.DeploymentValidateResult’[source]¶ 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.
deployment_name (str) – The name of the deployment.
parameters (Deployment) – Parameters to validate.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
DeploymentValidateResult, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
models
= <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/home/vsts/work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>¶
-
class
azure.mgmt.resource.resources.v2018_02_01.operations.
ProvidersOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
ProvidersOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Variables
models – Alias to model classes used in this operation group.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
get
(resource_provider_namespace: str, expand: Optional[str] = None, **kwargs: Any) → ’models.Provider’[source]¶ Gets the specified resource provider.
- Parameters
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
list
(top: Optional[int] = None, expand: Optional[str] = None, **kwargs: Any) → Iterable[‘models.ProviderListResult’][source]¶ Gets all resource providers for a subscription.
- param top
The number of results to return. If null is passed returns all deployments.
- type top
int
- param expand
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.
- type expand
str
- keyword callable cls
A custom type or function that will be passed the direct response
- return
An iterator like instance of either ProviderListResult or the result of cls(response)
- rtype
~azure.core.paging.ItemPaged[~azure.mgmt.resource.resources.v2018_02_01.models.ProviderListResult]
- raises
~azure.core.exceptions.HttpResponseError
-
register
(resource_provider_namespace: str, **kwargs: Any) → ’models.Provider’[source]¶ Registers a subscription with a resource provider.
- Parameters
resource_provider_namespace (str) – The namespace of the resource provider to register.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
unregister
(resource_provider_namespace: str, **kwargs: Any) → ’models.Provider’[source]¶ Unregisters a subscription from a resource provider.
- Parameters
resource_provider_namespace (str) – The namespace of the resource provider to unregister.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
models
= <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/home/vsts/work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>¶
-
class
azure.mgmt.resource.resources.v2018_02_01.operations.
ResourceGroupsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
ResourceGroupsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Variables
models – Alias to model classes used in this operation group.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
begin_delete
(resource_group_name: str, **kwargs: Any) → LROPoller[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.
- param resource_group_name
The name of the resource group to delete. The name is case
- insensitive.
- type resource_group_name
str
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either None or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[None]
- raises ~azure.core.exceptions.HttpResponseError
-
check_existence
(resource_group_name: str, **kwargs: Any) → None[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.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
create_or_update
(resource_group_name: str, parameters: ‘models.ResourceGroup’, **kwargs: Any) → ’models.ResourceGroup’[source]¶ Creates or updates a resource group.
- Parameters
resource_group_name (str) – The name of the resource group to create or update.
parameters (ResourceGroup) – Parameters supplied to the create or update a resource group.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
export_template
(resource_group_name: str, parameters: ‘models.ExportTemplateRequest’, **kwargs: Any) → ’models.ResourceGroupExportResult’[source]¶ Captures the specified resource group as a template.
- Parameters
resource_group_name (str) – The name of the resource group to export as a template.
parameters (ExportTemplateRequest) – Parameters for exporting the template.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ResourceGroupExportResult, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
get
(resource_group_name: str, **kwargs: Any) → ’models.ResourceGroup’[source]¶ Gets a resource group.
- Parameters
resource_group_name (str) – The name of the resource group to get. The name is case insensitive.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
list
(filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) → Iterable[‘models.ResourceGroupListResult’][source]¶ Gets all the resource groups for a subscription.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ResourceGroupListResult or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
update
(resource_group_name: str, parameters: ‘models.ResourceGroupPatchable’, **kwargs: Any) → ’models.ResourceGroup’[source]¶ 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.
parameters (ResourceGroupPatchable) – Parameters supplied to update a resource group.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
models
= <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/home/vsts/work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>¶
-
class
azure.mgmt.resource.resources.v2018_02_01.operations.
ResourcesOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
ResourcesOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Variables
models – Alias to model classes used in this operation group.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
begin_create_or_update
(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, parameters: ‘models.GenericResource’, **kwargs: Any) → LROPoller[source]¶ Creates a resource.
- param resource_group_name
The name of the resource group for the resource. The name is case
- insensitive.
- type resource_group_name
str
- param resource_provider_namespace
The namespace of the resource provider.
- type resource_provider_namespace
str
- param parent_resource_path
The parent resource identity.
- type parent_resource_path
str
- param resource_type
The resource type of the resource to create.
- type resource_type
str
- param resource_name
The name of the resource to create.
- type resource_name
str
- param parameters
Parameters for creating or updating the resource.
- type parameters
~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either GenericResource or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource]
- raises ~azure.core.exceptions.HttpResponseError
-
begin_create_or_update_by_id
(resource_id: str, parameters: ‘models.GenericResource’, **kwargs: Any) → LROPoller[source]¶ Create a resource by ID.
- param resource_id
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}.
- type resource_id
str
- param parameters
Create or update resource parameters.
- type parameters
~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either GenericResource or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource]
- raises ~azure.core.exceptions.HttpResponseError
-
begin_delete
(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, **kwargs: Any) → LROPoller[source]¶ Deletes a resource.
- param resource_group_name
The name of the resource group that contains the resource to
- delete. The name is case insensitive.
- type resource_group_name
str
- param resource_provider_namespace
The namespace of the resource provider.
- type resource_provider_namespace
str
- param parent_resource_path
The parent resource identity.
- type parent_resource_path
str
- param resource_type
The resource type.
- type resource_type
str
- param resource_name
The name of the resource to delete.
- type resource_name
str
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either None or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[None]
- raises ~azure.core.exceptions.HttpResponseError
-
begin_delete_by_id
(resource_id: str, **kwargs: Any) → LROPoller[source]¶ Deletes a resource by ID.
- param resource_id
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}.
- type resource_id
str
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either None or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[None]
- raises ~azure.core.exceptions.HttpResponseError
-
begin_move_resources
(source_resource_group_name: str, parameters: ‘models.ResourcesMoveInfo’, **kwargs: Any) → LROPoller[source]¶ 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.
- param source_resource_group_name
The name of the resource group containing the resources to
- move.
- type source_resource_group_name
str
- param parameters
Parameters for moving resources.
- type parameters
~azure.mgmt.resource.resources.v2018_02_01.models.ResourcesMoveInfo
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either None or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[None]
- raises ~azure.core.exceptions.HttpResponseError
-
begin_update
(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, parameters: ‘models.GenericResource’, **kwargs: Any) → LROPoller[source]¶ Updates a resource.
- param resource_group_name
The name of the resource group for the resource. The name is case
- insensitive.
- type resource_group_name
str
- param resource_provider_namespace
The namespace of the resource provider.
- type resource_provider_namespace
str
- param parent_resource_path
The parent resource identity.
- type parent_resource_path
str
- param resource_type
The resource type of the resource to update.
- type resource_type
str
- param resource_name
The name of the resource to update.
- type resource_name
str
- param parameters
Parameters for updating the resource.
- type parameters
~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either GenericResource or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource]
- raises ~azure.core.exceptions.HttpResponseError
-
begin_update_by_id
(resource_id: str, parameters: ‘models.GenericResource’, **kwargs: Any) → LROPoller[source]¶ Updates a resource by ID.
- param resource_id
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}.
- type resource_id
str
- param parameters
Update resource parameters.
- type parameters
~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either GenericResource or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource]
- raises ~azure.core.exceptions.HttpResponseError
-
begin_validate_move_resources
(source_resource_group_name: str, parameters: ‘models.ResourcesMoveInfo’, **kwargs: Any) → LROPoller[source]¶ 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.
- param source_resource_group_name
The name of the resource group containing the resources to
- validate for move.
- type source_resource_group_name
str
- param parameters
Parameters for moving resources.
- type parameters
~azure.mgmt.resource.resources.v2018_02_01.models.ResourcesMoveInfo
- keyword callable cls
A custom type or function that will be passed the direct response
- keyword str continuation_token
A continuation token to restart a poller from a saved state.
- keyword polling
True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- paramtype polling
bool or ~azure.core.polling.PollingMethod
- keyword int polling_interval
Default waiting time between two polls for LRO operations if no Retry-After header is present.
- return
An instance of LROPoller that returns either None or the result of cls(response)
- rtype
~azure.core.polling.LROPoller[None]
- raises ~azure.core.exceptions.HttpResponseError
-
check_existence
(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, **kwargs: Any) → None[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.
resource_provider_namespace (str) – The resource provider of the resource to check.
parent_resource_path (str) – The parent resource identity.
resource_type (str) – The resource type.
resource_name (str) – The name of the resource to check whether it exists.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
check_existence_by_id
(resource_id: str, **kwargs: Any) → None[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}.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
get
(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, **kwargs: Any) → ’models.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.
resource_provider_namespace (str) – The namespace of the resource provider.
parent_resource_path (str) – The parent resource identity.
resource_type (str) – The resource type of the resource.
resource_name (str) – The name of the resource to get.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
get_by_id
(resource_id: str, **kwargs: Any) → ’models.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}.
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
list
(filter: Optional[str] = None, expand: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) → Iterable[‘models.ResourceListResult’][source]¶ Get all the resources in a subscription.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ResourceListResult or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
list_by_resource_group
(resource_group_name: str, filter: Optional[str] = None, expand: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) → Iterable[‘models.ResourceListResult’][source]¶ Get all the resources for a resource group.
- param resource_group_name
The resource group with the resources to get.
- type resource_group_name
str
- param filter
The filter to apply on the operation.
- type filter
str
- param expand
Comma-separated list of additional properties to be included in the response.
Valid values include
createdTime
,changedTime
andprovisioningState
. For example,$expand=createdTime,changedTime
.- type expand
str
- param top
The number of results to return. If null is passed, returns all resources.
- type top
int
- keyword callable cls
A custom type or function that will be passed the direct response
- return
An iterator like instance of either ResourceListResult or the result of cls(response)
- rtype
~azure.core.paging.ItemPaged[~azure.mgmt.resource.resources.v2018_02_01.models.ResourceListResult]
- raises
~azure.core.exceptions.HttpResponseError
-
models
= <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/home/vsts/work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>¶
-
class
azure.mgmt.resource.resources.v2018_02_01.operations.
TagsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
TagsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Variables
models – Alias to model classes used in this operation group.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
create_or_update
(tag_name: str, **kwargs: Any) → ’models.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.
-
create_or_update_value
(tag_name: str, tag_value: str, **kwargs: Any) → ’models.TagValue’[source]¶ Creates a tag value. The name of the tag must already exist.
- Parameters
- 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
- Raises
~azure.core.exceptions.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.
-
delete_value
(tag_name: str, tag_value: str, **kwargs: Any) → None[source]¶ Deletes a tag value.
- Parameters
- 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
- Raises
~azure.core.exceptions.HttpResponseError
-
list
(**kwargs: Any) → Iterable[‘models.TagsListResult’][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 TagsListResult or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
models
= <module 'azure.mgmt.resource.resources.v2018_02_01.models' from '/home/vsts/work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py'>¶