public static class AwsCredentials.Builder extends ExternalAccountCredentials.Builder
audience, clientId, clientSecret, credentialSource, environmentProvider, metricsHandler, scopes, serviceAccountImpersonationOptions, serviceAccountImpersonationUrl, subjectTokenType, tokenInfoUrl, tokenUrl, transportFactory, universeDomain, workforcePoolUserProject
quotaProjectId
Modifier and Type | Method and Description |
---|---|
AwsCredentials |
build() |
AwsCredentials.Builder |
setAudience(String audience)
Sets the Security Token Service audience, which is usually the fully specified resource name
of the workload/workforce pool provider.
|
AwsCredentials.Builder |
setAwsSecurityCredentialsSupplier(AwsSecurityCredentialsSupplier awsSecurityCredentialsSupplier)
Sets the AWS security credentials supplier.
|
AwsCredentials.Builder |
setClientId(String clientId)
Sets the optional client ID of the service account from the console.
|
AwsCredentials.Builder |
setClientSecret(String clientSecret)
Sets the optional client secret of the service account from the console.
|
AwsCredentials.Builder |
setCredentialSource(AwsCredentialSource credentialSource) |
AwsCredentials.Builder |
setHttpTransportFactory(HttpTransportFactory transportFactory)
Sets the HTTP transport factory, creates the transport used to get access tokens.
|
AwsCredentials.Builder |
setQuotaProjectId(String quotaProjectId)
Sets the optional project used for quota and billing purposes.
|
AwsCredentials.Builder |
setRegionalCredentialVerificationUrlOverride(String regionalCredentialVerificationUrlOverride)
Sets the AWS regional credential verification URL.
|
AwsCredentials.Builder |
setScopes(Collection<String> scopes)
Sets the optional scopes to request during the authorization grant.
|
AwsCredentials.Builder |
setServiceAccountImpersonationOptions(Map<String,Object> optionsMap)
Sets the optional service account impersonation options.
|
AwsCredentials.Builder |
setServiceAccountImpersonationUrl(String serviceAccountImpersonationUrl)
Sets the optional URL used for service account impersonation, which is required for some
APIs.
|
AwsCredentials.Builder |
setSubjectTokenType(ExternalAccountCredentials.SubjectTokenTypes subjectTokenType)
Sets the Security Token Service subject token type based on the OAuth 2.0 token exchange
spec.
|
AwsCredentials.Builder |
setSubjectTokenType(String subjectTokenType)
Sets the Security Token Service subject token type based on the OAuth 2.0 token exchange
spec.
|
AwsCredentials.Builder |
setTokenInfoUrl(String tokenInfoUrl)
Sets the optional endpoint used to retrieve account related information.
|
AwsCredentials.Builder |
setTokenUrl(String tokenUrl)
Sets the Security Token Service token exchange endpoint.
|
AwsCredentials.Builder |
setUniverseDomain(String universeDomain)
Sets the optional universe domain.
|
AwsCredentials.Builder |
setWorkforcePoolUserProject(String workforcePoolUserProject)
Sets the optional workforce pool user project number when the credential corresponds to a
workforce pool and not a workload identity pool.
|
setCredentialSource
getQuotaProjectId, getUniverseDomain, setAccessToken
getAccessToken, getExpirationMargin, getRefreshMargin, setExpirationMargin, setRefreshMargin
@CanIgnoreReturnValue public AwsCredentials.Builder setAwsSecurityCredentialsSupplier(AwsSecurityCredentialsSupplier awsSecurityCredentialsSupplier)
AwsSecurityCredentials
object and a valid AWS region.awsSecurityCredentialsSupplier
- the supplier to use.Builder
object@CanIgnoreReturnValue public AwsCredentials.Builder setRegionalCredentialVerificationUrlOverride(String regionalCredentialVerificationUrlOverride)
regionalCredentialVerificationUrlOverride
- the AWS credential verification url to set.Builder
object@CanIgnoreReturnValue public AwsCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory)
ExternalAccountCredentials.Builder
setHttpTransportFactory
in class ExternalAccountCredentials.Builder
transportFactory
- the HttpTransportFactory
to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setAudience(String audience)
ExternalAccountCredentials.Builder
setAudience
in class ExternalAccountCredentials.Builder
audience
- the Security Token Service audience to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setSubjectTokenType(String subjectTokenType)
ExternalAccountCredentials.Builder
setSubjectTokenType
in class ExternalAccountCredentials.Builder
subjectTokenType
- the Security Token Service subject token type to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setSubjectTokenType(ExternalAccountCredentials.SubjectTokenTypes subjectTokenType)
ExternalAccountCredentials.Builder
setSubjectTokenType
in class ExternalAccountCredentials.Builder
subjectTokenType
- the SubjectTokenType
to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setTokenUrl(String tokenUrl)
ExternalAccountCredentials.Builder
setTokenUrl
in class ExternalAccountCredentials.Builder
tokenUrl
- the Security Token Service token exchange url to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setCredentialSource(AwsCredentialSource credentialSource)
@CanIgnoreReturnValue public AwsCredentials.Builder setServiceAccountImpersonationUrl(String serviceAccountImpersonationUrl)
ExternalAccountCredentials.Builder
setServiceAccountImpersonationUrl
in class ExternalAccountCredentials.Builder
serviceAccountImpersonationUrl
- the service account impersonation url to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setTokenInfoUrl(String tokenInfoUrl)
ExternalAccountCredentials.Builder
setTokenInfoUrl
in class ExternalAccountCredentials.Builder
tokenInfoUrl
- the token info url to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setQuotaProjectId(String quotaProjectId)
ExternalAccountCredentials.Builder
setQuotaProjectId
in class ExternalAccountCredentials.Builder
quotaProjectId
- the quota and billing project id to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setClientId(String clientId)
ExternalAccountCredentials.Builder
setClientId
in class ExternalAccountCredentials.Builder
clientId
- the service account client id to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setClientSecret(String clientSecret)
ExternalAccountCredentials.Builder
setClientSecret
in class ExternalAccountCredentials.Builder
clientSecret
- the service account client secret to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setScopes(Collection<String> scopes)
ExternalAccountCredentials.Builder
setScopes
in class ExternalAccountCredentials.Builder
scopes
- the request scopes to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setWorkforcePoolUserProject(String workforcePoolUserProject)
ExternalAccountCredentials.Builder
setWorkforcePoolUserProject
in class ExternalAccountCredentials.Builder
workforcePoolUserProject
- the workforce pool user project number to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setServiceAccountImpersonationOptions(Map<String,Object> optionsMap)
ExternalAccountCredentials.Builder
setServiceAccountImpersonationOptions
in class ExternalAccountCredentials.Builder
optionsMap
- the service account impersonation options to setBuilder
object@CanIgnoreReturnValue public AwsCredentials.Builder setUniverseDomain(String universeDomain)
ExternalAccountCredentials.Builder
setUniverseDomain
in class ExternalAccountCredentials.Builder
universeDomain
- the universe domain to setBuilder
objectpublic AwsCredentials build()
build
in class ExternalAccountCredentials.Builder
Copyright © 2024 Google. All rights reserved.