Class PolicyAssignmentUpdate
java.lang.Object
com.azure.resourcemanager.resources.models.PolicyAssignmentUpdate
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PolicyAssignmentUpdate>
public final class PolicyAssignmentUpdate
extends Object
implements com.azure.json.JsonSerializable<PolicyAssignmentUpdate>
The policy assignment for Patch request.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PolicyAssignmentUpdate class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PolicyAssignmentUpdatefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PolicyAssignmentUpdate from the JsonReader.identity()Get the identity property: The managed identity associated with the policy assignment.location()Get the location property: The location of the policy assignment.Get the overrides property: The policy property value override.Get the resourceSelectors property: The resource selector list to filter policies by resource properties.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withIdentity(Identity identity) Set the identity property: The managed identity associated with the policy assignment.withLocation(String location) Set the location property: The location of the policy assignment.withOverrides(List<OverrideModel> overrides) Set the overrides property: The policy property value override.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
-
PolicyAssignmentUpdate
public PolicyAssignmentUpdate()Creates an instance of PolicyAssignmentUpdate class.
-
-
Method Details
-
location
Get the location property: The location of the policy assignment. Only required when utilizing managed identity.- Returns:
- the location value.
-
withLocation
Set the location property: The location of the policy assignment. Only required when utilizing managed identity.- Parameters:
location- the location value to set.- Returns:
- the PolicyAssignmentUpdate object itself.
-
identity
Get the identity property: The managed identity associated with the policy assignment.- Returns:
- the identity value.
-
withIdentity
Set the identity property: The managed identity associated with the policy assignment.- Parameters:
identity- the identity value to set.- Returns:
- the PolicyAssignmentUpdate 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 PolicyAssignmentUpdate object itself.
-
overrides
Get the overrides property: The policy property value override.- Returns:
- the overrides value.
-
withOverrides
Set the overrides property: The policy property value override.- Parameters:
overrides- the overrides value to set.- Returns:
- the PolicyAssignmentUpdate 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<PolicyAssignmentUpdate>- Throws:
IOException
-
fromJson
public static PolicyAssignmentUpdate fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PolicyAssignmentUpdate from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PolicyAssignmentUpdate if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the PolicyAssignmentUpdate.
-