Class AwsSecurityCredentials (1.27.0)

publicclass AwsSecurityCredentials

Defines AWS security credentials. These are either retrieved from the AWS security_credentials endpoint or AWS environment variables.

Inheritance

java.lang.Object > AwsSecurityCredentials

Constructors

AwsSecurityCredentials(String accessKeyId, String secretAccessKey, String sessionToken)

publicAwsSecurityCredentials(StringaccessKeyId,StringsecretAccessKey,StringsessionToken)

Constructor for AWSSecurityCredentials.

Parameters
Name Description
accessKeyId String

the AWS access Key Id.

secretAccessKey String

the AWS secret access key.

sessionToken String

the AWS session token. Optional.

Methods

getAccessKeyId()

publicStringgetAccessKeyId()

Gets the AWS access key id.

Returns
Type Description
String

the AWS access key id.

getSecretAccessKey()

publicStringgetSecretAccessKey()

Gets the AWS secret access key.

Returns
Type Description
String

the AWS secret access key.

getSessionToken()

publicStringgetSessionToken()

Gets the AWS session token.

Returns
Type Description
String

the AWS session token.

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.