CLI로 SetIdentityPoolRoles 사용 - AWS SDK 코드 예제

AWS SDK 예제 GitHub 리포지토리에 더 많은 AWS문서 SDK 예제가 있습니다.

CLI로 SetIdentityPoolRoles 사용

다음 코드 예시는 SetIdentityPoolRoles의 사용 방법을 보여 줍니다.

CLI
AWS CLI

자격 증명 풀 역할을 설정하는 방법

다음 set-identity-pool-roles 예제에서는 자격 증명 풀의 역할을 설정합니다.

aws cognito-identity set-identity-pool-roles \ --identity-pool-id "us-west-2:11111111-1111-1111-1111-111111111111" \ --roles authenticated="arn:aws:iam::111111111111:role/Cognito_MyIdentityPoolAuth_Role"
PowerShell
Tools for PowerShell V4

예제 1: 인증되지 않은 IAM 역할을 갖도록 특정 ID 풀을 구성합니다.

Set-CGIIdentityPoolRole -IdentityPoolId us-east-1:0de2af35-2988-4d0b-b22d-EXAMPLEGUID1 -Role @{ "unauthenticated" = "arn:aws:iam::123456789012:role/CommonTests1Role" }
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)SetIdentityPoolRoles을 참조하세요.

Tools for PowerShell V5

예제 1: 인증되지 않은 IAM 역할을 갖도록 특정 ID 풀을 구성합니다.

Set-CGIIdentityPoolRole -IdentityPoolId us-east-1:0de2af35-2988-4d0b-b22d-EXAMPLEGUID1 -Role @{ "unauthenticated" = "arn:aws:iam::123456789012:role/CommonTests1Role" }
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)SetIdentityPoolRoles을 참조하세요.