Class UserAssignedIdentity
java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity
- All Implemented Interfaces:
com.azure.json.JsonSerializable<UserAssignedIdentity>
public final class UserAssignedIdentity
extends Object
implements com.azure.json.JsonSerializable<UserAssignedIdentity>
Identities associated with a server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UserAssignedIdentityfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of UserAssignedIdentity from the JsonReader.Get the principalId property: Identifier of the object of the service principal associated to the user assigned managed identity.tenantId()Get the tenantId property: Identifier of the tenant of a server.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Types of identities associated with a server.Get the userAssignedIdentities property: Map of user assigned managed identities.voidvalidate()Validates the instance.withPrincipalId(String principalId) Set the principalId property: Identifier of the object of the service principal associated to the user assigned managed identity.withType(IdentityType type) Set the type property: Types of identities associated with a server.withUserAssignedIdentities(Map<String, UserIdentity> userAssignedIdentities) Set the userAssignedIdentities property: Map of user assigned managed identities.Methods inherited from class 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
-
UserAssignedIdentity
public UserAssignedIdentity()Creates an instance of UserAssignedIdentity class.
-
-
Method Details
-
userAssignedIdentities
Get the userAssignedIdentities property: Map of user assigned managed identities.- Returns:
- the userAssignedIdentities value.
-
withUserAssignedIdentities
public UserAssignedIdentity withUserAssignedIdentities(Map<String, UserIdentity> userAssignedIdentities) Set the userAssignedIdentities property: Map of user assigned managed identities.- Parameters:
userAssignedIdentities- the userAssignedIdentities value to set.- Returns:
- the UserAssignedIdentity object itself.
-
principalId
Get the principalId property: Identifier of the object of the service principal associated to the user assigned managed identity.- Returns:
- the principalId value.
-
withPrincipalId
Set the principalId property: Identifier of the object of the service principal associated to the user assigned managed identity.- Parameters:
principalId- the principalId value to set.- Returns:
- the UserAssignedIdentity object itself.
-
type
Get the type property: Types of identities associated with a server.- Returns:
- the type value.
-
withType
Set the type property: Types of identities associated with a server.- Parameters:
type- the type value to set.- Returns:
- the UserAssignedIdentity object itself.
-
tenantId
Get the tenantId property: Identifier of the tenant of a server.- Returns:
- the tenantId value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<UserAssignedIdentity>- Throws:
IOException
-
fromJson
public static UserAssignedIdentity fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of UserAssignedIdentity from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of UserAssignedIdentity 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 UserAssignedIdentity.
-