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.object
PolicyDefinitionsOperations

Constructor

PolicyDefinitionsOperations(client, config, serializer, deserializer) -> None

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

create_or_update

Creates or updates a policy definition.

create_or_update_at_management_group

Creates or updates a policy definition at management group level.

delete

Deletes a policy definition.

delete_at_management_group

Deletes a policy definition at management group level.

get

Gets the policy definition.

get_at_management_group

Gets the policy definition at management group level.

get_built_in

Gets the built in policy definition.

list

Gets all the policy definitions for a subscription.

list_built_in

Gets all the built in policy definitions.

list_by_management_group

Gets all the policy definitions for a subscription at management group level.

create_or_update

Creates or updates a policy definition.

create_or_update(policy_definition_name: str, parameters: azure.mgmt.resource.policy.v2016_12_01.models._models_py3.PolicyDefinition, **kwargs: typing.Any) -> azure.mgmt.resource.policy.v2016_12_01.models._models_py3.PolicyDefinition

Parameters

policy_definition_name
str
Required

The name of the policy definition to create.

parameters
PolicyDefinition
Required

The policy definition properties.

cls
callable

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

Returns

PolicyDefinition, or the result of cls(response)

Return type

create_or_update_at_management_group

Creates or updates a policy definition at management group level.

create_or_update_at_management_group(policy_definition_name: str, management_group_id: str, parameters: azure.mgmt.resource.policy.v2016_12_01.models._models_py3.PolicyDefinition, **kwargs: typing.Any) -> azure.mgmt.resource.policy.v2016_12_01.models._models_py3.PolicyDefinition

Parameters

policy_definition_name
str
Required

The name of the policy definition to create.

management_group_id
str
Required

The ID of the management group.

parameters
PolicyDefinition
Required

The policy definition properties.

cls
callable

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

Returns

PolicyDefinition, or the result of cls(response)

Return type

delete

Deletes a policy definition.

delete(policy_definition_name: str, **kwargs: typing.Any) -> None

Parameters

policy_definition_name
str
Required

The name of the policy definition to delete.

cls
callable

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

Returns

None, or the result of cls(response)

Return type

delete_at_management_group

Deletes a policy definition at management group level.

delete_at_management_group(policy_definition_name: str, management_group_id: str, **kwargs: typing.Any) -> None

Parameters

policy_definition_name
str
Required

The name of the policy definition to delete.

management_group_id
str
Required

The ID of the management group.

cls
callable

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

Returns

None, or the result of cls(response)

Return type

get

Gets the policy definition.

get(policy_definition_name: str, **kwargs: typing.Any) -> azure.mgmt.resource.policy.v2016_12_01.models._models_py3.PolicyDefinition

Parameters

policy_definition_name
str
Required

The name of the policy definition to get.

cls
callable

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

Returns

PolicyDefinition, or the result of cls(response)

Return type

get_at_management_group

Gets the policy definition at management group level.

get_at_management_group(policy_definition_name: str, management_group_id: str, **kwargs: typing.Any) -> azure.mgmt.resource.policy.v2016_12_01.models._models_py3.PolicyDefinition

Parameters

policy_definition_name
str
Required

The name of the policy definition to get.

management_group_id
str
Required

The ID of the management group.

cls
callable

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

Returns

PolicyDefinition, or the result of cls(response)

Return type

get_built_in

Gets the built in policy definition.

get_built_in(policy_definition_name: str, **kwargs: typing.Any) -> azure.mgmt.resource.policy.v2016_12_01.models._models_py3.PolicyDefinition

Parameters

policy_definition_name
str
Required

The name of the built in policy definition to get.

cls
callable

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

Returns

PolicyDefinition, or the result of cls(response)

Return type

list

Gets all the policy definitions for a subscription.

list(**kwargs: typing.Any) -> typing.AsyncIterable[_ForwardRef('_models.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

list_built_in

Gets all the built in policy definitions.

list_built_in(**kwargs: typing.Any) -> typing.AsyncIterable[_ForwardRef('_models.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

list_by_management_group

Gets all the policy definitions for a subscription at management group level.

list_by_management_group(management_group_id: str, **kwargs: typing.Any) -> typing.AsyncIterable[_ForwardRef('_models.PolicyDefinitionListResult')]

Parameters

management_group_id
str
Required

The ID of the management group.

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

Attributes

models

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