Table of Contents
AppStream.Client¶A low-level client representing Amazon AppStream:
client = session.create_client('appstream')
These are the available methods:
associate_fleet()can_paginate()create_directory_config()create_fleet()create_stack()create_streaming_url()delete_directory_config()delete_fleet()delete_stack()describe_directory_configs()describe_fleets()describe_images()describe_sessions()describe_stacks()disassociate_fleet()expire_session()generate_presigned_url()get_paginator()get_waiter()list_associated_fleets()list_associated_stacks()start_fleet()stop_fleet()update_directory_config()update_fleet()update_stack()associate_fleet(**kwargs)¶Associate a fleet to a stack.
See also: AWS API Documentation
Request Syntax
response = client.associate_fleet(
FleetName='string',
StackName='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
create_directory_config(**kwargs)¶Creates a directory configuration with the given parameters.
See also: AWS API Documentation
Request Syntax
response = client.create_directory_config(
DirectoryName='string',
OrganizationalUnitDistinguishedNames=[
'string',
],
ServiceAccountCredentials={
'AccountName': 'string',
'AccountPassword': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'DirectoryConfig': {
'DirectoryName': 'string',
'OrganizationalUnitDistinguishedNames': [
'string',
],
'ServiceAccountCredentials': {
'AccountName': 'string',
'AccountPassword': 'string'
},
'CreatedTime': datetime(2015, 1, 1)
}
}
Response Structure
|
create_fleet(**kwargs)¶Creates a new fleet.
See also: AWS API Documentation
Request Syntax
response = client.create_fleet(
Name='string',
ImageName='string',
InstanceType='string',
ComputeCapacity={
'DesiredInstances': 123
},
VpcConfig={
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
MaxUserDurationInSeconds=123,
DisconnectTimeoutInSeconds=123,
Description='string',
DisplayName='string',
EnableDefaultInternetAccess=True|False,
DomainJoinInfo={
'DirectoryName': 'string',
'OrganizationalUnitDistinguishedName': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Fleet': {
'Arn': 'string',
'Name': 'string',
'DisplayName': 'string',
'Description': 'string',
'ImageName': 'string',
'InstanceType': 'string',
'ComputeCapacityStatus': {
'Desired': 123,
'Running': 123,
'InUse': 123,
'Available': 123
},
'MaxUserDurationInSeconds': 123,
'DisconnectTimeoutInSeconds': 123,
'State': 'STARTING'|'RUNNING'|'STOPPING'|'STOPPED',
'VpcConfig': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
'CreatedTime': datetime(2015, 1, 1),
'FleetErrors': [
{
'ErrorCode': 'IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION'|'IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION'|'IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION'|'NETWORK_INTERFACE_LIMIT_EXCEEDED'|'INTERNAL_SERVICE_ERROR'|'IAM_SERVICE_ROLE_IS_MISSING'|'SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES'|'IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION'|'SUBNET_NOT_FOUND'|'IMAGE_NOT_FOUND'|'INVALID_SUBNET_CONFIGURATION'|'SECURITY_GROUPS_NOT_FOUND'|'IAM_SERVICE_ROLE_MISSING_DESCRIBE_SECURITY_GROUPS_ACTION'|'DOMAIN_JOIN_ERROR_FILE_NOT_FOUND'|'DOMAIN_JOIN_ERROR_ACCESS_DENIED'|'DOMAIN_JOIN_ERROR_LOGON_FAILURE'|'DOMAIN_JOIN_ERROR_INVALID_PARAMETER'|'DOMAIN_JOIN_ERROR_MORE_DATA'|'DOMAIN_JOIN_ERROR_NO_SUCH_DOMAIN'|'DOMAIN_JOIN_ERROR_NOT_SUPPORTED'|'DOMAIN_JOIN_NERR_INVALID_WORKGROUP_NAME'|'DOMAIN_JOIN_NERR_WORKSTATION_NOT_STARTED'|'DOMAIN_JOIN_ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED'|'DOMAIN_JOIN_NERR_PASSWORD_EXPIRED'|'DOMAIN_JOIN_INTERNAL_SERVICE_ERROR',
'ErrorMessage': 'string'
},
],
'EnableDefaultInternetAccess': True|False,
'DomainJoinInfo': {
'DirectoryName': 'string',
'OrganizationalUnitDistinguishedName': 'string'
}
}
}
Response Structure
|
create_stack(**kwargs)¶Create a new stack.
See also: AWS API Documentation
Request Syntax
response = client.create_stack(
Name='string',
Description='string',
DisplayName='string',
StorageConnectors=[
{
'ConnectorType': 'HOMEFOLDERS',
'ResourceIdentifier': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Stack': {
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'DisplayName': 'string',
'CreatedTime': datetime(2015, 1, 1),
'StorageConnectors': [
{
'ConnectorType': 'HOMEFOLDERS',
'ResourceIdentifier': 'string'
},
],
'StackErrors': [
{
'ErrorCode': 'STORAGE_CONNECTOR_ERROR'|'INTERNAL_SERVICE_ERROR',
'ErrorMessage': 'string'
},
]
}
}
Response Structure
|
create_streaming_url(**kwargs)¶Creates a URL to start an AppStream 2.0 streaming session for a user. By default, the URL is valid only for 1 minute from the time that it is generated.
See also: AWS API Documentation
Request Syntax
response = client.create_streaming_url(
StackName='string',
FleetName='string',
UserId='string',
ApplicationId='string',
Validity=123,
SessionContext='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'StreamingURL': 'string',
'Expires': datetime(2015, 1, 1)
}
Response Structure
|
delete_directory_config(**kwargs)¶Deletes the directory configuration with the given parameters.
See also: AWS API Documentation
Request Syntax
response = client.delete_directory_config(
DirectoryName='string'
)
| Parameters: | DirectoryName (string) – [REQUIRED] The name of the directory configuration to be deleted. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
delete_fleet(**kwargs)¶Deletes a fleet.
See also: AWS API Documentation
Request Syntax
response = client.delete_fleet(
Name='string'
)
| Parameters: | Name (string) – [REQUIRED] The name of the fleet to be deleted. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
delete_stack(**kwargs)¶Deletes the stack. After this operation completes, the environment can no longer be activated, and any reservations made for the stack are released.
See also: AWS API Documentation
Request Syntax
response = client.delete_stack(
Name='string'
)
| Parameters: | Name (string) – [REQUIRED] The name of the stack to delete. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
describe_directory_configs(**kwargs)¶Returns a list describing the specified directory configurations.
See also: AWS API Documentation
Request Syntax
response = client.describe_directory_configs(
DirectoryNames=[
'string',
],
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'DirectoryConfigs': [
{
'DirectoryName': 'string',
'OrganizationalUnitDistinguishedNames': [
'string',
],
'ServiceAccountCredentials': {
'AccountName': 'string',
'AccountPassword': 'string'
},
'CreatedTime': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
|
describe_fleets(**kwargs)¶If fleet names are provided, this operation describes the specified fleets; otherwise, all the fleets in the account are described.
See also: AWS API Documentation
Request Syntax
response = client.describe_fleets(
Names=[
'string',
],
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Fleets': [
{
'Arn': 'string',
'Name': 'string',
'DisplayName': 'string',
'Description': 'string',
'ImageName': 'string',
'InstanceType': 'string',
'ComputeCapacityStatus': {
'Desired': 123,
'Running': 123,
'InUse': 123,
'Available': 123
},
'MaxUserDurationInSeconds': 123,
'DisconnectTimeoutInSeconds': 123,
'State': 'STARTING'|'RUNNING'|'STOPPING'|'STOPPED',
'VpcConfig': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
'CreatedTime': datetime(2015, 1, 1),
'FleetErrors': [
{
'ErrorCode': 'IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION'|'IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION'|'IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION'|'NETWORK_INTERFACE_LIMIT_EXCEEDED'|'INTERNAL_SERVICE_ERROR'|'IAM_SERVICE_ROLE_IS_MISSING'|'SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES'|'IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION'|'SUBNET_NOT_FOUND'|'IMAGE_NOT_FOUND'|'INVALID_SUBNET_CONFIGURATION'|'SECURITY_GROUPS_NOT_FOUND'|'IAM_SERVICE_ROLE_MISSING_DESCRIBE_SECURITY_GROUPS_ACTION'|'DOMAIN_JOIN_ERROR_FILE_NOT_FOUND'|'DOMAIN_JOIN_ERROR_ACCESS_DENIED'|'DOMAIN_JOIN_ERROR_LOGON_FAILURE'|'DOMAIN_JOIN_ERROR_INVALID_PARAMETER'|'DOMAIN_JOIN_ERROR_MORE_DATA'|'DOMAIN_JOIN_ERROR_NO_SUCH_DOMAIN'|'DOMAIN_JOIN_ERROR_NOT_SUPPORTED'|'DOMAIN_JOIN_NERR_INVALID_WORKGROUP_NAME'|'DOMAIN_JOIN_NERR_WORKSTATION_NOT_STARTED'|'DOMAIN_JOIN_ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED'|'DOMAIN_JOIN_NERR_PASSWORD_EXPIRED'|'DOMAIN_JOIN_INTERNAL_SERVICE_ERROR',
'ErrorMessage': 'string'
},
],
'EnableDefaultInternetAccess': True|False,
'DomainJoinInfo': {
'DirectoryName': 'string',
'OrganizationalUnitDistinguishedName': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
|
describe_images(**kwargs)¶Describes the images. If a list of names is not provided, all images in your account are returned. This operation does not return a paginated result.
See also: AWS API Documentation
Request Syntax
response = client.describe_images(
Names=[
'string',
]
)
| Parameters: | Names (list) – A specific list of images to describe.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Images': [
{
'Name': 'string',
'Arn': 'string',
'BaseImageArn': 'string',
'DisplayName': 'string',
'State': 'PENDING'|'AVAILABLE'|'FAILED'|'DELETING',
'Visibility': 'PUBLIC'|'PRIVATE',
'ImageBuilderSupported': True|False,
'Platform': 'WINDOWS',
'Description': 'string',
'StateChangeReason': {
'Code': 'INTERNAL_ERROR'|'IMAGE_BUILDER_NOT_AVAILABLE',
'Message': 'string'
},
'Applications': [
{
'Name': 'string',
'DisplayName': 'string',
'IconURL': 'string',
'LaunchPath': 'string',
'LaunchParameters': 'string',
'Enabled': True|False,
'Metadata': {
'string': 'string'
}
},
],
'CreatedTime': datetime(2015, 1, 1),
'PublicBaseImageReleasedDate': datetime(2015, 1, 1)
},
]
}
Response Structure
|
describe_sessions(**kwargs)¶Describes the streaming sessions for a stack and a fleet. If a user ID is provided, this operation returns streaming sessions for only that user. To retrieve the next set of items, pass this value for the nextToken parameter in a subsequent call to this operation. If an authentication type is not provided, the operation defaults to users authenticated using a streaming URL.
See also: AWS API Documentation
Request Syntax
response = client.describe_sessions(
StackName='string',
FleetName='string',
UserId='string',
NextToken='string',
Limit=123,
AuthenticationType='API'|'SAML'|'USERPOOL'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Sessions': [
{
'Id': 'string',
'UserId': 'string',
'StackName': 'string',
'FleetName': 'string',
'State': 'ACTIVE'|'PENDING'|'EXPIRED',
'AuthenticationType': 'API'|'SAML'|'USERPOOL'
},
],
'NextToken': 'string'
}
Response Structure
|
describe_stacks(**kwargs)¶If stack names are not provided, this operation describes the specified stacks; otherwise, all stacks in the account are described. To retrieve the next set of items, pass the nextToken value in a subsequent call to this operation.
See also: AWS API Documentation
Request Syntax
response = client.describe_stacks(
Names=[
'string',
],
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Stacks': [
{
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'DisplayName': 'string',
'CreatedTime': datetime(2015, 1, 1),
'StorageConnectors': [
{
'ConnectorType': 'HOMEFOLDERS',
'ResourceIdentifier': 'string'
},
],
'StackErrors': [
{
'ErrorCode': 'STORAGE_CONNECTOR_ERROR'|'INTERNAL_SERVICE_ERROR',
'ErrorMessage': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
|
disassociate_fleet(**kwargs)¶Disassociates a fleet from a stack.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_fleet(
FleetName='string',
StackName='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
expire_session(**kwargs)¶This operation immediately stops a streaming session.
See also: AWS API Documentation
Request Syntax
response = client.expire_session(
SessionId='string'
)
| Parameters: | SessionId (string) – [REQUIRED] The unique identifier of the streaming session to be stopped. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_waiter(waiter_name)¶list_associated_fleets(**kwargs)¶Lists all fleets associated with the stack.
See also: AWS API Documentation
Request Syntax
response = client.list_associated_fleets(
StackName='string',
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Names': [
'string',
],
'NextToken': 'string'
}
Response Structure
|
list_associated_stacks(**kwargs)¶Lists all stacks to which the specified fleet is associated.
See also: AWS API Documentation
Request Syntax
response = client.list_associated_stacks(
FleetName='string',
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Names': [
'string',
],
'NextToken': 'string'
}
Response Structure
|
start_fleet(**kwargs)¶Starts a fleet.
See also: AWS API Documentation
Request Syntax
response = client.start_fleet(
Name='string'
)
| Parameters: | Name (string) – [REQUIRED] The name of the fleet to start. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
stop_fleet(**kwargs)¶Stops a fleet.
See also: AWS API Documentation
Request Syntax
response = client.stop_fleet(
Name='string'
)
| Parameters: | Name (string) – [REQUIRED] The name of the fleet to stop. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
update_directory_config(**kwargs)¶Updates the directory configuration with the given parameters.
See also: AWS API Documentation
Request Syntax
response = client.update_directory_config(
DirectoryName='string',
OrganizationalUnitDistinguishedNames=[
'string',
],
ServiceAccountCredentials={
'AccountName': 'string',
'AccountPassword': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'DirectoryConfig': {
'DirectoryName': 'string',
'OrganizationalUnitDistinguishedNames': [
'string',
],
'ServiceAccountCredentials': {
'AccountName': 'string',
'AccountPassword': 'string'
},
'CreatedTime': datetime(2015, 1, 1)
}
}
Response Structure
|
update_fleet(**kwargs)¶Updates an existing fleet. All the attributes except the fleet name can be updated in the STOPPED state. When a fleet is in the RUNNING state, only DisplayName and ComputeCapacity can be updated. A fleet cannot be updated in a status of STARTING or STOPPING .
See also: AWS API Documentation
Request Syntax
response = client.update_fleet(
ImageName='string',
Name='string',
InstanceType='string',
ComputeCapacity={
'DesiredInstances': 123
},
VpcConfig={
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
MaxUserDurationInSeconds=123,
DisconnectTimeoutInSeconds=123,
DeleteVpcConfig=True|False,
Description='string',
DisplayName='string',
EnableDefaultInternetAccess=True|False,
DomainJoinInfo={
'DirectoryName': 'string',
'OrganizationalUnitDistinguishedName': 'string'
},
AttributesToDelete=[
'VPC_CONFIGURATION'|'VPC_CONFIGURATION_SECURITY_GROUP_IDS'|'DOMAIN_JOIN_INFO',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Fleet': {
'Arn': 'string',
'Name': 'string',
'DisplayName': 'string',
'Description': 'string',
'ImageName': 'string',
'InstanceType': 'string',
'ComputeCapacityStatus': {
'Desired': 123,
'Running': 123,
'InUse': 123,
'Available': 123
},
'MaxUserDurationInSeconds': 123,
'DisconnectTimeoutInSeconds': 123,
'State': 'STARTING'|'RUNNING'|'STOPPING'|'STOPPED',
'VpcConfig': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
'CreatedTime': datetime(2015, 1, 1),
'FleetErrors': [
{
'ErrorCode': 'IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION'|'IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION'|'IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION'|'NETWORK_INTERFACE_LIMIT_EXCEEDED'|'INTERNAL_SERVICE_ERROR'|'IAM_SERVICE_ROLE_IS_MISSING'|'SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES'|'IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION'|'SUBNET_NOT_FOUND'|'IMAGE_NOT_FOUND'|'INVALID_SUBNET_CONFIGURATION'|'SECURITY_GROUPS_NOT_FOUND'|'IAM_SERVICE_ROLE_MISSING_DESCRIBE_SECURITY_GROUPS_ACTION'|'DOMAIN_JOIN_ERROR_FILE_NOT_FOUND'|'DOMAIN_JOIN_ERROR_ACCESS_DENIED'|'DOMAIN_JOIN_ERROR_LOGON_FAILURE'|'DOMAIN_JOIN_ERROR_INVALID_PARAMETER'|'DOMAIN_JOIN_ERROR_MORE_DATA'|'DOMAIN_JOIN_ERROR_NO_SUCH_DOMAIN'|'DOMAIN_JOIN_ERROR_NOT_SUPPORTED'|'DOMAIN_JOIN_NERR_INVALID_WORKGROUP_NAME'|'DOMAIN_JOIN_NERR_WORKSTATION_NOT_STARTED'|'DOMAIN_JOIN_ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED'|'DOMAIN_JOIN_NERR_PASSWORD_EXPIRED'|'DOMAIN_JOIN_INTERNAL_SERVICE_ERROR',
'ErrorMessage': 'string'
},
],
'EnableDefaultInternetAccess': True|False,
'DomainJoinInfo': {
'DirectoryName': 'string',
'OrganizationalUnitDistinguishedName': 'string'
}
}
}
Response Structure
|
update_stack(**kwargs)¶Updates the specified fields in the stack with the specified name.
See also: AWS API Documentation
Request Syntax
response = client.update_stack(
DisplayName='string',
Description='string',
Name='string',
StorageConnectors=[
{
'ConnectorType': 'HOMEFOLDERS',
'ResourceIdentifier': 'string'
},
],
DeleteStorageConnectors=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Stack': {
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'DisplayName': 'string',
'CreatedTime': datetime(2015, 1, 1),
'StorageConnectors': [
{
'ConnectorType': 'HOMEFOLDERS',
'ResourceIdentifier': 'string'
},
],
'StackErrors': [
{
'ErrorCode': 'STORAGE_CONNECTOR_ERROR'|'INTERNAL_SERVICE_ERROR',
'ErrorMessage': 'string'
},
]
}
}
Response Structure
|
The available paginators are: