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 Details

    • ApiManagementServiceIdentity

      public ApiManagementServiceIdentity()
      Creates an instance of ApiManagementServiceIdentity class.
  • Method Details

    • type

      public ApimIdentityType 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

      public UUID principalId()
      Get the principalId property: The principal id of the identity.
      Returns:
      the principalId value.
    • tenantId

      public UUID tenantId()
      Get the tenantId property: The client tenant id of the identity.
      Returns:
      the tenantId value.
    • userAssignedIdentities

      public Map<String,UserIdentityProperties> 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.