fleets
Creates, updates, deletes, gets or lists a fleets resource.
Overview
| Name | fleets |
| Type | Resource |
| Id | aws.iotfleetwise.fleets |
Fields
The following fields are returned by SELECT queries:
- get_fleet
- list_fleets
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the fleet. (pattern: <code>[a-zA-Z0-9:_-]+</code>) |
arn | string | The Amazon Resource Name (ARN) of the fleet. |
creation_time | string (date-time) | The time the fleet was created in seconds since epoch (January 1, 1970 at midnight UTC time). |
description | string | A brief description of the fleet. (pattern: <code>[^\u0000-\u001F\u007F]+</code>) |
last_modification_time | string (date-time) | The time the fleet was last updated, in seconds since epoch (January 1, 1970 at midnight UTC time). |
signal_catalog_arn | string | The ARN of a signal catalog associated with the fleet. |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the fleet. (pattern: <code>[a-zA-Z0-9:_-]+</code>) |
arn | string | The Amazon Resource Name (ARN) of the fleet. |
creation_time | string (date-time) | The time the fleet was created, in seconds since epoch (January 1, 1970 at midnight UTC time). |
description | string | A brief description of the fleet. (pattern: <code>[^\u0000-\u001F\u007F]+</code>) |
last_modification_time | string (date-time) | The time the fleet was last updated in seconds since epoch (January 1, 1970 at midnight UTC time). |
signal_catalog_arn | string | The ARN of the signal catalog associated with the fleet. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_fleet | select | region | Retrieves information about a fleet. | |
list_fleets | select | region | Retrieves information for each created fleet in an Amazon Web Services account. This API operation uses pagination. Specify the nextToken parameter in the request to return more results. | |
create_fleet | insert | region, fleetId, signalCatalogArn | Creates a fleet that represents a group of vehicles. You must create both a signal catalog and vehicles before you can create a fleet. For more information, see Fleets in the Amazon Web Services IoT FleetWise Developer Guide. | |
associate_vehicle_fleet | update | region, vehicleName, fleetId | Adds, or associates, a vehicle with a fleet. | |
update_fleet | update | region, fleetId | Updates the description of an existing fleet. | |
delete_fleet | delete | region | Deletes a fleet. Before you delete a fleet, all vehicles must be dissociated from the fleet. For more information, see Delete a fleet (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide. | |
disassociate_vehicle_fleet | exec | region, vehicleName, fleetId | Removes, or disassociates, a vehicle from a fleet. Disassociating a vehicle from a fleet doesn't delete the vehicle. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_fleet
- list_fleets
Retrieves information about a fleet.
SELECT
id,
arn,
creation_time,
description,
last_modification_time,
signal_catalog_arn
FROM aws.iotfleetwise.fleets
WHERE region = '{{ region }}' -- required
;
Retrieves information for each created fleet in an Amazon Web Services account. This API operation uses pagination. Specify the nextToken parameter in the request to return more results.
SELECT
id,
arn,
creation_time,
description,
last_modification_time,
signal_catalog_arn
FROM aws.iotfleetwise.fleets
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_fleet
- Manifest
Creates a fleet that represents a group of vehicles. You must create both a signal catalog and vehicles before you can create a fleet. For more information, see Fleets in the Amazon Web Services IoT FleetWise Developer Guide.
INSERT INTO aws.iotfleetwise.fleets (
fleetId,
description,
signalCatalogArn,
tags,
region
)
SELECT
'{{ fleetId }}' /* required */,
'{{ description }}',
'{{ signalCatalogArn }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
id,
arn
;
# Description fields are for documentation purposes
- name: fleets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the fleets resource.
- name: fleetId
value: "{{ fleetId }}"
description: |
The unique ID of the fleet to create.
- name: description
value: "{{ description }}"
description: |
A brief description of the fleet to create.
- name: signalCatalogArn
value: "{{ signalCatalogArn }}"
description: |
The Amazon Resource Name (ARN) of a signal catalog.
- name: tags
description: |
Metadata that can be used to manage the fleet.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- associate_vehicle_fleet
- update_fleet
Adds, or associates, a vehicle with a fleet.
UPDATE aws.iotfleetwise.fleets
SET
vehicleName = '{{ vehicleName }}',
fleetId = '{{ fleetId }}'
WHERE
region = '{{ region }}' --required
AND vehicleName = '{{ vehicleName }}' --required
AND fleetId = '{{ fleetId }}' --required;
Updates the description of an existing fleet.
UPDATE aws.iotfleetwise.fleets
SET
fleetId = '{{ fleetId }}',
description = '{{ description }}'
WHERE
region = '{{ region }}' --required
AND fleetId = '{{ fleetId }}' --required
RETURNING
id,
arn;
DELETE examples
- delete_fleet
Deletes a fleet. Before you delete a fleet, all vehicles must be dissociated from the fleet. For more information, see Delete a fleet (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide.
DELETE FROM aws.iotfleetwise.fleets
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- disassociate_vehicle_fleet
Removes, or disassociates, a vehicle from a fleet. Disassociating a vehicle from a fleet doesn't delete the vehicle.
EXEC aws.iotfleetwise.fleets.disassociate_vehicle_fleet
@region='{{ region }}' --required
@@json=
'{
"vehicleName": "{{ vehicleName }}",
"fleetId": "{{ fleetId }}"
}'
;