Class NonComplianceMessage
java.lang.Object
com.azure.resourcemanager.resources.models.NonComplianceMessage
A message that describes why a resource is non-compliant with the policy. This is shown in 'deny' error messages and
on resource's non-compliant compliance results.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmessage()Get the message property: A message that describes why a resource is non-compliant with the policy.Get the policyDefinitionReferenceId property: The policy definition reference ID within a policy set definition the message is intended for.voidvalidate()Validates the instance.withMessage(String message) Set the message property: A message that describes why a resource is non-compliant with the policy.withPolicyDefinitionReferenceId(String policyDefinitionReferenceId) Set the policyDefinitionReferenceId property: The policy definition reference ID within a policy set definition the message is intended for.
-
Constructor Details
-
NonComplianceMessage
public NonComplianceMessage()
-
-
Method Details
-
message
Get the message property: A message that describes why a resource is non-compliant with the policy. This is shown in 'deny' error messages and on resource's non-compliant compliance results.- Returns:
- the message value.
-
withMessage
Set the message property: A message that describes why a resource is non-compliant with the policy. This is shown in 'deny' error messages and on resource's non-compliant compliance results.- Parameters:
message- the message value to set.- Returns:
- the NonComplianceMessage object itself.
-
policyDefinitionReferenceId
Get the policyDefinitionReferenceId property: The policy definition reference ID within a policy set definition the message is intended for. This is only applicable if the policy assignment assigns a policy set definition. If this is not provided the message applies to all policies assigned by this policy assignment.- Returns:
- the policyDefinitionReferenceId value.
-
withPolicyDefinitionReferenceId
Set the policyDefinitionReferenceId property: The policy definition reference ID within a policy set definition the message is intended for. This is only applicable if the policy assignment assigns a policy set definition. If this is not provided the message applies to all policies assigned by this policy assignment.- Parameters:
policyDefinitionReferenceId- the policyDefinitionReferenceId value to set.- Returns:
- the NonComplianceMessage object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-