Partager via


PolicyExemptionInner Class

public final class PolicyExemptionInner
extends ProxyResource

The policy exemption.

Constructor Summary

Constructor Description
PolicyExemptionInner()

Creates an instance of PolicyExemptionInner class.

Method Summary

Modifier and Type Method and Description
AssignmentScopeValidation assignmentScopeValidation()

Get the assignmentScopeValidation property: The option whether validate the exemption is at or under the assignment scope.

String description()

Get the description property: The description of the policy exemption.

String displayName()

Get the displayName property: The display name of the policy exemption.

ExemptionCategory exemptionCategory()

Get the exemptionCategory property: The policy exemption category.

OffsetDateTime expiresOn()

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

static PolicyExemptionInner fromJson(JsonReader jsonReader)

Reads an instance of PolicyExemptionInner from the JsonReader.

String id()

Get the id property: Fully qualified resource Id for the resource.

Object metadata()

Get the metadata property: The policy exemption metadata.

String name()

Get the name property: The name of the resource.

String policyAssignmentId()

Get the policyAssignmentId property: The ID of the policy assignment that is being exempted.

List<String> policyDefinitionReferenceIds()

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

List<ResourceSelector> resourceSelectors()

Get the resourceSelectors property: The resource selector list to filter policies by resource properties.

SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

void validate()

Validates the instance.

PolicyExemptionInner withAssignmentScopeValidation(AssignmentScopeValidation assignmentScopeValidation)

Set the assignmentScopeValidation property: The option whether validate the exemption is at or under the assignment scope.

PolicyExemptionInner withDescription(String description)

Set the description property: The description of the policy exemption.

PolicyExemptionInner withDisplayName(String displayName)

Set the displayName property: The display name of the policy exemption.

PolicyExemptionInner withExemptionCategory(ExemptionCategory exemptionCategory)

Set the exemptionCategory property: The policy exemption category.

PolicyExemptionInner withExpiresOn(OffsetDateTime expiresOn)

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

PolicyExemptionInner withMetadata(Object metadata)

Set the metadata property: The policy exemption metadata.

PolicyExemptionInner withPolicyAssignmentId(String policyAssignmentId)

Set the policyAssignmentId property: The ID of the policy assignment that is being exempted.

PolicyExemptionInner withPolicyDefinitionReferenceIds(List<String> policyDefinitionReferenceIds)

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

PolicyExemptionInner withResourceSelectors(List<ResourceSelector> resourceSelectors)

Set the resourceSelectors property: The resource selector list to filter policies by resource properties.

Methods inherited from ProxyResource

Methods inherited from java.lang.Object

Constructor Details

PolicyExemptionInner

public PolicyExemptionInner()

Creates an instance of PolicyExemptionInner class.

Method Details

assignmentScopeValidation

public AssignmentScopeValidation assignmentScopeValidation()

Get the assignmentScopeValidation property: The option whether validate the exemption is at or under the assignment scope.

Returns:

the assignmentScopeValidation value.

description

public String description()

Get the description property: The description of the policy exemption.

Returns:

the description value.

displayName

public String displayName()

Get the displayName property: The display name of the policy exemption.

Returns:

the displayName value.

exemptionCategory

public ExemptionCategory exemptionCategory()

Get the exemptionCategory property: The policy exemption category. Possible values are Waiver and Mitigated.

Returns:

the exemptionCategory value.

expiresOn

public OffsetDateTime expiresOn()

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

Returns:

the expiresOn value.

fromJson

public static PolicyExemptionInner fromJson(JsonReader jsonReader)

Reads an instance of PolicyExemptionInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of PolicyExemptionInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

PolicyExemptionInner.id()

Returns:

the id value.

metadata

public Object metadata()

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

Returns:

the metadata value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

PolicyExemptionInner.name()

Returns:

the name value.

policyAssignmentId

public String policyAssignmentId()

Get the policyAssignmentId property: The ID of the policy assignment that is being exempted.

Returns:

the policyAssignmentId value.

policyDefinitionReferenceIds

public List policyDefinitionReferenceIds()

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

Returns:

the policyDefinitionReferenceIds value.

resourceSelectors

public List resourceSelectors()

Get the resourceSelectors property: The resource selector list to filter policies by resource properties.

Returns:

the resourceSelectors value.

systemData

public SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

Returns:

the systemData value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

PolicyExemptionInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

PolicyExemptionInner.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

withAssignmentScopeValidation

public PolicyExemptionInner withAssignmentScopeValidation(AssignmentScopeValidation assignmentScopeValidation)

Set the assignmentScopeValidation property: The option whether validate the exemption is at or under the assignment scope.

Parameters:

assignmentScopeValidation - the assignmentScopeValidation value to set.

Returns:

the PolicyExemptionInner object itself.

withDescription

public PolicyExemptionInner withDescription(String description)

Set the description property: The description of the policy exemption.

Parameters:

description - the description value to set.

Returns:

the PolicyExemptionInner object itself.

withDisplayName

public PolicyExemptionInner withDisplayName(String displayName)

Set the displayName property: The display name of the policy exemption.

Parameters:

displayName - the displayName value to set.

Returns:

the PolicyExemptionInner object itself.

withExemptionCategory

public PolicyExemptionInner withExemptionCategory(ExemptionCategory exemptionCategory)

Set the exemptionCategory property: The policy exemption category. Possible values are Waiver and Mitigated.

Parameters:

exemptionCategory - the exemptionCategory value to set.

Returns:

the PolicyExemptionInner object itself.

withExpiresOn

public PolicyExemptionInner withExpiresOn(OffsetDateTime expiresOn)

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

Parameters:

expiresOn - the expiresOn value to set.

Returns:

the PolicyExemptionInner object itself.

withMetadata

public PolicyExemptionInner withMetadata(Object metadata)

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

Parameters:

metadata - the metadata value to set.

Returns:

the PolicyExemptionInner object itself.

withPolicyAssignmentId

public PolicyExemptionInner withPolicyAssignmentId(String policyAssignmentId)

Set the policyAssignmentId property: The ID of the policy assignment that is being exempted.

Parameters:

policyAssignmentId - the policyAssignmentId value to set.

Returns:

the PolicyExemptionInner object itself.

withPolicyDefinitionReferenceIds

public PolicyExemptionInner withPolicyDefinitionReferenceIds(List policyDefinitionReferenceIds)

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

Parameters:

policyDefinitionReferenceIds - the policyDefinitionReferenceIds value to set.

Returns:

the PolicyExemptionInner object itself.

withResourceSelectors

public PolicyExemptionInner withResourceSelectors(List resourceSelectors)

Set the resourceSelectors property: The resource selector list to filter policies by resource properties.

Parameters:

resourceSelectors - the resourceSelectors value to set.

Returns:

the PolicyExemptionInner object itself.

Applies to