ResourceIdentity Class

  • java.lang.Object
    • com.azure.resourcemanager.sql.models.ResourceIdentity

Implements

public final class ResourceIdentity
implements JsonSerializable<ResourceIdentity>

Azure Active Directory identity configuration for a resource.

Constructor Summary

Constructor Description
ResourceIdentity()

Creates an instance of ResourceIdentity class.

Method Summary

Modifier and Type Method and Description
static ResourceIdentity fromJson(JsonReader jsonReader)

Reads an instance of ResourceIdentity from the JsonReader.

UUID principalId()

Get the principalId property: The Azure Active Directory principal id.

UUID tenantId()

Get the tenantId property: The Azure Active Directory tenant id.

JsonWriter toJson(JsonWriter jsonWriter)
IdentityType type()

Get the type property: The identity type.

Map<String,UserIdentity> userAssignedIdentities()

Get the userAssignedIdentities property: The resource ids of the user assigned identities to use.

void validate()

Validates the instance.

ResourceIdentity withType(IdentityType type)

Set the type property: The identity type.

ResourceIdentity withUserAssignedIdentities(Map<String,UserIdentity> userAssignedIdentities)

Set the userAssignedIdentities property: The resource ids of the user assigned identities to use.

Methods inherited from java.lang.Object

Constructor Details

ResourceIdentity

public ResourceIdentity()

Creates an instance of ResourceIdentity class.

Method Details

fromJson

public static ResourceIdentity fromJson(JsonReader jsonReader)

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.

principalId

public UUID principalId()

Get the principalId property: The Azure Active Directory principal id.

Returns:

the principalId value.

tenantId

public UUID tenantId()

Get the tenantId property: The Azure Active Directory tenant id.

Returns:

the tenantId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public IdentityType 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.

userAssignedIdentities

public Map userAssignedIdentities()

Get the userAssignedIdentities property: The resource ids of the user assigned identities to use.

Returns:

the userAssignedIdentities value.

validate

public void validate()

Validates the instance.

withType

public ResourceIdentity withType(IdentityType type)

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.

withUserAssignedIdentities

public ResourceIdentity withUserAssignedIdentities(Map userAssignedIdentities)

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.

Applies to