List of usage examples for com.amazonaws.services.securitytoken AWSSecurityTokenService getCallerIdentity
GetCallerIdentityResult getCallerIdentity(GetCallerIdentityRequest getCallerIdentityRequest);
Returns details about the IAM user or role whose credentials are used to call the operation.
From source file:jp.classmethod.aws.gradle.AwsPluginExtension.java
License:Apache License
public String getAccountId() { AWSSecurityTokenService sts = createClient(AWSSecurityTokenServiceClient.class, profileName); return sts.getCallerIdentity(new GetCallerIdentityRequest()).getAccount(); }
From source file:jp.classmethod.aws.gradle.AwsPluginExtension.java
License:Apache License
public String getUserArn() { AWSSecurityTokenService sts = createClient(AWSSecurityTokenServiceClient.class, profileName); return sts.getCallerIdentity(new GetCallerIdentityRequest()).getArn(); }