Class PolicyDefinitionReference
java.lang.Object
com.azure.resourcemanager.resources.models.PolicyDefinitionReference
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PolicyDefinitionReference>
public final class PolicyDefinitionReference
extends Object
implements com.azure.json.JsonSerializable<PolicyDefinitionReference>
The policy definition reference.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PolicyDefinitionReference class. -
Method Summary
Modifier and TypeMethodDescriptionGet the definitionVersion property: The version of the policy definition to use.Get the effectiveDefinitionVersion property: The effective version of the policy definition in use.static PolicyDefinitionReferencefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PolicyDefinitionReference from the JsonReader.Get the groupNames property: The name of the groups that this policy definition reference belongs to.Get the latestDefinitionVersion property: The latest version of the policy definition available.Get the parameters property: The parameter values for the referenced policy rule.Get the policyDefinitionId property: The ID of the policy definition or policy set definition.Get the policyDefinitionReferenceId property: A unique id (within the policy set definition) for this policy definition reference.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDefinitionVersion(String definitionVersion) Set the definitionVersion property: The version of the policy definition to use.withGroupNames(List<String> groupNames) Set the groupNames property: The name of the groups that this policy definition reference belongs to.withParameters(Map<String, ParameterValuesValue> parameters) Set the parameters property: The parameter values for the referenced policy rule.withPolicyDefinitionId(String policyDefinitionId) Set the policyDefinitionId property: The ID of the policy definition or policy set definition.withPolicyDefinitionReferenceId(String policyDefinitionReferenceId) Set the policyDefinitionReferenceId property: A unique id (within the policy set definition) for this policy definition reference.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
-
PolicyDefinitionReference
public PolicyDefinitionReference()Creates an instance of PolicyDefinitionReference class.
-
-
Method Details
-
policyDefinitionId
Get the policyDefinitionId property: The ID of the policy definition or policy set definition.- Returns:
- the policyDefinitionId value.
-
withPolicyDefinitionId
Set the policyDefinitionId property: The ID of the policy definition or policy set definition.- Parameters:
policyDefinitionId- the policyDefinitionId value to set.- Returns:
- the PolicyDefinitionReference object itself.
-
definitionVersion
Get the definitionVersion property: The version of the policy definition to use.- Returns:
- the definitionVersion value.
-
withDefinitionVersion
Set the definitionVersion property: The version of the policy definition to use.- Parameters:
definitionVersion- the definitionVersion value to set.- Returns:
- the PolicyDefinitionReference object itself.
-
latestDefinitionVersion
Get the latestDefinitionVersion property: The latest version of the policy definition available. This is only present if requested via the $expand query parameter.- Returns:
- the latestDefinitionVersion value.
-
effectiveDefinitionVersion
Get the effectiveDefinitionVersion property: The effective version of the policy definition in use. This is only present if requested via the $expand query parameter.- Returns:
- the effectiveDefinitionVersion value.
-
parameters
Get the parameters property: The parameter values for the referenced policy rule. The keys are the parameter names.- Returns:
- the parameters value.
-
withParameters
Set the parameters property: The parameter values for the referenced policy rule. The keys are the parameter names.- Parameters:
parameters- the parameters value to set.- Returns:
- the PolicyDefinitionReference object itself.
-
policyDefinitionReferenceId
Get the policyDefinitionReferenceId property: A unique id (within the policy set definition) for this policy definition reference.- Returns:
- the policyDefinitionReferenceId value.
-
withPolicyDefinitionReferenceId
public PolicyDefinitionReference withPolicyDefinitionReferenceId(String policyDefinitionReferenceId) Set the policyDefinitionReferenceId property: A unique id (within the policy set definition) for this policy definition reference.- Parameters:
policyDefinitionReferenceId- the policyDefinitionReferenceId value to set.- Returns:
- the PolicyDefinitionReference object itself.
-
groupNames
Get the groupNames property: The name of the groups that this policy definition reference belongs to.- Returns:
- the groupNames value.
-
withGroupNames
Set the groupNames property: The name of the groups that this policy definition reference belongs to.- Parameters:
groupNames- the groupNames value to set.- Returns:
- the PolicyDefinitionReference 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<PolicyDefinitionReference>- Throws:
IOException
-
fromJson
public static PolicyDefinitionReference fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PolicyDefinitionReference from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PolicyDefinitionReference 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 PolicyDefinitionReference.
-