Skip to main content

fleets

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

Overview

Namefleets
TypeResource
Idaws.appstream.fleets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) for the fleet. (pattern: <code>^arn:aws(?:-cn|-iso-b|-iso|-us-gov)?:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.\-]{0,1023}$</code>)
compute_capacity_statusobjectThe capacity status for the fleet.
created_timestring (date-time)The time the fleet was created.
descriptionstringThe description to display.
disable_imdsv1booleanIndicates whether Instance Metadata Service Version 1 (IMDSv1) is disabled for the fleet.
disconnect_timeout_in_secondsintegerThe amount of time that a streaming session remains active after users disconnect. If they try to reconnect to the streaming session after a disconnection or network interruption within this time interval, they are connected to their previous session. Otherwise, they are connected to a new session with a new streaming instance. Specify a value between 60 and 36000.
display_namestringThe fleet name to display.
domain_join_infoobjectThe name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active Directory domain.
enable_default_internet_accessbooleanIndicates whether default internet access is enabled for the fleet.
fleet_errorsarrayThe fleet errors.
fleet_typestringThe fleet type. ALWAYS_ON Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, even if no users are streaming apps. ON_DEMAND Provide users with access to applications after they connect, which takes one to two minutes. You are charged for instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. (ALWAYS_ON, ON_DEMAND, ELASTIC)
iam_role_arnstringThe ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS Security Token Service (STS) AssumeRole API operation and passes the ARN of the role to use. The operation creates a new session with temporary credentials. WorkSpaces Applications retrieves the temporary credentials and creates the appstream_machine_role credential profile on the instance. For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on WorkSpaces Applications Streaming Instances in the Amazon WorkSpaces Applications Administration Guide. (pattern: <code>^arn:aws(?:-cn|-iso-b|-iso|-us-gov)?:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.\-]{0,1023}$</code>)
idle_disconnect_timeout_in_secondsintegerThe amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the DisconnectTimeoutInSeconds time interval begins. Users are notified before they are disconnected due to inactivity. If users try to reconnect to the streaming session before the time interval specified in DisconnectTimeoutInSeconds elapses, they are connected to their previous session. Users are considered idle when they stop providing keyboard or mouse input during their streaming session. File uploads and downloads, audio in, audio out, and pixels changing do not qualify as user activity. If users continue to be idle after the time interval in IdleDisconnectTimeoutInSeconds elapses, they are disconnected. To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a value between 60 and 36000. The default value is 0. If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole number of minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the nearest minute. For example, if you specify a value of 70, users are disconnected after 1 minute of inactivity. If you specify a value that is at the midpoint between two different minutes, the value is rounded up. For example, if you specify a value of 90, users are disconnected after 2 minutes of inactivity.
image_arnstringThe ARN for the public, private, or shared image. (pattern: <code>^arn:aws(?:-cn|-iso-b|-iso|-us-gov)?:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.\-]{0,1023}$</code>)
image_namestringThe name of the image used to create the fleet.
instance_typestringThe instance type to use when launching fleet instances. The following instance types are available: stream.standard.small stream.standard.medium stream.standard.large stream.compute.large stream.compute.xlarge stream.compute.2xlarge stream.compute.4xlarge stream.compute.8xlarge stream.memory.large stream.memory.xlarge stream.memory.2xlarge stream.memory.4xlarge stream.memory.8xlarge stream.memory.z1d.large stream.memory.z1d.xlarge stream.memory.z1d.2xlarge stream.memory.z1d.3xlarge stream.memory.z1d.6xlarge stream.memory.z1d.12xlarge stream.graphics.g4dn.xlarge stream.graphics.g4dn.2xlarge stream.graphics.g4dn.4xlarge stream.graphics.g4dn.8xlarge stream.graphics.g4dn.12xlarge stream.graphics.g4dn.16xlarge stream.graphics.g5.xlarge stream.graphics.g5.2xlarge stream.graphics.g5.4xlarge stream.graphics.g5.8xlarge stream.graphics.g5.16xlarge stream.graphics.g5.12xlarge stream.graphics.g5.24xlarge stream.graphics.g6.xlarge stream.graphics.g6.2xlarge stream.graphics.g6.4xlarge stream.graphics.g6.8xlarge stream.graphics.g6.16xlarge stream.graphics.g6.12xlarge stream.graphics.g6.24xlarge stream.graphics.gr6.4xlarge stream.graphics.gr6.8xlarge stream.graphics.g6f.large stream.graphics.g6f.xlarge stream.graphics.g6f.2xlarge stream.graphics.g6f.4xlarge stream.graphics.gr6f.4xlarge
max_concurrent_sessionsintegerThe maximum number of concurrent sessions for the fleet.
max_sessions_per_instanceintegerThe maximum number of user sessions on an instance. This only applies to multi-session fleets.
max_user_duration_in_secondsintegerThe maximum amount of time that a streaming session can remain active, in seconds. If users are still connected to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents before being disconnected. After this time elapses, the instance is terminated and replaced by a new instance. Specify a value between 600 and 360000.
namestringThe name of the fleet.
platformstringThe platform of the fleet. (WINDOWS, WINDOWS_SERVER_2016, WINDOWS_SERVER_2019, WINDOWS_SERVER_2022, WINDOWS_SERVER_2025, AMAZON_LINUX2, RHEL8, ROCKY_LINUX8, UBUNTU_PRO_2404)
root_volume_configobjectThe current configuration of the root volume for fleet instances, including the storage size in GB.
session_script_s3_locationobjectThe S3 location of the session scripts configuration zip file. This only applies to Elastic fleets.
statestringThe current state for the fleet. (STARTING, RUNNING, STOPPING, STOPPED)
stream_viewstringThe WorkSpaces Applications view that is displayed to your users when they stream from the fleet. When APP is specified, only the windows of applications opened by users display. When DESKTOP is specified, the standard desktop that is provided by the operating system displays. The default value is APP. (APP, DESKTOP)
usb_device_filter_stringsarrayThe USB device filter strings associated with the fleet.
vpc_configobjectThe VPC configuration for the fleet.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_fleetsselectregionRetrieves a list that describes one or more specified fleets, if the fleet names are provided. Otherwise, all fleets in the account are described.
create_streaming_urlinsertregion, StackName, FleetName, UserIdCreates a temporary URL to start an WorkSpaces Applications streaming session for the specified user. A streaming URL enables application streaming to be tested without user setup.
create_fleetinsertregion, InstanceTypeCreates a fleet. A fleet consists of streaming instances that your users access for their applications and desktops.
associate_application_fleetupdateregion, FleetName, ApplicationArnAssociates the specified application with the specified fleet. This is only supported for Elastic fleets.
associate_fleetupdateregion, FleetName, StackNameAssociates the specified fleet with the specified stack.
update_fleetupdateregionUpdates the specified fleet. If the fleet is in the STOPPED state, you can update any attribute except the fleet name. If the fleet is in the RUNNING state, you can update the following based on the fleet type: Always-On and On-Demand fleet types You can update the DisplayName, ComputeCapacity, ImageARN, ImageName, IdleDisconnectTimeoutInSeconds, and DisconnectTimeoutInSeconds attributes. Elastic fleet type You can update the DisplayName, IdleDisconnectTimeoutInSeconds, DisconnectTimeoutInSeconds, MaxConcurrentSessions, SessionScriptS3Location and UsbDeviceFilterStrings attributes. If the fleet is in the STARTING or STOPPED state, you can't update it.
delete_fleetdeleteregionDeletes the specified fleet.
disassociate_application_fleetexecregion, FleetName, ApplicationArnDisassociates the specified application from the fleet.
disassociate_fleetexecregion, FleetName, StackNameDisassociates the specified fleet from the specified stack.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves a list that describes one or more specified fleets, if the fleet names are provided. Otherwise, all fleets in the account are described.

