Class PolicyExemptionProperties
java.lang.Object
com.azure.resourcemanager.resources.fluent.models.PolicyExemptionProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PolicyExemptionProperties>
public final class PolicyExemptionProperties
extends Object
implements com.azure.json.JsonSerializable<PolicyExemptionProperties>
The policy exemption properties.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PolicyExemptionProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the assignmentScopeValidation property: The option whether validate the exemption is at or under the assignment scope.Get the description property: The description of the policy exemption.Get the displayName property: The display name of the policy exemption.Get the exemptionCategory property: The policy exemption category.Get the expiresOn property: The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption.static PolicyExemptionPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PolicyExemptionProperties from the JsonReader.metadata()Get the metadata property: The policy exemption metadata.Get the policyAssignmentId property: The ID of the policy assignment that is being exempted.Get the policyDefinitionReferenceIds property: The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.Get the resourceSelectors property: The resource selector list to filter policies by resource properties.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAssignmentScopeValidation(AssignmentScopeValidation assignmentScopeValidation) Set the assignmentScopeValidation property: The option whether validate the exemption is at or under the assignment scope.withDescription(String description) Set the description property: The description of the policy exemption.withDisplayName(String displayName) Set the displayName property: The display name of the policy exemption.withExemptionCategory(ExemptionCategory exemptionCategory) Set the exemptionCategory property: The policy exemption category.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.withMetadata(Object metadata) Set the metadata property: The policy exemption metadata.withPolicyAssignmentId(String policyAssignmentId) Set the policyAssignmentId property: The ID of the policy assignment that is being exempted.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.withResourceSelectors(List<ResourceSelector> resourceSelectors) Set the resourceSelectors property: The resource selector list to filter policies by resource properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
PolicyExemptionProperties
public PolicyExemptionProperties()Creates an instance of PolicyExemptionProperties class.
-
-
Method Details
-
policyAssignmentId
Get the policyAssignmentId property: The ID of the policy assignment that is being exempted.- Returns:
- the policyAssignmentId value.
-
withPolicyAssignmentId
Set the policyAssignmentId property: The ID of the policy assignment that is being exempted.- Parameters:
policyAssignmentId- the policyAssignmentId value to set.- Returns:
- the PolicyExemptionProperties object itself.
-
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.
-
withPolicyDefinitionReferenceIds
public PolicyExemptionProperties 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.- Parameters:
policyDefinitionReferenceIds- the policyDefinitionReferenceIds value to set.- Returns:
- the PolicyExemptionProperties object itself.
-
exemptionCategory
Get the exemptionCategory property: The policy exemption category. Possible values are Waiver and Mitigated.- Returns:
- the exemptionCategory value.
-
withExemptionCategory
Set the exemptionCategory property: The policy exemption category. Possible values are Waiver and Mitigated.- Parameters:
exemptionCategory- the exemptionCategory value to set.- Returns:
- the PolicyExemptionProperties object itself.
-
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.
-
withExpiresOn
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 PolicyExemptionProperties object itself.
-
displayName
Get the displayName property: The display name of the policy exemption.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: The display name of the policy exemption.- Parameters:
displayName- the displayName value to set.- Returns:
- the PolicyExemptionProperties object itself.
-
description
Get the description property: The description of the policy exemption.- Returns:
- the description value.
-
withDescription
Set the description property: The description of the policy exemption.- Parameters:
description- the description value to set.- Returns:
- the PolicyExemptionProperties object itself.
-
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.
-
withMetadata
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 PolicyExemptionProperties object itself.
-
resourceSelectors
Get the resourceSelectors property: The resource selector list to filter policies by resource properties.- Returns:
- the resourceSelectors value.
-
withResourceSelectors
Set the resourceSelectors property: The resource selector list to filter policies by resource properties.- Parameters:
resourceSelectors- the resourceSelectors value to set.- Returns:
- the PolicyExemptionProperties object itself.
-
assignmentScopeValidation
Get the assignmentScopeValidation property: The option whether validate the exemption is at or under the assignment scope.- Returns:
- the assignmentScopeValidation value.
-
withAssignmentScopeValidation
public PolicyExemptionProperties 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 PolicyExemptionProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<PolicyExemptionProperties>- Throws:
IOException
-
fromJson
public static PolicyExemptionProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PolicyExemptionProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PolicyExemptionProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the PolicyExemptionProperties.
-