Class ResourceIdentity
java.lang.Object
com.azure.resourcemanager.sql.models.ResourceIdentity
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ResourceIdentity>
public final class ResourceIdentity
extends Object
implements com.azure.json.JsonSerializable<ResourceIdentity>
Azure Active Directory identity configuration for a resource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceIdentityfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ResourceIdentity from the JsonReader.Get the principalId property: The Azure Active Directory principal id.tenantId()Get the tenantId property: The Azure Active Directory tenant id.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The identity type.Get the userAssignedIdentities property: The resource ids of the user assigned identities to use.voidvalidate()Validates the instance.withType(IdentityType type) Set the type property: The identity type.withUserAssignedIdentities(Map<String, UserIdentity> userAssignedIdentities) Set the userAssignedIdentities property: The resource ids of the user assigned identities to use.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
-
ResourceIdentity
public ResourceIdentity()Creates an instance of ResourceIdentity class.
-
-
Method Details
-
userAssignedIdentities
Get the userAssignedIdentities property: The resource ids of the user assigned identities to use.- Returns:
- the userAssignedIdentities value.
-
withUserAssignedIdentities
Set the userAssignedIdentities property: The resource ids of the user assigned identities to use.- Parameters:
userAssignedIdentities- the userAssignedIdentities value to set.- Returns:
- the ResourceIdentity object itself.
-
principalId
Get the principalId property: The Azure Active Directory principal id.- Returns:
- the principalId value.
-
type
Get the type property: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.- Returns:
- the type value.
-
withType
Set the type property: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.- Parameters:
type- the type value to set.- Returns:
- the ResourceIdentity object itself.
-
tenantId
Get the tenantId property: The Azure Active Directory tenant id.- 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<ResourceIdentity>- Throws:
IOException
-
fromJson
Reads an instance of ResourceIdentity from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ResourceIdentity 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 ResourceIdentity.
-