NonComplianceMessage Class
- java.
lang. Object - com.
azure. resourcemanager. resources. models. NonComplianceMessage
- com.
Implements
public final class NonComplianceMessage
implements JsonSerializable<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
Constructor | Description |
---|---|
NonComplianceMessage() |
Creates an instance of Non |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Non |
fromJson(JsonReader jsonReader)
Reads an instance of Non |
String |
message()
Get the message property: A message that describes why a resource is non-compliant with the policy. |
String |
policyDefinitionReferenceId()
Get the policy |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Non |
withMessage(String message)
Set the message property: A message that describes why a resource is non-compliant with the policy. |
Non |
withPolicyDefinitionReferenceId(String policyDefinitionReferenceId)
Set the policy |
Methods inherited from java.lang.Object
Constructor Details
NonComplianceMessage
public NonComplianceMessage()
Creates an instance of NonComplianceMessage class.
Method Details
fromJson
public static NonComplianceMessage fromJson(JsonReader jsonReader)
Reads an instance of NonComplianceMessage from the JsonReader.
Parameters:
Returns:
Throws:
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:
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:
toJson
validate
public void validate()
Validates the instance.
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:
Returns:
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:
Returns:
Applies to
Azure SDK for Java