Amazon Elastic Compute Cloud
API Reference (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

DescribePlacementGroups

Description

Describes one or more of your placement groups. For more information about placement groups and cluster instances, see Using Cluster Instances in the Amazon Elastic Compute Cloud User Guide.

Request Parameters

GroupName.n

One or more placement group names.

Type: String

Default: Describes all your placement groups, or only those otherwise specified.

Required: No

Filter.n.Name

The name of a filter. See the Supported Filters section for a list of supported filter names.

Type: String

Default: None

Required: No

Filter.n.Value.m

A value for the filter. See the Supported Filters section for a list of supported values for each filter.

Type: String

Default: None

Required: No

Supported Filters

You can specify filter so that the response includes information for only certain placement groups. For example, you can use a filter to specify that you're interested in groups in the deleted state. You can specify multiple values for a filter. The response includes information for a placement group only if it matches at least one of the filter values that you specified.

You can specify multiple filters; for example, specify group's that are in the deleted state and have a name that includes the string Project. The response includes information for a group only if it matches all your filters. If there's no match, no special message is returned, the response is simply empty.

You can use wildcards in a filter value. An asterisk (*) matches zero or more characters, and a question mark (?) matches exactly one character. You can escape special characters using a backslash (\) before the character. For example, a value of \*amazon\?\\ searches for the literal string *amazon?\.

The following are the available filters.

group-name

The name of the placement group.

Type: String

state

The state of the placement group.

Type: String

Valid values: pending | available | deleting | deleted

strategy

The strategy of the placement group.

Type: String

Valid value: cluster

Response Elements

The following elements are returned in a DescribePlacementGroupsResponse element.

requestId

The ID of the request.

Type: xsd:string

placementGroupSet

A list of placement groups, each one wrapped in an item element.

Type: PlacementGroupInfoType

Examples

Example Request

This example describes the placement group named XYZ-cluster.

https://ec2.amazonaws.com/?Action=DescribePlacementGroups
&GroupName.1=XYZ-cluster
&AUTHPARAMS

Example Response

<DescribePlacementGroupsResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
   <requestID>d4904fd9-82c2-4ea5-adfe-a9cc3EXAMPLE</requestID>
   <placementGroupSet>
      <item>
         <groupName>XYZ-cluster</groupName>
         <strategy>cluster</strategy>
         <state>available</state>
      </item>
   </placementGroupSet>
</DescribePlacementGroupsResponse>

Example Request

This example filters the response to include only placement groups that include the string Project in the name.

https://ec2.amazonaws.com/?Action=DescribePlacementGroups
&Filter.1.Name=group-name
&Filter.1.Value=*Project*
&AUTHPARAMS
<DescribePlacementGroupsResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
   <requestID>d4904fd9-82c2-4ea5-adfe-a9cc3EXAMPLE</requestID>
   <placementGroupSet>
      <item>
         <groupName>Project-cluster</groupName>
         <strategy>cluster</strategy>
         <state>available</state>
      </item>
   </placementGroupSet>
</DescribePlacementGroupsResponse>