@datafire/amazonaws_sts v5.0.0
@datafire/amazonaws_sts
Client library for AWS Security Token Service
Installation and Usage
npm install --save @datafire/amazonaws_sts
let amazonaws_sts = require('@datafire/amazonaws_sts').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});
amazonaws_sts.AssumeRole({
"RoleArn": "",
"RoleSessionName": ""
}).then(data => {
console.log(data);
});
Description
AWS Security Token Service The AWS Security Token Service (STS) is a web service that enables you to request temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or for users that you authenticate (federated users). This guide provides descriptions of the STS API. For more detailed information about using this service, go to Temporary Security Credentials. As an alternative to using the API, you can use one of the AWS SDKs, which consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to STS. For example, the SDKs take care of cryptographically signing requests, managing errors, and retrying requests automatically. For information about the AWS SDKs, including how to download and install them, see the Tools for Amazon Web Services page. For information about setting up signatures and authorization through the API, go to Signing AWS API Requests in the AWS General Reference. For general information about the Query API, go to Making Query Requests in Using IAM. For information about using security tokens with other AWS products, go to AWS Services That Work with IAM in the IAM User Guide. If you're new to AWS and need additional technical information about a specific AWS product, you can find the product's technical documentation at http://aws.amazon.com/documentation/. Endpoints The AWS Security Token Service (STS) has a default endpoint of https://sts.amazonaws.com that maps to the US East (N. Virginia) region. Additional regions are available and are activated by default. For more information, see Activating and Deactivating AWS STS in an AWS Region in the IAM User Guide. For information about STS endpoints, see Regions and Endpoints in the AWS General Reference. Recording API requests STS supports AWS CloudTrail, which is a service that records AWS calls for your AWS account and delivers log files to an Amazon S3 bucket. By using information collected by CloudTrail, you can determine what requests were successfully made to STS, who made the request, when it was made, and so on. To learn more about CloudTrail, including how to turn it on and find your log files, see the AWS CloudTrail User Guide.
Actions
AssumeRole
amazonaws_sts.AssumeRole({
"RoleArn": "",
"RoleSessionName": ""
}, context)
Input
- input
object
- DurationSeconds roleDurationSecondsType
- ExternalId externalIdType
- Policy sessionPolicyDocumentType
- RoleArn required arnType
- RoleSessionName required roleSessionNameType
- SerialNumber serialNumberType
- TokenCode tokenCodeType
Output
- output AssumeRoleResponse
AssumeRoleWithSAML
amazonaws_sts.AssumeRoleWithSAML({
"RoleArn": "",
"PrincipalArn": "",
"SAMLAssertion": ""
}, context)
Input
- input
object
- DurationSeconds roleDurationSecondsType
- Policy sessionPolicyDocumentType
- PrincipalArn required arnType
- RoleArn required arnType
- SAMLAssertion required SAMLAssertionType
Output
- output AssumeRoleWithSAMLResponse
AssumeRoleWithWebIdentity
amazonaws_sts.AssumeRoleWithWebIdentity({
"RoleArn": "",
"RoleSessionName": "",
"WebIdentityToken": ""
}, context)
Input
- input
object
- DurationSeconds roleDurationSecondsType
- Policy sessionPolicyDocumentType
- ProviderId urlType
- RoleArn required arnType
- RoleSessionName required roleSessionNameType
- WebIdentityToken required clientTokenType
Output
DecodeAuthorizationMessage
amazonaws_sts.DecodeAuthorizationMessage({
"EncodedMessage": ""
}, context)
Input
- input
object
- EncodedMessage required encodedMessageType
Output
GetCallerIdentity
amazonaws_sts.GetCallerIdentity({}, context)
Input
- input
object
Output
- output GetCallerIdentityResponse
GetFederationToken
amazonaws_sts.GetFederationToken({
"Name": ""
}, context)
Input
- input
object
- DurationSeconds durationSecondsType
- Name required userNameType
- Policy sessionPolicyDocumentType
Output
- output GetFederationTokenResponse
GetSessionToken
amazonaws_sts.GetSessionToken({}, context)
Input
- input
object
- DurationSeconds durationSecondsType
- SerialNumber serialNumberType
- TokenCode tokenCodeType
Output
- output GetSessionTokenResponse
Definitions
AssumeRoleRequest
- AssumeRoleRequest
object
- DurationSeconds roleDurationSecondsType
- ExternalId externalIdType
- Policy sessionPolicyDocumentType
- RoleArn required arnType
- RoleSessionName required roleSessionNameType
- SerialNumber serialNumberType
- TokenCode tokenCodeType
AssumeRoleResponse
- AssumeRoleResponse
object
: Contains the response to a successful AssumeRole request, including temporary AWS credentials that can be used to make AWS requests.- AssumedRoleUser AssumedRoleUser
- Credentials Credentials
- PackedPolicySize nonNegativeIntegerType
AssumeRoleWithSAMLRequest
- AssumeRoleWithSAMLRequest
object
- DurationSeconds roleDurationSecondsType
- Policy sessionPolicyDocumentType
- PrincipalArn required arnType
- RoleArn required arnType
- SAMLAssertion required SAMLAssertionType
AssumeRoleWithSAMLResponse
- AssumeRoleWithSAMLResponse
object
: Contains the response to a successful AssumeRoleWithSAML request, including temporary AWS credentials that can be used to make AWS requests.- AssumedRoleUser AssumedRoleUser
- Audience Audience
- Credentials Credentials
- Issuer Issuer
- NameQualifier NameQualifier
- PackedPolicySize nonNegativeIntegerType
- Subject Subject
- SubjectType SubjectType
AssumeRoleWithWebIdentityRequest
- AssumeRoleWithWebIdentityRequest
object
- DurationSeconds roleDurationSecondsType
- Policy sessionPolicyDocumentType
- ProviderId urlType
- RoleArn required arnType
- RoleSessionName required roleSessionNameType
- WebIdentityToken required clientTokenType
AssumeRoleWithWebIdentityResponse
- AssumeRoleWithWebIdentityResponse
object
: Contains the response to a successful AssumeRoleWithWebIdentity request, including temporary AWS credentials that can be used to make AWS requests.- AssumedRoleUser AssumedRoleUser
- Audience Audience
- Credentials Credentials
- PackedPolicySize nonNegativeIntegerType
- Provider Issuer
- SubjectFromWebIdentityToken webIdentitySubjectType
AssumedRoleUser
- AssumedRoleUser
object
: The identifiers for the temporary security credentials that the operation returns.- Arn required arnType
- AssumedRoleId required assumedRoleIdType
Audience
- Audience
string
Credentials
- Credentials
object
: AWS credentials for API authentication.- AccessKeyId required accessKeyIdType
- Expiration required dateType
- SecretAccessKey required accessKeySecretType
- SessionToken required tokenType
DecodeAuthorizationMessageRequest
- DecodeAuthorizationMessageRequest
object
- EncodedMessage required encodedMessageType
DecodeAuthorizationMessageResponse
- DecodeAuthorizationMessageResponse
object
: A document that contains additional information about the authorization status of a request from an encoded message that is returned in response to an AWS request.- DecodedMessage decodedMessageType
ExpiredTokenException
- ExpiredTokenException
object
: The web identity token that was passed is expired or is not valid. Get a new identity token from the identity provider and then retry the request.- message expiredIdentityTokenMessage
FederatedUser
- FederatedUser
object
: Identifiers for the federated user that is associated with the credentials.- Arn required arnType
- FederatedUserId required federatedIdType
GetCallerIdentityRequest
- GetCallerIdentityRequest
object
GetCallerIdentityResponse
- GetCallerIdentityResponse
object
: Contains the response to a successful GetCallerIdentity request, including information about the entity making the request.- Account accountType
- Arn arnType
- UserId userIdType
GetFederationTokenRequest
- GetFederationTokenRequest
object
- DurationSeconds durationSecondsType
- Name required userNameType
- Policy sessionPolicyDocumentType
GetFederationTokenResponse
- GetFederationTokenResponse
object
: Contains the response to a successful GetFederationToken request, including temporary AWS credentials that can be used to make AWS requests.- Credentials Credentials
- FederatedUser FederatedUser
- PackedPolicySize nonNegativeIntegerType
GetSessionTokenRequest
- GetSessionTokenRequest
object
- DurationSeconds durationSecondsType
- SerialNumber serialNumberType
- TokenCode tokenCodeType
GetSessionTokenResponse
- GetSessionTokenResponse
object
: Contains the response to a successful GetSessionToken request, including temporary AWS credentials that can be used to make AWS requests.- Credentials Credentials
IDPCommunicationErrorException
- IDPCommunicationErrorException
object
: The request could not be fulfilled because the non-AWS identity provider (IDP) that was asked to verify the incoming identity token could not be reached. This is often a transient error caused by network conditions. Retry the request a limited number of times so that you don't exceed the request rate. If the error persists, the non-AWS identity provider might be down or not responding.- message idpCommunicationErrorMessage
IDPRejectedClaimException
- IDPRejectedClaimException
object
: The identity provider (IdP) reported that authentication failed. This might be because the claim is invalid. If this error is returned for the AssumeRoleWithWebIdentity operation, it can also mean that the claim has expired or has been explicitly revoked.- message idpRejectedClaimMessage
InvalidAuthorizationMessageException
- InvalidAuthorizationMessageException
object
: The error returned if the message passed to DecodeAuthorizationMessage was invalid. This can happen if the token contains invalid characters, such as linebreaks.- message invalidAuthorizationMessage
InvalidIdentityTokenException
- InvalidIdentityTokenException
object
: The web identity token that was passed could not be validated by AWS. Get a new identity token from the identity provider and then retry the request.- message invalidIdentityTokenMessage
Issuer
- Issuer
string
MalformedPolicyDocumentException
- MalformedPolicyDocumentException
object
: The request was rejected because the policy document was malformed. The error message describes the specific error.- message malformedPolicyDocumentMessage
NameQualifier
- NameQualifier
string
PackedPolicyTooLargeException
- PackedPolicyTooLargeException
object
: The request was rejected because the policy document was too large. The error message describes how big the policy document is, in packed form, as a percentage of what the API allows.- message packedPolicyTooLargeMessage
RegionDisabledException
- RegionDisabledException
object
: STS is not activated in the requested region for the account that is being asked to generate credentials. The account administrator must use the IAM console to activate STS in that region. For more information, see Activating and Deactivating AWS STS in an AWS Region in the IAM User Guide.- message regionDisabledMessage
SAMLAssertionType
- SAMLAssertionType
string
Subject
- Subject
string
SubjectType
- SubjectType
string
accessKeyIdType
- accessKeyIdType
string
accessKeySecretType
- accessKeySecretType
string
accountType
- accountType
string
arnType
- arnType
string
assumedRoleIdType
- assumedRoleIdType
string
clientTokenType
- clientTokenType
string
dateType
- dateType
string
decodedMessageType
- decodedMessageType
string
durationSecondsType
- durationSecondsType
integer
encodedMessageType
- encodedMessageType
string
expiredIdentityTokenMessage
- expiredIdentityTokenMessage
string
externalIdType
- externalIdType
string
federatedIdType
- federatedIdType
string
idpCommunicationErrorMessage
- idpCommunicationErrorMessage
string
idpRejectedClaimMessage
- idpRejectedClaimMessage
string
invalidAuthorizationMessage
- invalidAuthorizationMessage
string
invalidIdentityTokenMessage
- invalidIdentityTokenMessage
string
malformedPolicyDocumentMessage
- malformedPolicyDocumentMessage
string
nonNegativeIntegerType
- nonNegativeIntegerType
integer
packedPolicyTooLargeMessage
- packedPolicyTooLargeMessage
string
regionDisabledMessage
- regionDisabledMessage
string
roleDurationSecondsType
- roleDurationSecondsType
integer
roleSessionNameType
- roleSessionNameType
string
serialNumberType
- serialNumberType
string
sessionPolicyDocumentType
- sessionPolicyDocumentType
string
tokenCodeType
- tokenCodeType
string
tokenType
- tokenType
string
urlType
- urlType
string
userIdType
- userIdType
string
userNameType
- userNameType
string
webIdentitySubjectType
- webIdentitySubjectType
string