CreateAppBlock - Amazon AppStream 2.0

CreateAppBlock

Creates an app block.

App blocks are an Amazon AppStream 2.0 resource that stores the details about the virtual hard disk in an S3 bucket. It also stores the setup script with details about how to mount the virtual hard disk. The virtual hard disk includes the application binaries and other files necessary to launch your applications. Multiple applications can be assigned to a single app block.

This is only supported for Elastic fleets.

Request Syntax

{ "Description": "string", "DisplayName": "string", "Name": "string", "PackagingType": "string", "PostSetupScriptDetails": { "ExecutableParameters": "string", "ExecutablePath": "string", "ScriptS3Location": { "S3Bucket": "string", "S3Key": "string" }, "TimeoutInSeconds": number }, "SetupScriptDetails": { "ExecutableParameters": "string", "ExecutablePath": "string", "ScriptS3Location": { "S3Bucket": "string", "S3Key": "string" }, "TimeoutInSeconds": number }, "SourceS3Location": { "S3Bucket": "string", "S3Key": "string" }, "Tags": { "string" : "string" } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Description

The description of the app block.

Type: String

Length Constraints: Maximum length of 256.

Required: No

DisplayName

The display name of the app block. This is not displayed to the user.

Type: String

Length Constraints: Maximum length of 100.

Required: No

Name

The name of the app block.

Type: String

Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,100}$

Required: Yes

PackagingType

The packaging type of the app block.

Type: String

Valid Values: CUSTOM | APPSTREAM2

Required: No

PostSetupScriptDetails

The post setup script details of the app block. This can only be provided for the APPSTREAM2 PackagingType.

Type: ScriptDetails object

Required: No

SetupScriptDetails

The setup script details of the app block. This must be provided for the CUSTOM PackagingType.

Type: ScriptDetails object

Required: No

SourceS3Location

The source S3 location of the app block.

Type: S3Location object

Required: Yes

Tags

The tags assigned to the app block.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(^(?!aws:).[\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Required: No

Response Syntax

{ "AppBlock": { "AppBlockErrors": [ { "ErrorCode": "string", "ErrorMessage": "string" } ], "Arn": "string", "CreatedTime": number, "Description": "string", "DisplayName": "string", "Name": "string", "PackagingType": "string", "PostSetupScriptDetails": { "ExecutableParameters": "string", "ExecutablePath": "string", "ScriptS3Location": { "S3Bucket": "string", "S3Key": "string" }, "TimeoutInSeconds": number }, "SetupScriptDetails": { "ExecutableParameters": "string", "ExecutablePath": "string", "ScriptS3Location": { "S3Bucket": "string", "S3Key": "string" }, "TimeoutInSeconds": number }, "SourceS3Location": { "S3Bucket": "string", "S3Key": "string" }, "State": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AppBlock

The app block.

Type: AppBlock object

Errors

For information about the errors that are common to all actions, see Common Errors.

ConcurrentModificationException

An API error occurred. Wait a few minutes and try again.

HTTP Status Code: 400

LimitExceededException

The requested limit exceeds the permitted limit for an account.

HTTP Status Code: 400

OperationNotPermittedException

The attempted operation is not permitted.

HTTP Status Code: 400

ResourceAlreadyExistsException

The specified resource already exists.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: