Send feedback
Class AwsCredentials (1.19.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.19.0keyboard_arrow_down
public class AwsCredentials extends ExternalAccountCredentials
AWS credentials representing a third-party identity for calling Google APIs.
By default, attempts to exchange the external credential for a GCP access token.
Static Methods
newBuilder()
public static AwsCredentials . Builder newBuilder ()
newBuilder(AwsCredentials awsCredentials)
public static AwsCredentials . Builder newBuilder ( AwsCredentials awsCredentials )
Methods
createScoped(Collection<String> newScopes)
public GoogleCredentials createScoped ( Collection<String> newScopes )
Clones the AwsCredentials with the specified scopes.
Overrides
refreshAccessToken()
public AccessToken refreshAccessToken ()
Method to refresh the access token according to the specific type of credentials.
Throws IllegalStateException if not overridden since direct use of OAuth2Credentials is only
for temporary or non-refreshing access tokens.
Overrides
retrieveSubjectToken()
public String retrieveSubjectToken ()
Retrieves the external subject token to be exchanged for a Google Cloud access token.
Must be implemented by subclasses as the retrieval method is dependent on the credential
source.
Returns
Type
Description
String
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025年10月30日 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025年10月30日 UTC."],[],[]]