PolicyDefinitionVersionsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:policy_definition_versions> attribute.
- Inheritance
-
builtins.objectPolicyDefinitionVersionsOperations
Constructor
PolicyDefinitionVersionsOperations(*args, **kwargs)
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 version in a management group. This operation creates or updates a policy definition version in the given management group with the given name. |
delete |
Deletes a policy definition version in a subscription. This operation deletes the policy definition version 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 version in a subscription. This operation retrieves the policy definition version in the given subscription with the given name. |
get_at_management_group |
Retrieve a policy definition version in a management group. This operation retrieves the policy definition version in the given management group with the given name. |
get_built_in |
Retrieves a built-in policy definition version. This operation retrieves the built-in policy definition version with the given name. |
list |
Retrieves policy definition versions for a given policy definition in a subscription. This operation retrieves a list of all the policy definition versions for the given policy definition. |
list_all |
Lists all policy definition versions within a subscription. This operation lists all the policy definition versions for all policy definitions within a subscription. |
list_all_at_management_group |
Lists all policy definition versions at management group scope. This operation lists all the policy definition versions for all policy definitions at the management group scope. |
list_all_builtins |
Lists all built-in policy definition versions. This operation lists all the built-in policy definition versions for all built-in policy definitions. |
list_built_in |
Retrieve built-in policy definition versions. This operation retrieves a list of all the built-in policy definition versions for the given policy definition. |
list_by_management_group |
Retrieve policy definition versions in a management group policy definition. This operation retrieves a list of all the policy definition versions for the given policy definition in the 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.
create_or_update(policy_definition_name: str, policy_definition_version: str, parameters: _models.PolicyDefinitionVersion, *, content_type: str = 'application/json', **kwargs: Any) -> _models.PolicyDefinitionVersion
Parameters
Name | Description |
---|---|
policy_definition_name
Required
|
The name of the policy definition. Required. |
policy_definition_version
Required
|
The policy 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 definition properties. Is either a PolicyDefinitionVersion type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
PolicyDefinitionVersion or the result of cls(response) |
Exceptions
Type | Description |
---|---|
create_or_update_at_management_group
Creates or updates a policy definition version in a management group.
This operation creates or updates a policy definition version in the given management group with the given name.
create_or_update_at_management_group(management_group_name: str, policy_definition_name: str, policy_definition_version: str, parameters: _models.PolicyDefinitionVersion, *, content_type: str = 'application/json', **kwargs: Any) -> _models.PolicyDefinitionVersion
Parameters
Name | Description |
---|---|
management_group_name
Required
|
The name of the management group. The name is case insensitive. Required. |
policy_definition_name
Required
|
The name of the policy definition. Required. |
policy_definition_version
Required
|
The policy 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 definition properties. Is either a PolicyDefinitionVersion type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
PolicyDefinitionVersion or the result of cls(response) |
Exceptions
Type | Description |
---|---|
delete
Deletes a policy definition version in a subscription.
This operation deletes the policy definition version in the given subscription with the given name.
delete(policy_definition_name: str, policy_definition_version: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
policy_definition_name
Required
|
The name of the policy definition. Required. |
policy_definition_version
Required
|
The policy 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 definition in a management group.
This operation deletes the policy definition in the given management group with the given name.
delete_at_management_group(management_group_name: str, policy_definition_name: str, policy_definition_version: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
management_group_name
Required
|
The name of the management group. The name is case insensitive. Required. |
policy_definition_name
Required
|
The name of the policy definition. Required. |
policy_definition_version
Required
|
The policy 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 definition version in a subscription.
This operation retrieves the policy definition version in the given subscription with the given name.
get(policy_definition_name: str, policy_definition_version: str, **kwargs: Any) -> PolicyDefinitionVersion
Parameters
Name | Description |
---|---|
policy_definition_name
Required
|
The name of the policy definition. Required. |
policy_definition_version
Required
|
The policy 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 |
---|---|
PolicyDefinitionVersion or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_at_management_group
Retrieve a policy definition version in a management group.
This operation retrieves the policy definition version in the given management group with the given name.
get_at_management_group(management_group_name: str, policy_definition_name: str, policy_definition_version: str, **kwargs: Any) -> PolicyDefinitionVersion
Parameters
Name | Description |
---|---|
management_group_name
Required
|
The name of the management group. The name is case insensitive. Required. |
policy_definition_name
Required
|
The name of the policy definition. Required. |
policy_definition_version
Required
|
The policy 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 |
---|---|
PolicyDefinitionVersion or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_built_in
Retrieves a built-in policy definition version.
This operation retrieves the built-in policy definition version with the given name.
get_built_in(policy_definition_name: str, policy_definition_version: str, **kwargs: Any) -> PolicyDefinitionVersion
Parameters
Name | Description |
---|---|
policy_definition_name
Required
|
The name of the policy definition. Required. |
policy_definition_version
Required
|
The policy 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 |
---|---|
PolicyDefinitionVersion or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Retrieves policy definition versions for a given policy definition in a subscription.
This operation retrieves a list of all the policy definition versions for the given policy definition.
list(policy_definition_name: str, top: int | None = None, **kwargs: Any) -> Iterable[PolicyDefinitionVersion]
Parameters
Name | Description |
---|---|
policy_definition_name
Required
|
The name of the policy definition. Required. |
top
Required
|
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 PolicyDefinitionVersion or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_all
Lists all policy definition versions within a subscription.
This operation lists all the policy definition versions for all policy definitions within a subscription.
list_all(**kwargs: Any) -> PolicyDefinitionVersionListResult
Returns
Type | Description |
---|---|
PolicyDefinitionVersionListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_all_at_management_group
Lists all policy definition versions at management group scope.
This operation lists all the policy definition versions for all policy definitions at the management group scope.
list_all_at_management_group(management_group_name: str, **kwargs: Any) -> PolicyDefinitionVersionListResult
Parameters
Name | Description |
---|---|
management_group_name
Required
|
The name of the management group. The name is case insensitive. Required. |
Returns
Type | Description |
---|---|
PolicyDefinitionVersionListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_all_builtins
Lists all built-in policy definition versions.
This operation lists all the built-in policy definition versions for all built-in policy definitions.
list_all_builtins(**kwargs: Any) -> PolicyDefinitionVersionListResult
Returns
Type | Description |
---|---|
PolicyDefinitionVersionListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_built_in
Retrieve built-in policy definition versions.
This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
list_built_in(policy_definition_name: str, top: int | None = None, **kwargs: Any) -> Iterable[PolicyDefinitionVersion]
Parameters
Name | Description |
---|---|
policy_definition_name
Required
|
The name of the policy definition. Required. |
top
Required
|
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 PolicyDefinitionVersion or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_management_group
Retrieve policy definition versions in a management group policy definition.
This operation retrieves a list of all the policy definition versions for the given policy definition in the given management group.
list_by_management_group(management_group_name: str, policy_definition_name: str, top: int | None = None, **kwargs: Any) -> Iterable[PolicyDefinitionVersion]
Parameters
Name | Description |
---|---|
management_group_name
Required
|
The name of the management group. The name is case insensitive. Required. |
policy_definition_name
Required
|
The name of the policy definition. Required. |
top
Required
|
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 PolicyDefinitionVersion 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'>
Azure SDK for Python