Skip to main content

fleet_instances

Creates, updates, deletes, gets or lists a fleet_instances resource.

Overview

Namefleet_instances
TypeResource
Idaws.ec2.fleet_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
instance_healthstringThe health status of the instance. If the status of either the instance status check or the system status check is impaired, the health status of the instance is unhealthy. Otherwise, the health status is healthy.
instance_idstringThe ID of the instance.
instance_typestringThe instance type.
spot_instance_request_idstringThe ID of the Spot Instance request.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_fleet_instancesselectFleetId, regionDryRun, MaxResults, NextToken, FilterDescribes the running instances for the specified EC2 Fleet. Currently, DescribeFleetInstances does not support fleets of type instant. Instead, use DescribeFleets, specifying the instant fleet ID in the request. For more information, see Describe your EC2 Fleet in the Amazon EC2 User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
FleetIdstringThe ID of the EC2 Fleet.
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
FilterarrayThe filters. instance-type - The instance type.
MaxResultsintegerThe maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
NextTokenstringThe token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

SELECT examples

Describes the running instances for the specified EC2 Fleet. Currently, DescribeFleetInstances does not support fleets of type instant. Instead, use DescribeFleets, specifying the instant fleet ID in the request. For more information, see Describe your EC2 Fleet in the Amazon EC2 User Guide.

SELECT
instance_health,
instance_id,
instance_type,
spot_instance_request_id
FROM aws.ec2.fleet_instances
WHERE FleetId = '{{ FleetId }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND Filter = '{{ Filter }}'
;