@datafire/amazonaws_cognito_identity
v5.0.0
Published
DataFire integration for Amazon Cognito Identity
Downloads
30
Readme
@datafire/amazonaws_cognito_identity
Client library for Amazon Cognito Identity
Installation and Usage
npm install --save @datafire/amazonaws_cognito_identity
let amazonaws_cognito_identity = require('@datafire/amazonaws_cognito_identity').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});
amazonaws_cognito_identity.CreateIdentityPool({
"IdentityPoolName": "",
"AllowUnauthenticatedIdentities": true
}).then(data => {
console.log(data);
});
Description
Amazon Cognito Amazon Cognito is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. Amazon Cognito uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application. Using Amazon Cognito, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon), and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials. To provide end-user credentials, first make an unsigned call to GetId. If the end user is authenticated with one of the supported identity providers, set the Logins map with the identity provider token. GetId returns a unique identifier for the user. Next, make an unsigned call to GetCredentialsForIdentity. This call expects the same Logins map as the GetId call, as well as the IdentityID originally returned by GetId. Assuming your identity pool has been configured via the SetIdentityPoolRoles operation, GetCredentialsForIdentity will return AWS credentials for your use. If your pool has not been configured with SetIdentityPoolRoles, or if you want to follow legacy flow, make an unsigned call to GetOpenIdToken, which returns the OpenID token necessary to call STS and retrieve AWS credentials. This call expects the same Logins map as the GetId call, as well as the IdentityID originally returned by GetId. The token returned by GetOpenIdToken can be passed to the STS operation AssumeRoleWithWebIdentity to retrieve AWS credentials. If you want to use Amazon Cognito in an Android, iOS, or Unity application, you will probably want to make API calls via the AWS Mobile SDK. To learn more, see the AWS Mobile SDK Developer Guide.
Actions
CreateIdentityPool
amazonaws_cognito_identity.CreateIdentityPool({
"IdentityPoolName": "",
"AllowUnauthenticatedIdentities": true
}, context)
Input
- input
object
- AllowUnauthenticatedIdentities required IdentityPoolUnauthenticated
- CognitoIdentityProviders CognitoIdentityProviderList
- DeveloperProviderName DeveloperProviderName
- IdentityPoolName required IdentityPoolName
- OpenIdConnectProviderARNs OIDCProviderList
- SamlProviderARNs SAMLProviderList
- SupportedLoginProviders IdentityProviders
Output
- output IdentityPool
DeleteIdentities
amazonaws_cognito_identity.DeleteIdentities({
"IdentityIdsToDelete": []
}, context)
Input
- input
object
- IdentityIdsToDelete required IdentityIdList
Output
- output DeleteIdentitiesResponse
DeleteIdentityPool
amazonaws_cognito_identity.DeleteIdentityPool({
"IdentityPoolId": ""
}, context)
Input
- input
object
- IdentityPoolId required IdentityPoolId
Output
Output schema unknown
DescribeIdentity
amazonaws_cognito_identity.DescribeIdentity({
"IdentityId": ""
}, context)
Input
- input
object
- IdentityId required IdentityId
Output
- output IdentityDescription
DescribeIdentityPool
amazonaws_cognito_identity.DescribeIdentityPool({
"IdentityPoolId": ""
}, context)
Input
- input
object
- IdentityPoolId required IdentityPoolId
Output
- output IdentityPool
GetCredentialsForIdentity
amazonaws_cognito_identity.GetCredentialsForIdentity({
"IdentityId": ""
}, context)
Input
- input
object
- CustomRoleArn ARNString
- IdentityId required IdentityId
- Logins LoginsMap
Output
GetId
amazonaws_cognito_identity.GetId({
"IdentityPoolId": ""
}, context)
Input
- input
object
- AccountId AccountId
- IdentityPoolId required IdentityPoolId
- Logins LoginsMap
Output
- output GetIdResponse
GetIdentityPoolRoles
amazonaws_cognito_identity.GetIdentityPoolRoles({
"IdentityPoolId": ""
}, context)
Input
- input
object
- IdentityPoolId required IdentityPoolId
Output
- output GetIdentityPoolRolesResponse
GetOpenIdToken
amazonaws_cognito_identity.GetOpenIdToken({
"IdentityId": ""
}, context)
Input
- input
object
- IdentityId required IdentityId
- Logins LoginsMap
Output
- output GetOpenIdTokenResponse
GetOpenIdTokenForDeveloperIdentity
amazonaws_cognito_identity.GetOpenIdTokenForDeveloperIdentity({
"IdentityPoolId": "",
"Logins": []
}, context)
Input
- input
object
- IdentityId IdentityId
- IdentityPoolId required IdentityPoolId
- Logins required LoginsMap
- TokenDuration TokenDuration
Output
ListIdentities
amazonaws_cognito_identity.ListIdentities({
"IdentityPoolId": "",
"MaxResults": 0
}, context)
Input
- input
object
- HideDisabled HideDisabled
- IdentityPoolId required IdentityPoolId
- MaxResults required QueryLimit
- NextToken PaginationKey
Output
- output ListIdentitiesResponse
ListIdentityPools
amazonaws_cognito_identity.ListIdentityPools({
"MaxResults": 0
}, context)
Input
- input
object
- MaxResults required QueryLimit
- NextToken PaginationKey
Output
- output ListIdentityPoolsResponse
LookupDeveloperIdentity
amazonaws_cognito_identity.LookupDeveloperIdentity({
"IdentityPoolId": ""
}, context)
Input
- input
object
- DeveloperUserIdentifier DeveloperUserIdentifier
- IdentityId IdentityId
- IdentityPoolId required IdentityPoolId
- MaxResults QueryLimit
- NextToken PaginationKey
Output
MergeDeveloperIdentities
amazonaws_cognito_identity.MergeDeveloperIdentities({
"SourceUserIdentifier": "",
"DestinationUserIdentifier": "",
"DeveloperProviderName": "",
"IdentityPoolId": ""
}, context)
Input
- input
object
- DestinationUserIdentifier required DeveloperUserIdentifier
- DeveloperProviderName required DeveloperProviderName
- IdentityPoolId required IdentityPoolId
- SourceUserIdentifier required DeveloperUserIdentifier
Output
SetIdentityPoolRoles
amazonaws_cognito_identity.SetIdentityPoolRoles({
"IdentityPoolId": "",
"Roles": []
}, context)
Input
- input
object
- IdentityPoolId required IdentityPoolId
- RoleMappings RoleMappingMap
- Roles required RolesMap
Output
Output schema unknown
UnlinkDeveloperIdentity
amazonaws_cognito_identity.UnlinkDeveloperIdentity({
"IdentityId": "",
"IdentityPoolId": "",
"DeveloperProviderName": "",
"DeveloperUserIdentifier": ""
}, context)
Input
- input
object
- DeveloperProviderName required DeveloperProviderName
- DeveloperUserIdentifier required DeveloperUserIdentifier
- IdentityId required IdentityId
- IdentityPoolId required IdentityPoolId
Output
Output schema unknown
UnlinkIdentity
amazonaws_cognito_identity.UnlinkIdentity({
"IdentityId": "",
"Logins": [],
"LoginsToRemove": []
}, context)
Input
- input
object
- IdentityId required IdentityId
- Logins required LoginsMap
- LoginsToRemove required LoginsList
Output
Output schema unknown
UpdateIdentityPool
amazonaws_cognito_identity.UpdateIdentityPool({
"IdentityPoolId": "",
"IdentityPoolName": "",
"AllowUnauthenticatedIdentities": true
}, context)
Input
- input
object
- AllowUnauthenticatedIdentities required IdentityPoolUnauthenticated
- CognitoIdentityProviders CognitoIdentityProviderList
- DeveloperProviderName DeveloperProviderName
- IdentityPoolId required IdentityPoolId
- IdentityPoolName required IdentityPoolName
- OpenIdConnectProviderARNs OIDCProviderList
- SamlProviderARNs SAMLProviderList
- SupportedLoginProviders IdentityProviders
Output
- output IdentityPool
Definitions
ARNString
- ARNString
string
AccessKeyString
- AccessKeyString
string
AccountId
- AccountId
string
AmbiguousRoleResolutionType
- AmbiguousRoleResolutionType
string
(values: AuthenticatedRole, Deny)
ClaimName
- ClaimName
string
ClaimValue
- ClaimValue
string
CognitoIdentityProvider
- CognitoIdentityProvider
object
: A provider representing an Amazon Cognito Identity User Pool and its client ID.- ClientId CognitoIdentityProviderClientId
- ProviderName CognitoIdentityProviderName
- ServerSideTokenCheck CognitoIdentityProviderTokenCheck
CognitoIdentityProviderClientId
- CognitoIdentityProviderClientId
string
CognitoIdentityProviderList
- CognitoIdentityProviderList
array
- items CognitoIdentityProvider
CognitoIdentityProviderName
- CognitoIdentityProviderName
string
CognitoIdentityProviderTokenCheck
- CognitoIdentityProviderTokenCheck
boolean
ConcurrentModificationException
- ConcurrentModificationException
object
: Thrown if there are parallel requests to modify a resource.- message String
CreateIdentityPoolInput
- CreateIdentityPoolInput
object
: Input to the CreateIdentityPool action.- AllowUnauthenticatedIdentities required IdentityPoolUnauthenticated
- CognitoIdentityProviders CognitoIdentityProviderList
- DeveloperProviderName DeveloperProviderName
- IdentityPoolName required IdentityPoolName
- OpenIdConnectProviderARNs OIDCProviderList
- SamlProviderARNs SAMLProviderList
- SupportedLoginProviders IdentityProviders
Credentials
- Credentials
object
: Credentials for the provided identity ID.- AccessKeyId AccessKeyString
- Expiration DateType
- SecretKey SecretKeyString
- SessionToken SessionTokenString
DateType
- DateType
string
DeleteIdentitiesInput
- DeleteIdentitiesInput
object
: Input to the DeleteIdentities action.- IdentityIdsToDelete required IdentityIdList
DeleteIdentitiesResponse
- DeleteIdentitiesResponse
object
: Returned in response to a successful DeleteIdentities operation.- UnprocessedIdentityIds UnprocessedIdentityIdList
DeleteIdentityPoolInput
- DeleteIdentityPoolInput
object
: Input to the DeleteIdentityPool action.- IdentityPoolId required IdentityPoolId
DescribeIdentityInput
- DescribeIdentityInput
object
: Input to the DescribeIdentity action.- IdentityId required IdentityId
DescribeIdentityPoolInput
- DescribeIdentityPoolInput
object
: Input to the DescribeIdentityPool action.- IdentityPoolId required IdentityPoolId
DeveloperProviderName
- DeveloperProviderName
string
DeveloperUserAlreadyRegisteredException
- DeveloperUserAlreadyRegisteredException
object
: The provided developer user identifier is already registered with Cognito under a different identity ID.- message String
DeveloperUserIdentifier
- DeveloperUserIdentifier
string
DeveloperUserIdentifierList
- DeveloperUserIdentifierList
array
- items DeveloperUserIdentifier
ErrorCode
- ErrorCode
string
(values: AccessDenied, InternalServerError)
ExternalServiceException
- ExternalServiceException
object
: An exception thrown when a dependent service such as Facebook or Twitter is not responding- message String
GetCredentialsForIdentityInput
- GetCredentialsForIdentityInput
object
: Input to the GetCredentialsForIdentity action.- CustomRoleArn ARNString
- IdentityId required IdentityId
- Logins LoginsMap
GetCredentialsForIdentityResponse
- GetCredentialsForIdentityResponse
object
: Returned in response to a successful GetCredentialsForIdentity operation.- Credentials Credentials
- IdentityId IdentityId
GetIdInput
- GetIdInput
object
: Input to the GetId action.- AccountId AccountId
- IdentityPoolId required IdentityPoolId
- Logins LoginsMap
GetIdResponse
- GetIdResponse
object
: Returned in response to a GetId request.- IdentityId IdentityId
GetIdentityPoolRolesInput
- GetIdentityPoolRolesInput
object
: Input to the GetIdentityPoolRoles action.- IdentityPoolId required IdentityPoolId
GetIdentityPoolRolesResponse
- GetIdentityPoolRolesResponse
object
: Returned in response to a successful GetIdentityPoolRoles operation.- IdentityPoolId IdentityPoolId
- RoleMappings RoleMappingMap
- Roles RolesMap
GetOpenIdTokenForDeveloperIdentityInput
- GetOpenIdTokenForDeveloperIdentityInput
object
: Input to the GetOpenIdTokenForDeveloperIdentity action.- IdentityId IdentityId
- IdentityPoolId required IdentityPoolId
- Logins required LoginsMap
- TokenDuration TokenDuration
GetOpenIdTokenForDeveloperIdentityResponse
- GetOpenIdTokenForDeveloperIdentityResponse
object
: Returned in response to a successful GetOpenIdTokenForDeveloperIdentity request.- IdentityId IdentityId
- Token OIDCToken
GetOpenIdTokenInput
- GetOpenIdTokenInput
object
: Input to the GetOpenIdToken action.- IdentityId required IdentityId
- Logins LoginsMap
GetOpenIdTokenResponse
- GetOpenIdTokenResponse
object
: Returned in response to a successful GetOpenIdToken request.- IdentityId IdentityId
- Token OIDCToken
HideDisabled
- HideDisabled
boolean
IdentitiesList
- IdentitiesList
array
- items IdentityDescription
IdentityDescription
- IdentityDescription
object
: A description of the identity.- CreationDate DateType
- IdentityId IdentityId
- LastModifiedDate DateType
- Logins LoginsList
IdentityId
- IdentityId
string
IdentityIdList
- IdentityIdList
array
- items IdentityId
IdentityPool
- IdentityPool
object
: An object representing an Amazon Cognito identity pool.- AllowUnauthenticatedIdentities required IdentityPoolUnauthenticated
- CognitoIdentityProviders CognitoIdentityProviderList
- DeveloperProviderName DeveloperProviderName
- IdentityPoolId required IdentityPoolId
- IdentityPoolName required IdentityPoolName
- OpenIdConnectProviderARNs OIDCProviderList
- SamlProviderARNs SAMLProviderList
- SupportedLoginProviders IdentityProviders
IdentityPoolId
- IdentityPoolId
string
IdentityPoolName
- IdentityPoolName
string
IdentityPoolShortDescription
- IdentityPoolShortDescription
object
: A description of the identity pool.- IdentityPoolId IdentityPoolId
- IdentityPoolName IdentityPoolName
IdentityPoolUnauthenticated
- IdentityPoolUnauthenticated
boolean
IdentityPoolsList
- IdentityPoolsList
array
IdentityProviderId
- IdentityProviderId
string
IdentityProviderName
- IdentityProviderName
string
IdentityProviderToken
- IdentityProviderToken
string
IdentityProviders
- IdentityProviders
array
- items
object
- key IdentityProviderName
- value IdentityProviderId
- items
InternalErrorException
- InternalErrorException
object
: Thrown when the service encounters an error during processing the request.- message String
InvalidIdentityPoolConfigurationException
- InvalidIdentityPoolConfigurationException
object
: Thrown if the identity pool has no role associated for the given auth type (auth/unauth) or if the AssumeRole fails.- message String
InvalidParameterException
- InvalidParameterException
object
: Thrown for missing or bad input parameter(s).- message String
LimitExceededException
- LimitExceededException
object
: Thrown when the total number of user pools has exceeded a preset limit.- message String
ListIdentitiesInput
- ListIdentitiesInput
object
: Input to the ListIdentities action.- HideDisabled HideDisabled
- IdentityPoolId required IdentityPoolId
- MaxResults required QueryLimit
- NextToken PaginationKey
ListIdentitiesResponse
- ListIdentitiesResponse
object
: The response to a ListIdentities request.- Identities IdentitiesList
- IdentityPoolId IdentityPoolId
- NextToken PaginationKey
ListIdentityPoolsInput
- ListIdentityPoolsInput
object
: Input to the ListIdentityPools action.- MaxResults required QueryLimit
- NextToken PaginationKey
ListIdentityPoolsResponse
- ListIdentityPoolsResponse
object
: The result of a successful ListIdentityPools action.- IdentityPools IdentityPoolsList
- NextToken PaginationKey
LoginsList
- LoginsList
array
- items IdentityProviderName
LoginsMap
- LoginsMap
array
- items
object
- items
LookupDeveloperIdentityInput
- LookupDeveloperIdentityInput
object
: Input to the LookupDeveloperIdentityInput action.- DeveloperUserIdentifier DeveloperUserIdentifier
- IdentityId IdentityId
- IdentityPoolId required IdentityPoolId
- MaxResults QueryLimit
- NextToken PaginationKey
LookupDeveloperIdentityResponse
- LookupDeveloperIdentityResponse
object
: Returned in response to a successful LookupDeveloperIdentity action.- DeveloperUserIdentifierList DeveloperUserIdentifierList
- IdentityId IdentityId
- NextToken PaginationKey
MappingRule
- MappingRule
object
: A rule that maps a claim name, a claim value, and a match type to a role ARN.- Claim required ClaimName
- MatchType required MappingRuleMatchType
- RoleARN required ARNString
- Value required ClaimValue
MappingRuleMatchType
- MappingRuleMatchType
string
(values: Equals, Contains, StartsWith, NotEqual)
MappingRulesList
- MappingRulesList
array
- items MappingRule
MergeDeveloperIdentitiesInput
- MergeDeveloperIdentitiesInput
object
: Input to the MergeDeveloperIdentities action.- DestinationUserIdentifier required DeveloperUserIdentifier
- DeveloperProviderName required DeveloperProviderName
- IdentityPoolId required IdentityPoolId
- SourceUserIdentifier required DeveloperUserIdentifier
MergeDeveloperIdentitiesResponse
- MergeDeveloperIdentitiesResponse
object
: Returned in response to a successful MergeDeveloperIdentities action.- IdentityId IdentityId
NotAuthorizedException
- NotAuthorizedException
object
: Thrown when a user is not authorized to access the requested resource.- message String
OIDCProviderList
- OIDCProviderList
array
- items ARNString
OIDCToken
- OIDCToken
string
PaginationKey
- PaginationKey
string
QueryLimit
- QueryLimit
integer
ResourceConflictException
- ResourceConflictException
object
: Thrown when a user tries to use a login which is already linked to another account.- message String
ResourceNotFoundException
- ResourceNotFoundException
object
: Thrown when the requested resource (for example, a dataset or record) does not exist.- message String
RoleMapping
- RoleMapping
object
: A role mapping.- AmbiguousRoleResolution AmbiguousRoleResolutionType
- RulesConfiguration RulesConfigurationType
- Type required RoleMappingType
RoleMappingMap
- RoleMappingMap
array
- items
object
- key IdentityProviderName
- value RoleMapping
- items
RoleMappingType
- RoleMappingType
string
(values: Token, Rules)
RoleType
- RoleType
string
RolesMap
RulesConfigurationType
- RulesConfigurationType
object
: A container for rules.- Rules required MappingRulesList
SAMLProviderList
- SAMLProviderList
array
- items ARNString
SecretKeyString
- SecretKeyString
string
SessionTokenString
- SessionTokenString
string
SetIdentityPoolRolesInput
- SetIdentityPoolRolesInput
object
: Input to the SetIdentityPoolRoles action.- IdentityPoolId required IdentityPoolId
- RoleMappings RoleMappingMap
- Roles required RolesMap
String
- String
string
TokenDuration
- TokenDuration
integer
TooManyRequestsException
- TooManyRequestsException
object
: Thrown when a request is throttled.- message String
UnlinkDeveloperIdentityInput
- UnlinkDeveloperIdentityInput
object
: Input to the UnlinkDeveloperIdentity action.- DeveloperProviderName required DeveloperProviderName
- DeveloperUserIdentifier required DeveloperUserIdentifier
- IdentityId required IdentityId
- IdentityPoolId required IdentityPoolId
UnlinkIdentityInput
- UnlinkIdentityInput
object
: Input to the UnlinkIdentity action.- IdentityId required IdentityId
- Logins required LoginsMap
- LoginsToRemove required LoginsList
UnprocessedIdentityId
- UnprocessedIdentityId
object
: An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.- ErrorCode ErrorCode
- IdentityId IdentityId
UnprocessedIdentityIdList
- UnprocessedIdentityIdList
array
- items UnprocessedIdentityId