共用方式為


PolicySetDefinitionVersionsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

PolicyClient's

<xref:policy_set_definition_versions> attribute.

Inheritance
builtins.object
PolicySetDefinitionVersionsOperations

Constructor

PolicySetDefinitionVersionsOperations(*args, **kwargs)

Methods

create_or_update

Creates or updates a policy set definition version.

This operation creates or updates a policy set definition version in the given subscription with the given name and version.

create_or_update_at_management_group

Creates or updates a policy set definition version.

This operation creates or updates a policy set definition version in the given management group with the given name and version.

delete

Deletes a policy set definition version.

This operation deletes the policy set definition version in the given subscription with the given name and version.

delete_at_management_group

Deletes a policy set definition version.

This operation deletes the policy set definition version in the given management group with the given name and version.

get

Retrieves a policy set definition version.

This operation retrieves the policy set definition version in the given subscription with the given name and version.

get_at_management_group

Retrieves a policy set definition version.

This operation retrieves the policy set definition version in the given management group with the given name and version.

get_built_in

Retrieves a built in policy set definition version.

This operation retrieves the built-in policy set definition version with the given name and version.

list

Retrieves the policy set definition versions for a given policy set definition in a subscription.

This operation retrieves a list of all the policy set definition versions for the given policy set definition.

list_all

Lists all policy set definition versions within a subscription.

This operation lists all the policy set definition versions for all policy set definitions within a subscription.

list_all_at_management_group

Lists all policy set definition versions at management group scope.

This operation lists all the policy set definition versions for all policy set definitions at the management group scope.

list_all_builtins

Lists all built-in policy set definition versions.

This operation lists all the built-in policy set definition versions for all built-in policy set definitions.

list_built_in

Retrieves built-in policy set definition versions.

This operation retrieves a list of all the built-in policy set definition versions for the given built-in policy set definition.

list_by_management_group

Retrieves all policy set definition versions for a given policy set definition in a management group.

This operation retrieves a list of all the policy set definition versions for the given policy set definition in a given management group.

create_or_update

Creates or updates a policy set definition version.

This operation creates or updates a policy set definition version in the given subscription with the given name and version.

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

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition. Required.

policy_definition_version
Required
str

The policy set definition version. The format is x.y.z where x is the major version number, y is the minor version number, and z is the patch number. Required.

parameters
Required

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

Returns

Type Description

PolicySetDefinitionVersion or the result of cls(response)

Exceptions

Type Description

create_or_update_at_management_group

Creates or updates a policy set definition version.

This operation creates or updates a policy set definition version in the given management group with the given name and version.

async create_or_update_at_management_group(management_group_name: str, policy_set_definition_name: str, policy_definition_version: str, parameters: _models.PolicySetDefinitionVersion, *, content_type: str = 'application/json', **kwargs: Any) -> _models.PolicySetDefinitionVersion

Parameters

Name Description
management_group_name
Required
str

The name of the management group. The name is case insensitive. Required.

policy_set_definition_name
Required
str

The name of the policy set definition. Required.

policy_definition_version
Required
str

The policy set definition version. The format is x.y.z where x is the major version number, y is the minor version number, and z is the patch number. Required.

parameters
Required

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

Returns

Type Description

PolicySetDefinitionVersion or the result of cls(response)

Exceptions

Type Description

delete

Deletes a policy set definition version.

This operation deletes the policy set definition version in the given subscription with the given name and version.

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

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition. Required.

policy_definition_version
Required
str

The policy set definition version. The format is x.y.z where x is the major version number, y is the minor version number, and z is the patch number. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

delete_at_management_group

Deletes a policy set definition version.

This operation deletes the policy set definition version in the given management group with the given name and version.

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

Parameters

Name Description
management_group_name
Required
str

The name of the management group. The name is case insensitive. Required.

policy_set_definition_name
Required
str

The name of the policy set definition. Required.

policy_definition_version
Required
str

The policy set definition version. The format is x.y.z where x is the major version number, y is the minor version number, and z is the patch number. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Retrieves a policy set definition version.

This operation retrieves the policy set definition version in the given subscription with the given name and version.

async get(policy_set_definition_name: str, policy_definition_version: str, **kwargs: Any) -> PolicySetDefinitionVersion

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition. Required.

policy_definition_version
Required
str

