libZSservicesZSamazonka-cognito-identityZSamazonka-cognito-identity
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CognitoIdentity.GetCredentialsForIdentity

Description

Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.

This is a public API. You do not need any credentials to call this API.

Synopsis

Creating a Request

data GetCredentialsForIdentity Source #

Input to the GetCredentialsForIdentity action.

See: newGetCredentialsForIdentity smart constructor.

Constructors

GetCredentialsForIdentity' 

Fields

  • customRoleArn :: Maybe Text

    The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.

  • logins :: Maybe (HashMap Text Text)

    A set of optional name-value pairs that map provider names to provider tokens. The name-value pair will follow the syntax "provider_name": "provider_user_identifier".

    Logins should not be specified when trying to get credentials for an unauthenticated identity.

    The Logins parameter is required when using identities associated with external identity providers such as Facebook. For examples of Logins maps, see the code examples in the External Identity Providers section of the Amazon Cognito Developer Guide.

  • identityId :: Text

    A unique identifier in the format REGION:GUID.

Instances

Instances details
Eq GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

Read GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

Show GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

Generic GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

Associated Types

type Rep GetCredentialsForIdentity :: Type -> Type #

NFData GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

Hashable GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

ToJSON GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

AWSRequest GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

ToHeaders GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

ToPath GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

ToQuery GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

type Rep GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

type Rep GetCredentialsForIdentity = D1 ('MetaData "GetCredentialsForIdentity" "Amazonka.CognitoIdentity.GetCredentialsForIdentity" "libZSservicesZSamazonka-cognito-identityZSamazonka-cognito-identity" 'False) (C1 ('MetaCons "GetCredentialsForIdentity'" 'PrefixI 'True) (S1 ('MetaSel ('Just "customRoleArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "logins") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "identityId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse GetCredentialsForIdentity Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

newGetCredentialsForIdentity Source #

Create a value of GetCredentialsForIdentity with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:customRoleArn:GetCredentialsForIdentity', getCredentialsForIdentity_customRoleArn - The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.

$sel:logins:GetCredentialsForIdentity', getCredentialsForIdentity_logins - A set of optional name-value pairs that map provider names to provider tokens. The name-value pair will follow the syntax "provider_name": "provider_user_identifier".

Logins should not be specified when trying to get credentials for an unauthenticated identity.

The Logins parameter is required when using identities associated with external identity providers such as Facebook. For examples of Logins maps, see the code examples in the External Identity Providers section of the Amazon Cognito Developer Guide.

$sel:identityId:GetCredentialsForIdentity', getCredentialsForIdentity_identityId - A unique identifier in the format REGION:GUID.

Request Lenses

getCredentialsForIdentity_customRoleArn :: Lens' GetCredentialsForIdentity (Maybe Text) Source #

The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.

getCredentialsForIdentity_logins :: Lens' GetCredentialsForIdentity (Maybe (HashMap Text Text)) Source #

A set of optional name-value pairs that map provider names to provider tokens. The name-value pair will follow the syntax "provider_name": "provider_user_identifier".

Logins should not be specified when trying to get credentials for an unauthenticated identity.

The Logins parameter is required when using identities associated with external identity providers such as Facebook. For examples of Logins maps, see the code examples in the External Identity Providers section of the Amazon Cognito Developer Guide.

getCredentialsForIdentity_identityId :: Lens' GetCredentialsForIdentity Text Source #

A unique identifier in the format REGION:GUID.

Destructuring the Response

data GetCredentialsForIdentityResponse Source #

Returned in response to a successful GetCredentialsForIdentity operation.

See: newGetCredentialsForIdentityResponse smart constructor.

Constructors

GetCredentialsForIdentityResponse' 

Fields

Instances

Instances details
Eq GetCredentialsForIdentityResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

Read GetCredentialsForIdentityResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

Show GetCredentialsForIdentityResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

Generic GetCredentialsForIdentityResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

Associated Types

type Rep GetCredentialsForIdentityResponse :: Type -> Type #

NFData GetCredentialsForIdentityResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

type Rep GetCredentialsForIdentityResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentity.GetCredentialsForIdentity

type Rep GetCredentialsForIdentityResponse = D1 ('MetaData "GetCredentialsForIdentityResponse" "Amazonka.CognitoIdentity.GetCredentialsForIdentity" "libZSservicesZSamazonka-cognito-identityZSamazonka-cognito-identity" 'False) (C1 ('MetaCons "GetCredentialsForIdentityResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "credentials") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Credentials)) :*: (S1 ('MetaSel ('Just "identityId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetCredentialsForIdentityResponse Source #

Create a value of GetCredentialsForIdentityResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:credentials:GetCredentialsForIdentityResponse', getCredentialsForIdentityResponse_credentials - Credentials for the provided identity ID.

$sel:identityId:GetCredentialsForIdentity', getCredentialsForIdentityResponse_identityId - A unique identifier in the format REGION:GUID.

$sel:httpStatus:GetCredentialsForIdentityResponse', getCredentialsForIdentityResponse_httpStatus - The response's http status code.

Response Lenses