azure.mgmt.resource.policy.v2022_07_01_preview.models module

class azure.mgmt.resource.policy.v2022_07_01_preview.models.AssignmentScopeValidation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

The option whether validate the exemption is at or under the assignment scope.

DEFAULT = 'Default'

This option will validate the exemption is at or under the assignment scope.

DO_NOT_VALIDATE = 'DoNotValidate'

This option will bypass the validation the exemption scope is at or under the policy assignment scope.

class azure.mgmt.resource.policy.v2022_07_01_preview.models.CreatedByType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

The type of identity that created the resource.

APPLICATION = 'Application'
KEY = 'Key'
MANAGED_IDENTITY = 'ManagedIdentity'
USER = 'User'
class azure.mgmt.resource.policy.v2022_07_01_preview.models.ErrorAdditionalInfo(**kwargs: Any)[source]

Bases: Model

The resource management error additional info.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • type (str) – The additional info type.

  • info (JSON) – The additional info.

class azure.mgmt.resource.policy.v2022_07_01_preview.models.ErrorResponse(**kwargs: Any)[source]

Bases: Model

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
class azure.mgmt.resource.policy.v2022_07_01_preview.models.ExemptionCategory(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

The policy exemption category. Possible values are Waiver and Mitigated.

MITIGATED = 'Mitigated'

This category of exemptions usually means the mitigation actions have been applied to the scope.

WAIVER = 'Waiver'

This category of exemptions usually means the scope is not applicable for the policy.

class azure.mgmt.resource.policy.v2022_07_01_preview.models.PolicyExemption(*, policy_assignment_id: str, exemption_category: str | _models.ExemptionCategory, policy_definition_reference_ids: List[str] | None = None, expires_on: datetime | None = None, display_name: str | None = None, description: str | None = None, metadata: MutableMapping[str, Any] | None = None, resource_selectors: List[_models.ResourceSelector] | None = None, assignment_scope_validation: str | _models.AssignmentScopeValidation | None = None, **kwargs: Any)[source]

Bases: Model

The policy exemption.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Variables:
  • system_data (SystemData) – Azure Resource Manager metadata containing createdBy and modifiedBy information.

  • id (str) – The ID of the policy exemption.

  • name (str) – The name of the policy exemption.

  • type (str) – The type of the resource (Microsoft.Authorization/policyExemptions).

  • policy_assignment_id (str) – The ID of the policy assignment that is being exempted. Required.

  • policy_definition_reference_ids (list[str]) – The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.

  • exemption_category (str or ExemptionCategory) – The policy exemption category. Possible values are Waiver and Mitigated. Required. Known values are: “Waiver” and “Mitigated”.

  • expires_on (datetime) – The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption.

  • display_name (str) – The display name of the policy exemption.

  • description (str) – The description of the policy exemption.

  • metadata (JSON) – The policy exemption metadata. Metadata is an open ended object and is typically a collection of key value pairs.

  • resource_selectors (list[ResourceSelector]) – The resource selector list to filter policies by resource properties.

  • assignment_scope_validation (str or AssignmentScopeValidation) – The option whether validate the exemption is at or under the assignment scope. Known values are: “Default” and “DoNotValidate”.

Keyword Arguments:
  • policy_assignment_id (str) – The ID of the policy assignment that is being exempted. Required.

  • policy_definition_reference_ids (list[str]) – The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.

  • exemption_category (str or ExemptionCategory) – The policy exemption category. Possible values are Waiver and Mitigated. Required. Known values are: “Waiver” and “Mitigated”.

  • expires_on (datetime) – The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption.

  • display_name (str) – The display name of the policy exemption.

  • description (str) – The description of the policy exemption.

  • metadata (JSON) – The policy exemption metadata. Metadata is an open ended object and is typically a collection of key value pairs.

  • resource_selectors (list[ResourceSelector]) – The resource selector list to filter policies by resource properties.

  • assignment_scope_validation (str or AssignmentScopeValidation) – The option whether validate the exemption is at or under the assignment scope. Known values are: “Default” and “DoNotValidate”.

class azure.mgmt.resource.policy.v2022_07_01_preview.models.PolicyExemptionListResult(*, value: List[_models.PolicyExemption] | None = None, **kwargs: Any)[source]

Bases: Model

List of policy exemptions.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • value (list[PolicyExemption]) – An array of policy exemptions.

  • next_link (str) – The URL to use for getting the next set of results.

Keyword Arguments:

value (list[PolicyExemption]) – An array of policy exemptions.

class azure.mgmt.resource.policy.v2022_07_01_preview.models.PolicyExemptionUpdate(*, resource_selectors: List[_models.ResourceSelector] | None = None, assignment_scope_validation: str | _models.AssignmentScopeValidation | None = None, **kwargs: Any)[source]

Bases: Model

The policy exemption for Patch request.

Variables:
  • resource_selectors (list[ResourceSelector]) – The resource selector list to filter policies by resource properties.

  • assignment_scope_validation (str or AssignmentScopeValidation) – The option whether validate the exemption is at or under the assignment scope. Known values are: “Default” and “DoNotValidate”.

Keyword Arguments:
  • resource_selectors (list[ResourceSelector]) – The resource selector list to filter policies by resource properties.

  • assignment_scope_validation (str or AssignmentScopeValidation) – The option whether validate the exemption is at or under the assignment scope. Known values are: “Default” and “DoNotValidate”.

class azure.mgmt.resource.policy.v2022_07_01_preview.models.ResourceSelector(*, name: str | None = None, selectors: List[_models.Selector] | None = None, **kwargs: Any)[source]

Bases: Model

The resource selector to filter policies by resource properties.

Variables:
  • name (str) – The name of the resource selector.

  • selectors (list[Selector]) – The list of the selector expressions.

Keyword Arguments:
  • name (str) – The name of the resource selector.

  • selectors (list[Selector]) – The list of the selector expressions.

class azure.mgmt.resource.policy.v2022_07_01_preview.models.Selector(*, kind: str | _models.SelectorKind | None = None, in_property: List[str] | None = None, not_in: List[str] | None = None, **kwargs: Any)[source]

Bases: Model

The selector expression.

Variables:
  • kind (str or SelectorKind) – The selector kind. Known values are: “resourceLocation”, “resourceType”, “resourceWithoutLocation”, and “policyDefinitionReferenceId”.

  • in_property (list[str]) – The list of values to filter in.

  • not_in (list[str]) – The list of values to filter out.

Keyword Arguments:
  • kind (str or SelectorKind) – The selector kind. Known values are: “resourceLocation”, “resourceType”, “resourceWithoutLocation”, and “policyDefinitionReferenceId”.

  • in_property (list[str]) – The list of values to filter in.

  • not_in (list[str]) – The list of values to filter out.

class azure.mgmt.resource.policy.v2022_07_01_preview.models.SelectorKind(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

The selector kind.

POLICY_DEFINITION_REFERENCE_ID = 'policyDefinitionReferenceId'

The selector kind to filter policies by the policy definition reference ID.

RESOURCE_LOCATION = 'resourceLocation'

The selector kind to filter policies by the resource location.

RESOURCE_TYPE = 'resourceType'

The selector kind to filter policies by the resource type.

RESOURCE_WITHOUT_LOCATION = 'resourceWithoutLocation'

The selector kind to filter policies by the resource without location.

class azure.mgmt.resource.policy.v2022_07_01_preview.models.SystemData(*, created_by: str | None = None, created_by_type: str | _models.CreatedByType | None = None, created_at: datetime | None = None, last_modified_by: str | None = None, last_modified_by_type: str | _models.CreatedByType | None = None, last_modified_at: datetime | None = None, **kwargs: Any)[source]

Bases: Model

Metadata pertaining to creation and last modification of the resource.

Variables:
  • created_by (str) – The identity that created the resource.

  • created_by_type (str or CreatedByType) – The type of identity that created the resource. Known values are: “User”, “Application”, “ManagedIdentity”, and “Key”.

  • created_at (datetime) – The timestamp of resource creation (UTC).

  • last_modified_by (str) – The identity that last modified the resource.

  • last_modified_by_type (str or CreatedByType) – The type of identity that last modified the resource. Known values are: “User”, “Application”, “ManagedIdentity”, and “Key”.

  • last_modified_at (datetime) – The timestamp of resource last modification (UTC).

Keyword Arguments:
  • created_by (str) – The identity that created the resource.

  • created_by_type (str or CreatedByType) – The type of identity that created the resource. Known values are: “User”, “Application”, “ManagedIdentity”, and “Key”.

  • created_at (datetime) – The timestamp of resource creation (UTC).

  • last_modified_by (str) – The identity that last modified the resource.

  • last_modified_by_type (str or CreatedByType) – The type of identity that last modified the resource. Known values are: “User”, “Application”, “ManagedIdentity”, and “Key”.

  • last_modified_at (datetime) – The timestamp of resource last modification (UTC).