Package com.azure.identity
Class WorkloadIdentityCredentialBuilder
java.lang.Object
com.azure.identity.CredentialBuilderBase<T>
com.azure.identity.AadCredentialBuilderBase<WorkloadIdentityCredentialBuilder>
com.azure.identity.WorkloadIdentityCredentialBuilder
- All Implemented Interfaces:
com.azure.core.client.traits.HttpTrait<WorkloadIdentityCredentialBuilder>
public class WorkloadIdentityCredentialBuilder
extends AadCredentialBuilderBase<WorkloadIdentityCredentialBuilder>
Fluent credential builder for instantiating a
WorkloadIdentityCredential
.- See Also:
-
Constructor Summary
ConstructorDescriptionCreates an instance of a WorkloadIdentityCredentialBuilder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates newWorkloadIdentityCredential
with the configured options set.tokenFilePath
(String tokenFilePath) Configure the path to a file containing a Kubernetes service account token that authenticates the identity.Methods inherited from class com.azure.identity.AadCredentialBuilderBase
additionallyAllowedTenants, additionallyAllowedTenants, authorityHost, clientId, disableInstanceDiscovery, executorService, tenantId
Methods inherited from class com.azure.identity.CredentialBuilderBase
addPolicy, clientOptions, configuration, enableAccountIdentifierLogging, httpClient, httpLogOptions, httpPipeline, maxRetry, pipeline, proxyOptions, retryOptions, retryPolicy, retryTimeout
-
Constructor Details
-
WorkloadIdentityCredentialBuilder
public WorkloadIdentityCredentialBuilder()Creates an instance of a WorkloadIdentityCredentialBuilder.
-
-
Method Details
-
tokenFilePath
Configure the path to a file containing a Kubernetes service account token that authenticates the identity. The file path is required to authenticate.- Parameters:
tokenFilePath
- the path to the file containing the token to use for authentication.- Returns:
- An updated instance of this builder with the tenant id set as specified.
-
build
Creates newWorkloadIdentityCredential
with the configured options set.- Returns:
- a
WorkloadIdentityCredential
with the current configurations.
-