

Doc AWS SDK 예제 GitHub 리포지토리에서 더 많은 SDK 예제를 사용할 수 있습니다. [AWS](https://github.com/awsdocs/aws-doc-sdk-examples) 

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

# CLI로 `SetIdentityPoolRoles` 사용
<a name="cognito-identity_example_cognito-identity_SetIdentityPoolRoles_section"></a>

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

------
#### [ CLI ]

**AWS CLI**  
**ID 풀 역할을 설정하는 방법**  
다음 `set-identity-pool-roles` 예제에서는 ID 풀의 역할을 설정합니다.  

```
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"
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [SetIdentityPoolRoles](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cognito-identity/set-identity-pool-roles.html) 섹션을 참조하세요.

------
#### [ 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](https://docs.aws.amazon.com/powershell/v4/reference)을 참조하세요.

**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](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

------