AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Cognito Identity GetCredentialsForIdentity API operation. This operation uses anonymous authentication and does not require credential parameters to be supplied.

Syntax

Get-CGICredentialsForIdentity
-IdentityId <String>
-CustomRoleArn <String>
-Login <Hashtable>
-Select <String>
-ClientConfig <AmazonCognitoIdentityConfig>

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 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.

Parameters

Amazon.PowerShell.Cmdlets.CGI.AnonymousAmazonCognitoIdentityClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CustomRoleArn <String>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-IdentityId <String>
A unique identifier in the format REGION:GUID.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-Login <Hashtable>
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. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesLogins
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentity.Model.GetCredentialsForIdentityResponse). Specifying the name of a property of type Amazon.CognitoIdentity.Model.GetCredentialsForIdentityResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs). When supplied the cmdlet will attempt to read the default region to be used from the credential file's default profile.If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?212
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.If the Region parameter is supplied the cmdlet ignores the ProfileLocation parameter.
Required?False
Position?211
Accept pipeline input?True (ByValue, ByPropertyName)
AliasesRegionToCall

Outputs

This cmdlet returns an Amazon.CognitoIdentity.Model.GetCredentialsForIdentityResponse object containing multiple properties.

Supported Version

AWS Tools for PowerShell: 2.x.y.z