CfnFleet
- class aws_cdk.aws_appstream.CfnFleet(scope, id, *, instance_type, name, compute_capacity=None, description=None, disconnect_timeout_in_seconds=None, display_name=None, domain_join_info=None, enable_default_internet_access=None, fleet_type=None, iam_role_arn=None, idle_disconnect_timeout_in_seconds=None, image_arn=None, image_name=None, max_concurrent_sessions=None, max_user_duration_in_seconds=None, platform=None, session_script_s3_location=None, stream_view=None, tags=None, usb_device_filter_strings=None, vpc_config=None)
Bases:
CfnResource
A CloudFormation
AWS::AppStream::Fleet
.The
AWS::AppStream::Fleet
resource creates a fleet for Amazon AppStream 2.0. A fleet consists of streaming instances that run a specified image when using Always-On or On-Demand.- CloudformationResource:
AWS::AppStream::Fleet
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-fleet.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_appstream as appstream cfn_fleet = appstream.CfnFleet(self, "MyCfnFleet", instance_type="instanceType", name="name", # the properties below are optional compute_capacity=appstream.CfnFleet.ComputeCapacityProperty( desired_instances=123 ), description="description", disconnect_timeout_in_seconds=123, display_name="displayName", domain_join_info=appstream.CfnFleet.DomainJoinInfoProperty( directory_name="directoryName", organizational_unit_distinguished_name="organizationalUnitDistinguishedName" ), enable_default_internet_access=False, fleet_type="fleetType", iam_role_arn="iamRoleArn", idle_disconnect_timeout_in_seconds=123, image_arn="imageArn", image_name="imageName", max_concurrent_sessions=123, max_user_duration_in_seconds=123, platform="platform", session_script_s3_location=appstream.CfnFleet.S3LocationProperty( s3_bucket="s3Bucket", s3_key="s3Key" ), stream_view="streamView", tags=[CfnTag( key="key", value="value" )], usb_device_filter_strings=["usbDeviceFilterStrings"], vpc_config=appstream.CfnFleet.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"] ) )
Create a new
AWS::AppStream::Fleet
.- Parameters:
scope (
Construct
) –scope in which this resource is defined.
id (
str
) –scoped id of the resource.
instance_type (
str
) – The instance type to use when launching fleet instances. The following instance types are available for non-Elastic fleets:. - 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-design.large - stream.graphics-design.xlarge - stream.graphics-design.2xlarge - stream.graphics-design.4xlarge - stream.graphics-desktop.2xlarge - 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-pro.4xlarge - stream.graphics-pro.8xlarge - stream.graphics-pro.16xlarge The following instance types are available for Elastic fleets: - stream.standard.small - stream.standard.mediumname (
str
) – A unique name for the fleet.compute_capacity (
Union
[IResolvable
,ComputeCapacityProperty
,Dict
[str
,Any
],None
]) – The desired capacity for the fleet. This is not allowed for Elastic fleets.description (
Optional
[str
]) – The description to display.disconnect_timeout_in_seconds (
Union
[int
,float
,None
]) – The amount of time that a streaming session remains active after users disconnect. If users 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 360000.display_name (
Optional
[str
]) – The fleet name to display.domain_join_info (
Union
[IResolvable
,DomainJoinInfoProperty
,Dict
[str
,Any
],None
]) – The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active Directory domain. This is not allowed for Elastic fleets.enable_default_internet_access (
Union
[bool
,IResolvable
,None
]) – Enables or disables default internet access for the fleet.fleet_type (
Optional
[str
]) – The 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. - ELASTIC - The pool of streaming instances is managed by Amazon AppStream 2.0. When a user selects their application or desktop to launch, they will start streaming after the app block has been downloaded and mounted to a streaming instance. Allowed Values :ALWAYS_ON
|ELASTIC
|ON_DEMAND
iam_role_arn (
Optional
[str
]) – The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS Security Token ServiceAssumeRole
API operation and passes the ARN of the role to use. The operation creates a new session with temporary credentials. AppStream 2.0 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 AppStream 2.0 Streaming Instances in the Amazon AppStream 2.0 Administration Guide .idle_disconnect_timeout_in_seconds (
Union
[int
,float
,None
]) – The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and theDisconnectTimeoutInSeconds
time interval begins. Users are notified before they are disconnected due to inactivity. If they try to reconnect to the streaming session before the time interval specified inDisconnectTimeoutInSeconds
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 inIdleDisconnectTimeoutInSeconds
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 3600. 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_arn (
Optional
[str
]) – The ARN of the public, private, or shared image to use.image_name (
Optional
[str
]) – The name of the image used to create the fleet.max_concurrent_sessions (
Union
[int
,float
,None
]) – The maximum number of concurrent sessions that can be run on an Elastic fleet. This setting is required for Elastic fleets, but is not used for other fleet types.max_user_duration_in_seconds (
Union
[int
,float
,None
]) – The 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.platform (
Optional
[str
]) – The platform of the fleet. Platform is a required setting for Elastic fleets, and is not used for other fleet types. Allowed Values :WINDOWS_SERVER_2019
|AMAZON_LINUX2
session_script_s3_location (
Union
[IResolvable
,S3LocationProperty
,Dict
[str
,Any
],None
]) – The S3 location of the session scripts configuration zip file. This only applies to Elastic fleets.stream_view (
Optional
[str
]) – The AppStream 2.0 view that is displayed to your users when they stream from the fleet. WhenAPP
is specified, only the windows of applications opened by users display. WhenDESKTOP
is specified, the standard desktop that is provided by the operating system displays. The default value isAPP
.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – An array of key-value pairs.usb_device_filter_strings (
Optional
[Sequence
[str
]]) – The USB device filter strings that specify which USB devices a user can redirect to the fleet streaming session, when using the Windows native client. This is allowed but not required for Elastic fleets.vpc_config (
Union
[IResolvable
,VpcConfigProperty
,Dict
[str
,Any
],None
]) – The VPC configuration for the fleet. This is required for Elastic fleets, but not required for other fleet types.
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_depends_on(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource
)- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
)value (
Any
)
- See:
- Return type:
None
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Parameters:
policy (
Optional
[RemovalPolicy
])apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.
- Return type:
None
- get_att(attribute_name)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str
) – The name of the attribute.- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
)- See:
- Return type:
Any
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) –tree inspector to collect and process attributes.
- Return type:
None
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::AppStream::Fleet'
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- compute_capacity
The desired capacity for the fleet.
This is not allowed for Elastic fleets.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- description
The description to display.
- disconnect_timeout_in_seconds
The amount of time that a streaming session remains active after users disconnect.
If users 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 360000.
- display_name
The fleet name to display.
- domain_join_info
The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active Directory domain.
This is not allowed for Elastic fleets.
- enable_default_internet_access
Enables or disables default internet access for the fleet.
- fleet_type
The 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.
ELASTIC - The pool of streaming instances is managed by Amazon AppStream 2.0. When a user selects their application or desktop to launch, they will start streaming after the app block has been downloaded and mounted to a streaming instance.
Allowed Values :
ALWAYS_ON
|ELASTIC
|ON_DEMAND
- iam_role_arn
The ARN of the IAM role that is applied to the fleet.
To assume a role, the fleet instance calls the AWS Security Token Service
AssumeRole
API operation and passes the ARN of the role to use. The operation creates a new session with temporary credentials. AppStream 2.0 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 AppStream 2.0 Streaming Instances in the Amazon AppStream 2.0 Administration Guide .
- idle_disconnect_timeout_in_seconds
The 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 they 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 inIdleDisconnectTimeoutInSeconds
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 3600.
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_arn
The ARN of the public, private, or shared image to use.
- image_name
The name of the image used to create the fleet.
- instance_type
.
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-design.large
stream.graphics-design.xlarge
stream.graphics-design.2xlarge
stream.graphics-design.4xlarge
stream.graphics-desktop.2xlarge
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-pro.4xlarge
stream.graphics-pro.8xlarge
stream.graphics-pro.16xlarge
The following instance types are available for Elastic fleets:
stream.standard.small
stream.standard.medium
- Link:
- Type:
The instance type to use when launching fleet instances. The following instance types are available for non-Elastic fleets
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- max_concurrent_sessions
The maximum number of concurrent sessions that can be run on an Elastic fleet.
This setting is required for Elastic fleets, but is not used for other fleet types.
- max_user_duration_in_seconds
The 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.
- name
A unique name for the fleet.
- node
The construct tree node associated with this construct.
- platform
The platform of the fleet.
Platform is a required setting for Elastic fleets, and is not used for other fleet types.
Allowed Values :
WINDOWS_SERVER_2019
|AMAZON_LINUX2
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.
- session_script_s3_location
The S3 location of the session scripts configuration zip file.
This only applies to Elastic fleets.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- stream_view
The AppStream 2.0 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. WhenDESKTOP
is specified, the standard desktop that is provided by the operating system displays.The default value is
APP
.
- tags
An array of key-value pairs.
- usb_device_filter_strings
The USB device filter strings that specify which USB devices a user can redirect to the fleet streaming session, when using the Windows native client.
This is allowed but not required for Elastic fleets.
- vpc_config
The VPC configuration for the fleet.
This is required for Elastic fleets, but not required for other fleet types.
Static Methods
- classmethod is_cfn_element(x)
Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any
)- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(construct)
Check whether the given construct is a CfnResource.
- Parameters:
construct (
IConstruct
)- Return type:
bool
- classmethod is_construct(x)
Return whether the given object is a Construct.
- Parameters:
x (
Any
)- Return type:
bool
ComputeCapacityProperty
- class CfnFleet.ComputeCapacityProperty(*, desired_instances)
Bases:
object
The desired capacity for a fleet.
- Parameters:
desired_instances (
Union
[int
,float
]) – The desired number of streaming instances.- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_appstream as appstream compute_capacity_property = appstream.CfnFleet.ComputeCapacityProperty( desired_instances=123 )
Attributes
- desired_instances
The desired number of streaming instances.
DomainJoinInfoProperty
- class CfnFleet.DomainJoinInfoProperty(*, directory_name=None, organizational_unit_distinguished_name=None)
Bases:
object
The name of the directory and organizational unit (OU) to use to join a fleet to a Microsoft Active Directory domain.
- Parameters:
directory_name (
Optional
[str
]) – The fully qualified name of the directory (for example, corp.example.com).organizational_unit_distinguished_name (
Optional
[str
]) – The distinguished name of the organizational unit for computer accounts.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_appstream as appstream domain_join_info_property = appstream.CfnFleet.DomainJoinInfoProperty( directory_name="directoryName", organizational_unit_distinguished_name="organizationalUnitDistinguishedName" )
Attributes
- directory_name
The fully qualified name of the directory (for example, corp.example.com).
- organizational_unit_distinguished_name
The distinguished name of the organizational unit for computer accounts.
S3LocationProperty
- class CfnFleet.S3LocationProperty(*, s3_bucket, s3_key)
Bases:
object
Describes the S3 location.
- Parameters:
s3_bucket (
str
) – The S3 bucket of the S3 object.s3_key (
str
) – The S3 key of the S3 object.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_appstream as appstream s3_location_property = appstream.CfnFleet.S3LocationProperty( s3_bucket="s3Bucket", s3_key="s3Key" )
Attributes
- s3_bucket
The S3 bucket of the S3 object.
- s3_key
The S3 key of the S3 object.
VpcConfigProperty
- class CfnFleet.VpcConfigProperty(*, security_group_ids=None, subnet_ids=None)
Bases:
object
The VPC configuration information for the fleet.
- Parameters:
security_group_ids (
Optional
[Sequence
[str
]]) – The identifiers of the security groups for the fleet.subnet_ids (
Optional
[Sequence
[str
]]) – The identifiers of the subnets to which a network interface is attached from the fleet instance. Fleet instances can use one or two subnets.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_appstream as appstream vpc_config_property = appstream.CfnFleet.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"] )
Attributes
- security_group_ids
The identifiers of the security groups for the fleet.
- subnet_ids
The identifiers of the subnets to which a network interface is attached from the fleet instance.
Fleet instances can use one or two subnets.