SELECT
arn,
compute_capacity_status,
created_time,
description,
disable_imdsv1,
disconnect_timeout_in_seconds,
display_name,
domain_join_info,
enable_default_internet_access,
fleet_errors,
fleet_type,
iam_role_arn,
idle_disconnect_timeout_in_seconds,
image_arn,
image_name,
instance_type,
max_concurrent_sessions,
max_sessions_per_instance,
max_user_duration_in_seconds,
name,
platform,
root_volume_config,
session_script_s3_location,
state,
stream_view,
usb_device_filter_strings,
vpc_config
FROM aws.appstream.fleets
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a temporary URL to start an WorkSpaces Applications streaming session for the specified user. A streaming URL enables application streaming to be tested without user setup.

INSERT INTO aws.appstream.fleets (
StackName,
FleetName,
UserId,
ApplicationId,
Validity,
SessionContext,
region
)
SELECT
'{{ StackName }}' /* required */,
'{{ FleetName }}' /* required */,
'{{ UserId }}' /* required */,
'{{ ApplicationId }}',
{{ Validity }},
'{{ SessionContext }}',
'{{ region }}'
RETURNING
expires,
streaming_url
;

UPDATE examples

Associates the specified application with the specified fleet. This is only supported for Elastic fleets.

UPDATE aws.appstream.fleets
SET
FleetName = '{{ FleetName }}',
ApplicationArn = '{{ ApplicationArn }}'
WHERE
region = '{{ region }}' --required
AND FleetName = '{{ FleetName }}' --required
AND ApplicationArn = '{{ ApplicationArn }}' --required
RETURNING
application_fleet_association;

DELETE examples

Deletes the specified fleet.

DELETE FROM aws.appstream.fleets
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Disassociates the specified application from the fleet.

EXEC aws.appstream.fleets.disassociate_application_fleet
@region='{{ region }}' --required
@@json=
'{
"FleetName": "{{ FleetName }}",
"ApplicationArn": "{{ ApplicationArn }}"
}'
;