Language

PolicyExemption Class

Definition

The policy exemption.

[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.PolicyExemptionTypeConverter))]
public class PolicyExemption : Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemption
[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.PolicyExemptionTypeConverter))]
public class PolicyExemption : Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemption, Microsoft.Azure.PowerShell.Cmdlets.Policy.Runtime.IValidates
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.PolicyExemptionTypeConverter))>]
type PolicyExemption = class
    interface IPolicyExemption
    interface IJsonSerializable
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.PolicyExemptionTypeConverter))>]
type PolicyExemption = class
    interface IPolicyExemption
    interface IJsonSerializable
    interface IExtensionResource
    interface IResource
    interface IValidates
Public Class PolicyExemption
Implements IPolicyExemption
Public Class PolicyExemption
Implements IPolicyExemption, IValidates
Inheritance
PolicyExemption
Attributes
Implements

Constructors

Name Description
PolicyExemption()

Creates an new PolicyExemption instance.

Properties

Name Description
AssignmentScopeValidation

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

Description

The description of the policy exemption.

DisplayName

The display name of the policy exemption.

ExemptionCategory

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

ExpiresOn

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

Id

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

Metadata

The policy exemption metadata, exposed with its pre-migration named type IPolicyExemptionPropertiesMetadata instead of the raw IAny. The generated flattened property is renamed to MetadataRaw (see tspconfig.yaml) so this back-compatible accessor owns the Metadata name. It reads/writes the same underlying Property.Metadata storage, so behavior is unchanged.

MetadataRaw

The policy exemption metadata. Metadata is an open ended object and is typically a collection of key value pairs.

Name

The name of the resource

PolicyAssignmentId

The ID of the policy assignment that is being exempted.

PolicyDefinitionReferenceId

The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.

ResourceSelector

The resource selectors, exposed with their pre-migration element type IResourceSelectorAutoGenerated (the emitter renamed the element type to IResourceSelector). The generated flattened property is renamed to ResourceSelectorRaw (see tspconfig.yaml) so this back-compatible accessor owns the ResourceSelector name. Because List<A> is not assignable to List<B> even when the element types are compatible, the list is projected; the underlying elements are the same concrete ResourceSelector instances.

ResourceSelectorRaw

The resource selector list to filter policies by resource properties.

SystemDataCreatedAt

The timestamp of resource creation (UTC).

SystemDataCreatedBy

The identity that created the resource.

SystemDataCreatedByType

The type of identity that created the resource.

SystemDataLastModifiedAt

The timestamp of resource last modification (UTC)

SystemDataLastModifiedBy

The identity that last modified the resource.

SystemDataLastModifiedByType

The type of identity that last modified the resource.

Type

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

Name Description
DeserializeFromDictionary(IDictionary)

Deserializes a IDictionary into an instance of PolicyExemption.

DeserializeFromPSObject(PSObject)

Deserializes a PSObject into an instance of PolicyExemption.

FromJson(JsonNode)

Deserializes a JsonNode into an instance of Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemption.

FromJsonString(String)

Creates a new instance of PolicyExemption, deserializing the content from a json string.

ToJson(JsonObject, SerializationMode)

Serializes this instance of PolicyExemption into a JsonNode.

ToJsonString()

Serializes this instance to a json string.

Validate(IEventListener)

Validates that this object meets the validation criteria.

Applies to