Class 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 Details

    • WorkloadIdentityCredentialBuilder

      public WorkloadIdentityCredentialBuilder()
      Creates an instance of a WorkloadIdentityCredentialBuilder.
  • Method Details

    • tokenFilePath

      public WorkloadIdentityCredentialBuilder tokenFilePath(String 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 new WorkloadIdentityCredential with the configured options set.
      Returns:
      a WorkloadIdentityCredential with the current configurations.