The policy set definition version. The format is x.y.z where x is the major version number, y is the minor version number, and z is the patch number. Required.

Returns

Type Description

PolicySetDefinitionVersion or the result of cls(response)

Exceptions

Type Description

get_at_management_group

Retrieves a policy set definition version.

This operation retrieves the policy set definition version in the given management group with the given name and version.

async get_at_management_group(management_group_name: str, policy_set_definition_name: str, policy_definition_version: str, **kwargs: Any) -> PolicySetDefinitionVersion

Parameters

Name Description
management_group_name
Required
str

The name of the management group. The name is case insensitive. Required.

policy_set_definition_name
Required
str

The name of the policy set definition. Required.

policy_definition_version
Required
str

The policy set definition version. The format is x.y.z where x is the major version number, y is the minor version number, and z is the patch number. Required.

Returns

Type Description

PolicySetDefinitionVersion or the result of cls(response)

Exceptions

Type Description

get_built_in

Retrieves a built in policy set definition version.

This operation retrieves the built-in policy set definition version with the given name and version.

async get_built_in(policy_set_definition_name: str, policy_definition_version: str, **kwargs: Any) -> PolicySetDefinitionVersion

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition. Required.

policy_definition_version
Required
str

The policy set definition version. The format is x.y.z where x is the major version number, y is the minor version number, and z is the patch number. Required.

Returns

Type Description

PolicySetDefinitionVersion or the result of cls(response)

Exceptions

Type Description

list

Retrieves the policy set definition versions for a given policy set definition in a subscription.

This operation retrieves a list of all the policy set definition versions for the given policy set definition.

list(policy_set_definition_name: str, top: int | None = None, **kwargs: Any) -> AsyncIterable[PolicySetDefinitionVersion]

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition. Required.

top
Required
int

Maximum number of records to return. When the $top filter is not provided, it will return 500 records. Default value is None.

Returns

Type Description

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

Exceptions

Type Description

list_all

Lists all policy set definition versions within a subscription.

This operation lists all the policy set definition versions for all policy set definitions within a subscription.

async list_all(**kwargs: Any) -> PolicySetDefinitionVersionListResult

Returns

Type Description

PolicySetDefinitionVersionListResult or the result of cls(response)

Exceptions

Type Description

list_all_at_management_group

Lists all policy set definition versions at management group scope.

This operation lists all the policy set definition versions for all policy set definitions at the management group scope.

async list_all_at_management_group(management_group_name: str, **kwargs: Any) -> PolicySetDefinitionVersionListResult

Parameters

Name Description
management_group_name
Required
str

The name of the management group. The name is case insensitive. Required.

Returns

Type Description

PolicySetDefinitionVersionListResult or the result of cls(response)

Exceptions

Type Description

list_all_builtins

Lists all built-in policy set definition versions.

This operation lists all the built-in policy set definition versions for all built-in policy set definitions.

async list_all_builtins(**kwargs: Any) -> PolicySetDefinitionVersionListResult

Returns

Type Description

PolicySetDefinitionVersionListResult or the result of cls(response)

Exceptions

Type Description

list_built_in

Retrieves built-in policy set definition versions.

This operation retrieves a list of all the built-in policy set definition versions for the given built-in policy set definition.

list_built_in(policy_set_definition_name: str, top: int | None = None, **kwargs: Any) -> AsyncIterable[PolicySetDefinitionVersion]

Parameters

Name Description
policy_set_definition_name
Required
str

The name of the policy set definition. Required.

top
Required
int

Maximum number of records to return. When the $top filter is not provided, it will return 500 records. Default value is None.

Returns

Type Description

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

Exceptions

Type Description

list_by_management_group

Retrieves all policy set definition versions for a given policy set definition in a management group.

This operation retrieves a list of all the policy set definition versions for the given policy set definition in a given management group.

list_by_management_group(management_group_name: str, policy_set_definition_name: str, top: int | None = None, **kwargs: Any) -> AsyncIterable[PolicySetDefinitionVersion]

Parameters

Name Description
management_group_name
Required
str

The name of the management group. The name is case insensitive. Required.

policy_set_definition_name
Required
str

The name of the policy set definition. Required.

top
Required
int

Maximum number of records to return. When the $top filter is not provided, it will return 500 records. Default value is None.

Returns

Type Description

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

Exceptions

Type Description

Attributes

models

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