AWS SDK 또는 SetIdentityPoolRoles CLI와 함께 사용 - AWS SDK 코드 예제

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

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

AWS SDK 또는 SetIdentityPoolRoles CLI와 함께 사용

다음 코드 예제는 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
도구: PowerShell

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

Set-CGIIdentityPoolRole -IdentityPoolId us-east-1:0de2af35-2988-4d0b-b22d-EXAMPLEGUID1 -Role @{ "unauthenticated" = "arn:aws:iam::123456789012:role/CommonTests1Role" }
  • API 세부 정보는 Cmdlet 참조를 참조하십시오. SetIdentityPoolRolesAWS Tools for PowerShell