PolicySetDefinitionsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

PolicyClient's

<xref:policy_set_definitions> attribute.

Inheritance
builtins.object
PolicySetDefinitionsOperations

Constructor

PolicySetDefinitionsOperations(*args, **kwargs)

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.

create_or_update(policy_set_definition_name: str, parameters: _models.PolicySetDefinition, *, content_type: str = 'application/json', **kwargs: Any) -> _models.PolicySetDefinition

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition to create. Required.

parameters
Required

The policy set definition properties. Is either a PolicySetDefinition type or a IO[bytes] type. Required.

Returns

Type Description

PolicySetDefinition or the result of cls(response)

Exceptions

Type Description

create_or_update_at_management_group

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

create_or_update_at_management_group(policy_set_definition_name: str, management_group_id: str, parameters: _models.PolicySetDefinition, *, content_type: str = 'application/json', **kwargs: Any) -> _models.PolicySetDefinition

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition to create. Required.

management_group_id
Required
str

The ID of the management group. Required.

parameters
Required

The policy set definition properties. Is either a PolicySetDefinition type or a IO[bytes] type. Required.

Returns

Type Description

PolicySetDefinition or the result of cls(response)

Exceptions

Type Description

delete

Deletes a policy set definition.

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

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition to delete. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

delete_at_management_group

Deletes a policy set definition at management group level.

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

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition to delete. Required.

management_group_id
Required
str

The ID of the management group. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets the policy set definition.

get(policy_set_definition_name: str, **kwargs: Any) -> PolicySetDefinition

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition to get. Required.

Returns

Type Description

PolicySetDefinition or the result of cls(response)

Exceptions

Type Description

get_at_management_group

Gets the policy set definition at management group level.

get_at_management_group(policy_set_definition_name: str, management_group_id: str, **kwargs: Any) -> PolicySetDefinition

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition to get. Required.

management_group_id
Required
str

The ID of the management group. Required.

Returns

Type Description

PolicySetDefinition or the result of cls(response)

Exceptions

Type Description

get_built_in

Gets the built in policy set definition.

get_built_in(policy_set_definition_name: str, **kwargs: Any) -> PolicySetDefinition

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition to get. Required.

Returns

Type Description

PolicySetDefinition or the result of cls(response)

Exceptions

Type Description

list

Gets all the policy set definitions for a subscription.

list(**kwargs: Any) -> Iterable[PolicySetDefinition]

Returns

Type Description

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

Exceptions

Type Description

list_built_in

Gets all the built in policy set definitions.

list_built_in(**kwargs: Any) -> Iterable[PolicySetDefinition]

Returns

Type Description

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

Exceptions

Type Description

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) -> Iterable[PolicySetDefinition]

Parameters

Name Description
management_group_id
Required
str

The ID of the management group. Required.

Returns

Type Description

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

Exceptions

Type Description

Attributes

models

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