PolicyDefinitionsOperations Class
PolicyDefinitionsOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectPolicyDefinitionsOperations
Constructor
PolicyDefinitionsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| create_or_update |
Creates or updates a policy definition in a subscription. This operation creates or updates a policy definition in the given subscription with the given name. |
| create_or_update_at_management_group |
Creates or updates a policy definition in a management group. This operation creates or updates a policy definition in the given management group with the given name. |
| delete |
Deletes a policy definition in a subscription. This operation deletes the policy definition in the given subscription with the given name. |
| delete_at_management_group |
Deletes a policy definition in a management group. This operation deletes the policy definition in the given management group with the given name. |
| get |
Retrieves a policy definition in a subscription. This operation retrieves the policy definition in the given subscription with the given name. |
| get_at_management_group |
Retrieve a policy definition in a management group. This operation retrieves the policy definition in the given management group with the given name. |
| get_built_in |
Retrieves a built-in policy definition. This operation retrieves the built-in policy definition with the given name. |
| list |
Retrieves policy definitions in a subscription. This operation retrieves a list of all the policy definitions in a given subscription. |
| list_built_in |
Retrieve built-in policy definitions. This operation retrieves a list of all the built-in policy definitions. |
| list_by_management_group |
Retrieve policy definitions in a management group. This operation retrieves a list of all the policy definitions in a given management group. |
create_or_update
Creates or updates a policy definition in a subscription.
This operation creates or updates a policy definition in the given subscription with the given name.
async create_or_update(policy_definition_name: str, parameters: azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinition, **kwargs: Any) -> azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinition
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
PolicyDefinition, or the result of cls(response)
Return type
Exceptions
create_or_update_at_management_group
Creates or updates a policy definition in a management group.
This operation creates or updates a policy definition in the given management group with the given name.
async create_or_update_at_management_group(policy_definition_name: str, management_group_id: str, parameters: azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinition, **kwargs: Any) -> azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinition
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
PolicyDefinition, or the result of cls(response)
Return type
Exceptions
delete
Deletes a policy definition in a subscription.
This operation deletes the policy definition in the given subscription with the given name.
async delete(policy_definition_name: str, **kwargs: Any) -> None
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
None, or the result of cls(response)
Return type
Exceptions
delete_at_management_group
Deletes a policy definition in a management group.
This operation deletes the policy definition in the given management group with the given name.
async delete_at_management_group(policy_definition_name: str, management_group_id: str, **kwargs: Any) -> None
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
None, or the result of cls(response)
Return type
Exceptions
get
Retrieves a policy definition in a subscription.
This operation retrieves the policy definition in the given subscription with the given name.
async get(policy_definition_name: str, **kwargs: Any) -> azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinition
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
PolicyDefinition, or the result of cls(response)
Return type
Exceptions
get_at_management_group
Retrieve a policy definition in a management group.
This operation retrieves the policy definition in the given management group with the given name.
async get_at_management_group(policy_definition_name: str, management_group_id: str, **kwargs: Any) -> azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinition
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
PolicyDefinition, or the result of cls(response)
Return type
Exceptions
get_built_in
Retrieves a built-in policy definition.
This operation retrieves the built-in policy definition with the given name.
async get_built_in(policy_definition_name: str, **kwargs: Any) -> azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinition
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
PolicyDefinition, or the result of cls(response)
Return type
Exceptions
list
Retrieves policy definitions in a subscription.
This operation retrieves a list of all the policy definitions in a given subscription.
list(**kwargs: Any) -> AsyncIterable[azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinitionListResult]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either PolicyDefinitionListResult or the result of cls(response)
Return type
Exceptions
list_built_in
Retrieve built-in policy definitions.
This operation retrieves a list of all the built-in policy definitions.
list_built_in(**kwargs: Any) -> AsyncIterable[azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinitionListResult]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either PolicyDefinitionListResult or the result of cls(response)
Return type
Exceptions
list_by_management_group
Retrieve policy definitions in a management group.
This operation retrieves a list of all the policy definitions in a given management group.
list_by_management_group(management_group_id: str, **kwargs: Any) -> AsyncIterable[azure.mgmt.resource.policy.v2019_06_01.models._models_py3.PolicyDefinitionListResult]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either PolicyDefinitionListResult or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.resource.policy.v2019_06_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\resource\\policy\\v2019_06_01\\models\\__init__.py'>
Feedback
Submit and view feedback for