Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data GetCredentialsForIdentity = GetCredentialsForIdentity' {
- customRoleArn :: Maybe Text
- logins :: Maybe (HashMap Text Text)
- identityId :: Text
- newGetCredentialsForIdentity :: Text -> GetCredentialsForIdentity
- getCredentialsForIdentity_customRoleArn :: Lens' GetCredentialsForIdentity (Maybe Text)
- getCredentialsForIdentity_logins :: Lens' GetCredentialsForIdentity (Maybe (HashMap Text Text))
- getCredentialsForIdentity_identityId :: Lens' GetCredentialsForIdentity Text
- data GetCredentialsForIdentityResponse = GetCredentialsForIdentityResponse' {}
- newGetCredentialsForIdentityResponse :: Int -> GetCredentialsForIdentityResponse
- getCredentialsForIdentityResponse_credentials :: Lens' GetCredentialsForIdentityResponse (Maybe Credentials)
- getCredentialsForIdentityResponse_identityId :: Lens' GetCredentialsForIdentityResponse (Maybe Text)
- getCredentialsForIdentityResponse_httpStatus :: Lens' GetCredentialsForIdentityResponse Int
Creating a Request
data GetCredentialsForIdentity Source #
Input to the GetCredentialsForIdentity
action.
See: newGetCredentialsForIdentity
smart constructor.
GetCredentialsForIdentity' | |
|
Instances
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.
GetCredentialsForIdentityResponse' | |
|
Instances
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
getCredentialsForIdentityResponse_credentials :: Lens' GetCredentialsForIdentityResponse (Maybe Credentials) Source #
Credentials for the provided identity ID.
getCredentialsForIdentityResponse_identityId :: Lens' GetCredentialsForIdentityResponse (Maybe Text) Source #
A unique identifier in the format REGION:GUID.
getCredentialsForIdentityResponse_httpStatus :: Lens' GetCredentialsForIdentityResponse Int Source #
The response's http status code.