Package com.azure.identity
Class ManagedIdentityCredentialBuilder
- java.lang.Object
-
- com.azure.identity.CredentialBuilderBase<ManagedIdentityCredentialBuilder>
-
- com.azure.identity.ManagedIdentityCredentialBuilder
-
public class ManagedIdentityCredentialBuilder extends CredentialBuilderBase<ManagedIdentityCredentialBuilder>
Fluent credential builder for instantiating aManagedIdentityCredential
.- See Also:
ManagedIdentityCredential
-
-
Constructor Summary
Constructors Constructor Description ManagedIdentityCredentialBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedIdentityCredential
build()
Creates a newManagedIdentityCredential
with the current configurations.ManagedIdentityCredentialBuilder
clientId(String clientId)
Specifies the client ID of user assigned or system assigned identity.ManagedIdentityCredentialBuilder
resourceId(String resourceId)
Specifies the resource ID of a user assigned or system assigned identity.-
Methods inherited from class com.azure.identity.CredentialBuilderBase
configuration, enableAccountIdentifierLogging, httpClient, httpPipeline, maxRetry, proxyOptions, retryTimeout
-
-
-
-
Method Detail
-
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 newManagedIdentityCredential
with the current configurations.- Returns:
- a
ManagedIdentityCredential
with the current configurations. - Throws:
IllegalStateException
- if clientId and resourceId are both set.
-
-