Weitere AWS-SDK-Beispiele sind im GitHub-Repository Beispiele für AWS Doc SDKs
Verwendung von UpdateIdentityPool mit einer CLI
Die folgenden Code-Beispiele zeigen, wie UpdateIdentityPool verwendet wird.
- CLI
-
- AWS CLI
-
So aktualisieren Sie einen Identitätspool
In diesem Beispiel wird ein Identitätspool aktualisiert. Der Name wird auf MyIdentityPool festgelegt. Cognito wird als Identitätsanbieter hinzugefügt. Nicht authentifizierte Identitäten werden nicht zugelassen.
Befehl:
aws cognito-identity update-identity-pool --identity-pool-id"us-west-2:11111111-1111-1111-1111-111111111111"--identity-pool-name"MyIdentityPool"--no-allow-unauthenticated-identities --cognito-identity-providers ProviderName="cognito-idp.us-west-2.amazonaws.com/us-west-2_111111111",ClientId="3n4b5urk1ft4fl3mg5e62d9ado",ServerSideTokenCheck=falseAusgabe:
{ "IdentityPoolId": "us-west-2:11111111-1111-1111-1111-111111111111", "IdentityPoolName": "MyIdentityPool", "AllowUnauthenticatedIdentities": false, "CognitoIdentityProviders": [ { "ProviderName": "cognito-idp.us-west-2.amazonaws.com/us-west-2_111111111", "ClientId": "3n4b5urk1ft4fl3mg5e62d9ado", "ServerSideTokenCheck": false } ] }-
Weitere API-Informationen finden Sie unter UpdateIdentityPool
in der AWS CLI-Befehlsreferenz.
-
- PowerShell
-
- Tools für PowerShell V4
-
Beispiel 1: Aktualisiert einige Eigenschaften des Identitätspools, in diesem Fall den Namen des Identitätspools.
Update-CGIIdentityPool -IdentityPoolId us-east-1:0de2af35-2988-4d0b-b22d-EXAMPLEGUID1 -IdentityPoolName NewPoolNameAusgabe:
LoggedAt : 8/12/2015 4:53:33 PM AllowUnauthenticatedIdentities : False DeveloperProviderName : IdentityPoolId : us-east-1:0de2af35-2988-4d0b-b22d-EXAMPLEGUID1 IdentityPoolName : NewPoolName OpenIdConnectProviderARNs : {} SupportedLoginProviders : {} ResponseMetadata : Amazon.Runtime.ResponseMetadata ContentLength : 135 HttpStatusCode : OK-
Weitere API-Informationen finden Sie unter UpdateIdentityPool in der AWS -Tools für PowerShell-Cmdlet-Referenz (V4).
-
- Tools für PowerShell V5
-
Beispiel 1: Aktualisiert einige Eigenschaften des Identitätspools, in diesem Fall den Namen des Identitätspools.
Update-CGIIdentityPool -IdentityPoolId us-east-1:0de2af35-2988-4d0b-b22d-EXAMPLEGUID1 -IdentityPoolName NewPoolNameAusgabe:
LoggedAt : 8/12/2015 4:53:33 PM AllowUnauthenticatedIdentities : False DeveloperProviderName : IdentityPoolId : us-east-1:0de2af35-2988-4d0b-b22d-EXAMPLEGUID1 IdentityPoolName : NewPoolName OpenIdConnectProviderARNs : {} SupportedLoginProviders : {} ResponseMetadata : Amazon.Runtime.ResponseMetadata ContentLength : 135 HttpStatusCode : OK-
Weitere API-Informationen finden Sie unter UpdateIdentityPool in der AWS -Tools für PowerShell-Cmdlet-Referenz (V5).
-