Doc AWS SDK 예제 GitHub 리포지토리에서 더 많은 SDK 예제를 사용할 수 있습니다. AWS
기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
CLI로 DescribeIdentityIdFormat 사용
다음 코드 예시는 DescribeIdentityIdFormat의 사용 방법을 보여 줍니다.
- CLI
- 
            - AWS CLI
- 
             
                    IAM 역할의 ID 형식 설명 다음 describe-identity-id-format예제에서는EC2RoleAWS 계정의 IAM 역할이 생성한 인스턴스에서 수신한 ID 형식을 설명합니다.aws ec2 describe-identity-id-format \ --principal-arnarn:aws:iam::123456789012:role/my-iam-role\ --resourceinstance다음 출력에서는 이 역할에 의해 생성된 인스턴스가 긴 ID 형식의 ID를 수신한다는 것을 나타냅니다. { "Statuses": [ { "Deadline": "2016-12-15T00:00:00Z", "Resource": "instance", "UseLongIds": true } ] }IAM 사용자의 ID 형식 설명 다음 describe-identity-id-format예제에서는AdminUserAWS 계정의 IAM 사용자가 생성한 스냅샷에서 수신한 ID 형식을 설명합니다.aws ec2 describe-identity-id-format \ --principal-arnarn:aws:iam::123456789012:user/AdminUser\ --resourcesnapshot출력은 이 사용자가 만든 스냅샷이 긴 ID 형식의 ID를 받는다는 것을 나타냅니다. { "Statuses": [ { "Deadline": "2016-12-15T00:00:00Z", "Resource": "snapshot", "UseLongIds": true } ] }- 
                    API 세부 정보는 AWS CLI 명령 참조의 DescribeIdentityIdFormat 섹션을 참조하세요. 
 
- 
                    
 
- PowerShell
- 
            - Tools for PowerShell V4
- 
             
                    예제 1:이 예제에서는 지정된 역할에 대한 리소스 '이미지'의 ID 형식을 반환합니다. Get-EC2IdentityIdFormat -PrincipalArn arn:aws:iam::123456789511:role/JDBC -Resource image출력: Deadline Resource UseLongIds -------- -------- ---------- 8/2/2018 11:30:00 PM image True- 
                    API 세부 정보는 Cmdlet 참조(V4)의 DescribeIdentityIdFormat을 참조하세요. AWS Tools for PowerShell 
 
- 
                    
- Tools for PowerShell V5
- 
             
                    예제 1:이 예제에서는 지정된 역할에 대한 리소스 '이미지'의 ID 형식을 반환합니다. Get-EC2IdentityIdFormat -PrincipalArn arn:aws:iam::123456789511:role/JDBC -Resource image출력: Deadline Resource UseLongIds -------- -------- ---------- 8/2/2018 11:30:00 PM image True- 
                    API 세부 정보는 Cmdlet 참조(V5)의 DescribeIdentityIdFormat을 참조하세요. AWS Tools for PowerShell 
 
-