Class ApiManagementServiceIdentity
java.lang.Object
com.azure.resourcemanager.apimanagement.models.ApiManagementServiceIdentity
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ApiManagementServiceIdentity>
public final class ApiManagementServiceIdentity
extends Object
implements com.azure.json.JsonSerializable<ApiManagementServiceIdentity>
Identity properties of the Api Management service resource.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ApiManagementServiceIdentity class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ApiManagementServiceIdentityfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ApiManagementServiceIdentity from the JsonReader.Get the principalId property: The principal id of the identity.tenantId()Get the tenantId property: The client tenant id of the identity.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The type of identity used for the resource.Get the userAssignedIdentities property: The list of user identities associated with the resource.voidvalidate()Validates the instance.withType(ApimIdentityType type) Set the type property: The type of identity used for the resource.withUserAssignedIdentities(Map<String, UserIdentityProperties> userAssignedIdentities) Set the userAssignedIdentities property: The list of user identities associated with the resource.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
-
ApiManagementServiceIdentity
public ApiManagementServiceIdentity()Creates an instance of ApiManagementServiceIdentity class.
-
-
Method Details
-
type
Get the type property: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.- Returns:
- the type value.
-
withType
Set the type property: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.- Parameters:
type- the type value to set.- Returns:
- the ApiManagementServiceIdentity object itself.
-
principalId
Get the principalId property: The principal id of the identity.- Returns:
- the principalId value.
-
tenantId
Get the tenantId property: The client tenant id of the identity.- Returns:
- the tenantId value.
-
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.
-
withUserAssignedIdentities
public ApiManagementServiceIdentity withUserAssignedIdentities(Map<String, UserIdentityProperties> 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 ApiManagementServiceIdentity 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<ApiManagementServiceIdentity>- Throws:
IOException
-
fromJson
public static ApiManagementServiceIdentity fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ApiManagementServiceIdentity from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ApiManagementServiceIdentity 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 ApiManagementServiceIdentity.
-