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 a
ManagedIdentityCredential
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a newManagedIdentityCredential
with the current configurations.Specifies the client ID of user assigned or system assigned identity.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
-
Constructor Details
-
ManagedIdentityCredentialBuilder
public ManagedIdentityCredentialBuilder()
-
-
Method Details
-
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
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
Creates a newManagedIdentityCredential
with the current configurations.- Returns:
- a
ManagedIdentityCredential
with the current configurations. - Throws:
IllegalStateException
- if clientId and resourceId are both set.
-