PolicySetDefinitionsOperations Class

PolicySetDefinitionsOperations 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
PolicySetDefinitionsOperations

Constructor

PolicySetDefinitionsOperations(client, config, serializer, deserializer)

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 set definition.

create_or_update_at_management_group

Creates or updates a policy set definition at management group level.

delete

Deletes a policy set definition.

delete_at_management_group

Deletes a policy set definition at management group level.

get

Gets the policy set definition.

get_at_management_group

Gets the policy set definition at management group level.

get_built_in

Gets the built in policy set definition.

list

Gets all the policy set definitions for a subscription.

list_built_in

Gets all the built in policy set definitions.

list_by_management_group

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

create_or_update

Creates or updates a policy set definition.

async create_or_update(policy_set_definition_name: str, parameters: azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinition, *, content_type: Optional[str] = 'application/json', **kwargs: Any) -> azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinition

Parameters

policy_set_definition_name
str
Required

The name of the policy set definition to create.

parameters
PolicySetDefinition
Required

The policy set definition properties.

content_type
str

Media type of the body sent to the API. Possible values are: "application/json" or "text/json". Default value is "application/json".

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

cls
callable

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

Returns

PolicySetDefinition, or the result of cls(response)

Return type

Exceptions

create_or_update_at_management_group

Creates or updates a policy set definition at management group level.

async create_or_update_at_management_group(policy_set_definition_name: str, management_group_id: str, parameters: azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinition, *, content_type: Optional[str] = 'application/json', **kwargs: Any) -> azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinition

Parameters

policy_set_definition_name
str
Required

The name of the policy set definition to create.

management_group_id
str
Required

The ID of the management group.

parameters
PolicySetDefinition
Required

The policy set definition properties.

content_type
str

Media type of the body sent to the API. Possible values are: "application/json" or "text/json". Default value is "application/json".

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

cls
callable

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

Returns

PolicySetDefinition, or the result of cls(response)

Return type

Exceptions

delete

Deletes a policy set definition.

async delete(policy_set_definition_name: str, **kwargs: Any) -> None

Parameters

policy_set_definition_name
str
Required

The name of the policy set definition to delete.

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

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 set definition at management group level.

async delete_at_management_group(policy_set_definition_name: str, management_group_id: str, **kwargs: Any) -> None

Parameters

policy_set_definition_name
str
Required

The name of the policy set definition to delete.

management_group_id
str
Required

The ID of the management group.

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

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

Gets the policy set definition.

async get(policy_set_definition_name: str, **kwargs: Any) -> azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinition

Parameters

policy_set_definition_name
str
Required

The name of the policy set definition to get.

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

cls
callable

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

Returns

PolicySetDefinition, or the result of cls(response)

Return type

Exceptions

get_at_management_group

Gets the policy set definition at management group level.

async get_at_management_group(policy_set_definition_name: str, management_group_id: str, **kwargs: Any) -> azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinition

Parameters

policy_set_definition_name
str
Required

The name of the policy set definition to get.

management_group_id
str
Required

The ID of the management group.

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

cls
callable

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

Returns

PolicySetDefinition, or the result of cls(response)

Return type

Exceptions

get_built_in

Gets the built in policy set definition.

async get_built_in(policy_set_definition_name: str, **kwargs: Any) -> azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinition

Parameters

policy_set_definition_name
str
Required

The name of the policy set definition to get.

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

cls
callable

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

Returns

PolicySetDefinition, or the result of cls(response)

Return type

Exceptions

list

Gets all the policy set definitions for a subscription.

list(**kwargs: Any) -> AsyncIterable[azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinitionListResult]

Parameters

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

cls
callable

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

Returns

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

Return type

Exceptions

list_built_in

Gets all the built in policy set definitions.

list_built_in(**kwargs: Any) -> AsyncIterable[azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinitionListResult]

Parameters

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

cls
callable

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

Returns

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

Return type

Exceptions

list_by_management_group

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

list_by_management_group(management_group_id: str, **kwargs: Any) -> AsyncIterable[azure.mgmt.resource.policy.v2017_06_01_preview.models._models_py3.PolicySetDefinitionListResult]

Parameters

management_group_id
str
Required

The ID of the management group.

api_version
str

Api Version. Default value is "2017-06-01-preview". Note that overriding this default value may result in unsupported behavior.

cls
callable

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

Returns

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

Return type

Exceptions

Attributes

models

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