CLI로 DescribePlacementGroups 사용 - Amazon Elastic Compute Cloud

CLI로 DescribePlacementGroups 사용

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

CLI
AWS CLI

모든 배치 그룹 설명

이 예시 명령은 모든 배치 그룹을 설명합니다.

명령:

aws ec2 describe-placement-groups

결과:

{ "PlacementGroups": [ { "GroupName": "my-cluster", "State": "available", "Strategy": "cluster" }, ... ] }
PowerShell
Tools for PowerShell V4

예제 1: 이 예제에서는 지정된 배치 그룹을 설명합니다.

Get-EC2PlacementGroup -GroupName my-placement-group

출력:

GroupName State Strategy --------- ----- -------- my-placement-group available cluster
Tools for PowerShell V5

예제 1: 이 예제에서는 지정된 배치 그룹을 설명합니다.

Get-EC2PlacementGroup -GroupName my-placement-group

출력:

GroupName State Strategy --------- ----- -------- my-placement-group available cluster

AWS SDK 개발자 가이드 및 코드 예시의 전체 목록은 AWS SDK를 사용하여 Amazon EC2 리소스 생성 섹션을 참조하세요. 이 주제에는 시작하기에 대한 정보와 이전 SDK 버전에 대한 세부 정보도 포함되어 있습니다.