Class PolicyExemptionInner
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.resourcemanager.resources.fluent.models.PolicyExemptionInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
public final class PolicyExemptionInner
extends com.azure.core.management.ProxyResource
The policy exemption.
-
Constructor Summary
Constructors -
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 PolicyExemptionInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PolicyExemptionInner from the JsonReader.id()Get the id property: Fully qualified resource Id for the resource.metadata()Get the metadata property: The policy exemption metadata.name()Get the name property: The name of the resource.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.core.management.SystemDataGet the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The type of the resource.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
-
PolicyExemptionInner
public PolicyExemptionInner()Creates an instance of PolicyExemptionInner class.
-
-
Method Details
-
systemData
public com.azure.core.management.SystemData systemData()Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.- Returns:
- the systemData value.
-
type
Get the type property: The type of the resource.- Overrides:
typein classcom.azure.core.management.ProxyResource- Returns:
- the type value.
-
name
Get the name property: The name of the resource.- Overrides:
namein classcom.azure.core.management.ProxyResource- Returns:
- the name value.
-
id
Get the id property: Fully qualified resource Id for the resource.- Overrides:
idin classcom.azure.core.management.ProxyResource- Returns:
- the id value.
-
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 PolicyExemptionInner 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 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.- Parameters:
policyDefinitionReferenceIds- the policyDefinitionReferenceIds value to set.- Returns:
- the PolicyExemptionInner 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 PolicyExemptionInner 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 PolicyExemptionInner 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 PolicyExemptionInner 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 PolicyExemptionInner 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 PolicyExemptionInner 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 PolicyExemptionInner 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 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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>- Overrides:
toJsonin classcom.azure.core.management.ProxyResource- Throws:
IOException
-
fromJson
public static PolicyExemptionInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the PolicyExemptionInner.
-