ListFleets - AWS CodeBuild

ListFleets

Gets a list of compute fleet names with each compute fleet name representing a single compute fleet.

Request Syntax

{ "maxResults": number, "nextToken": "string", "sortBy": "string", "sortOrder": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

maxResults

The maximum number of paginated compute fleets returned per response. Use nextToken to iterate pages in the list of returned compute fleets.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

nextToken

During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

Type: String

Required: No

sortBy

The criterion to be used to list compute fleet names. Valid values include:

  • CREATED_TIME: List based on when each compute fleet was created.

  • LAST_MODIFIED_TIME: List based on when information about each compute fleet was last changed.

  • NAME: List based on each compute fleet's name.

Use sortOrder to specify in what order to list the compute fleet names based on the preceding criteria.

Type: String

Valid Values: NAME | CREATED_TIME | LAST_MODIFIED_TIME

Required: No

sortOrder

The order in which to list compute fleets. Valid values include:

  • ASCENDING: List in ascending order.

  • DESCENDING: List in descending order.

Use sortBy to specify the criterion to be used to list compute fleet names.

Type: String

Valid Values: ASCENDING | DESCENDING

Required: No

Response Syntax

{ "fleets": [ "string" ], "nextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

fleets

The list of compute fleet names.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1.

nextToken

If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidInputException

The input value that was provided is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: