Class ManagedIdentityCredentialBuilder


public class ManagedIdentityCredentialBuilder extends CredentialBuilderBase<ManagedIdentityCredentialBuilder>
Fluent credential builder for instantiating a ManagedIdentityCredential.
See Also:
  • Constructor Details

    • ManagedIdentityCredentialBuilder

      public ManagedIdentityCredentialBuilder()
  • Method Details

    • clientId

      public ManagedIdentityCredentialBuilder clientId(String clientId)
      Specifies the client ID of user assigned or system assigned identity. Only one of clientId and resourceId can be specified.
      Parameters:
      clientId - the client ID
      Returns:
      the ManagedIdentityCredentialBuilder itself
    • resourceId

      public ManagedIdentityCredentialBuilder resourceId(String resourceId)
      Specifies the resource ID of a user assigned or system assigned identity. Only one of clientId and resourceId can be specified.
      Parameters:
      resourceId - the resource ID
      Returns:
      the ManagedIdentityCredentialBuilder itself
    • build

      public ManagedIdentityCredential build()
      Creates a new ManagedIdentityCredential with the current configurations.
      Returns:
      a ManagedIdentityCredential with the current configurations.
      Throws:
      IllegalStateException - if clientId and resourceId are both set.