ManagedIdentity Class

  • java.lang.Object
    • com.azure.resourcemanager.servicefabric.models.ManagedIdentity

Implements

public final class ManagedIdentity
implements JsonSerializable<ManagedIdentity>

Describes the managed identities for an Azure resource.

Constructor Summary

Constructor Description
ManagedIdentity()

Creates an instance of ManagedIdentity class.

Method Summary

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

Reads an instance of ManagedIdentity from the JsonReader.

String principalId()

Get the principalId property: The principal id of the managed identity.

String tenantId()

Get the tenantId property: The tenant id of the managed identity.

JsonWriter toJson(JsonWriter jsonWriter)
ManagedIdentityType type()

Get the type property: The type of managed identity for the resource.

Map<String,UserAssignedIdentity> userAssignedIdentities()

Get the userAssignedIdentities property: The list of user identities associated with the resource.

void validate()

Validates the instance.

ManagedIdentity withType(ManagedIdentityType type)

Set the type property: The type of managed identity for the resource.

ManagedIdentity withUserAssignedIdentities(Map<String,UserAssignedIdentity> userAssignedIdentities)

Set the userAssignedIdentities property: The list of user identities associated with the resource.

Methods inherited from java.lang.Object

Constructor Details

ManagedIdentity

public ManagedIdentity()

Creates an instance of ManagedIdentity class.

Method Details

fromJson

public static ManagedIdentity fromJson(JsonReader jsonReader)

Reads an instance of ManagedIdentity from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ManagedIdentity 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 ManagedIdentity.

principalId

public String principalId()

Get the principalId property: The principal id of the managed identity. This property will only be provided for a system assigned identity.

Returns:

the principalId value.

tenantId

public String tenantId()

Get the tenantId property: The tenant id of the managed identity. This property will only be provided for a system assigned identity.

Returns:

the tenantId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public ManagedIdentityType type()

Get the type property: The type of managed identity for the resource.

Returns:

the type value.

userAssignedIdentities

public Map<String,UserAssignedIdentity> userAssignedIdentities()

Get the userAssignedIdentities property: The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

Returns:

the userAssignedIdentities value.

validate

public void validate()

Validates the instance.

withType

public ManagedIdentity withType(ManagedIdentityType type)

Set the type property: The type of managed identity for the resource.

Parameters:

type - the type value to set.

Returns:

the ManagedIdentity object itself.

withUserAssignedIdentities

public ManagedIdentity withUserAssignedIdentities(Map<String,UserAssignedIdentity> userAssignedIdentities)

Set the userAssignedIdentities property: The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

Parameters:

userAssignedIdentities - the userAssignedIdentities value to set.

Returns:

the ManagedIdentity object itself.

Applies to