Class NonComplianceMessage

java.lang.Object
com.azure.resourcemanager.resources.models.NonComplianceMessage

public final class NonComplianceMessage extends Object
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 Details

    • NonComplianceMessage

      public NonComplianceMessage()
  • Method Details

    • message

      public String 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

      public NonComplianceMessage withMessage(String message)
      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

      public String 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

      public NonComplianceMessage withPolicyDefinitionReferenceId(String policyDefinitionReferenceId)
      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.