CreateSessions
Creates a new Amazon DCV session with the specified details.
API actions
Request parameters
Name
-
The name for the session.
Type: String
Required: Yes
Owner
-
The name of the session owner. This must be the name of an existing user on the target Amazon DCV server.
Type: String
Required: Yes
Type
-
The session type. For more information about the types of sessions, see Introduction to Amazon DCV Sessions in the Amazon DCV Administrator Guide.
Valid values: CONSOLE | VIRTUAL
Type: String
Required: Yes
InitFile
-
Supported with virtual sessions on Linux Amazon DCV servers. It is not supported with console sessions on Windows and Linux Amazon DCV servers. The path to custom script on the Amazon DCV server to run for initializing the session when it is created. The file path is relative to the init directory specified for the
agent.init_folder
Agent configuration parameter. If the file is in the specified init directory, specify the file name only. If the file is not in the specified init directory, specify the relative path. For more information, see see Agent configuration file in the Amazon DCV Session Manager Administrator Guide.Type: String
Required: No
MaxConcurrents
-
The maximum number of concurrent Amazon DCV clients.
Type: Integer
Required: No
DcvGlEnabled
-
Indicates whether the virtual session is configured to use hardware-based OpenGL. Supported with virtual sessions only. This parameter is not supported with Windows Amazon DCV servers.
Valid values: true | false
Type: Boolean
Required: No
PermissionsFile
-
The Base64-encoded contents of the permissions file. Defaults to the server defaults if omitted. For more information, see Configuring Amazon DCV Authorization in the Amazon DCV Administrator Guide.
Type: String
Required: No
EnqueueRequest
-
Indicates whether to queue the request if it can't be immediately fulfilled.
Type: Boolean
Default: false
Required: No
AutorunFile
-
Supported with console sessions on Windows Amazon DCV servers and virtual sessions on Linux Amazon DCV servers. It is not supported with console sessions on Linux Amazon DCV servers.
The path to a file on the host server that is to be run inside the session. The file path is relative to the autorun directory specified for the
agent.autorun_folder
Agent configuration parameter. If the file is in the specified autorun directory, specify the file name only. If the file is not in the specified autorun directory, specify the relative path. For more information, see Agent configuration file in the Amazon DCV Session Manager Administrator Guide.The file is run on behalf of the specified Owner. The specified owner must have permission to run the file on the server. On Windows Amazon DCV servers, the file is run when the owner logs into the session. On Linux Amazon DCV servers, the file is run when the session is created.
Type: String
Required: No
AutorunFileArguments
-
Supported with virtual sessions on Linux Amazon DCV servers. It is not supported in console sessions on Windows and Linux Amazon DCV servers. Command-line arguments passed to AutorunFile upon its execution inside the session. Arguments are passed in the order they appear into the given array. Maximum allowed number of arguments and maximum allowed length of each argument can be configured. For more information, see Broker configuration file in the Amazon DCV Session Manager Administrator Guide.
Type: Array of strings
Required: No
DisableRetryOnFailure
-
Indicates whether to not retry the create session request after it fails on a Amazon DCV host for any reason. For more information about create session retry mechanism, see Broker configuration file in the Amazon DCV Session Manager Administrator Guide.
Type: Boolean
Default: false
Required: No
Requirements
-
The requirements that the server must satisfy in order to place the session. The requirements can include server tags and/or server properties, both server tags and server properties are retrieved by calling the DescribeServers API.
Requirements condition expressions:
a
!=b
true ifa
is not equal tob
a
=b
true ifa
is equal tob
a
>b
true ifa
is greater thanb
a
>=b
true ifa
is greater than or equal tob
a
<b
true ifa
is less thanb
a
<=b
true ifa
is less than or equal tob
a
=b
true ifa
contains the stringb
Requirements boolean operators:
a
andb
true ifa
andb
are truea
orb
true ifa
orb
are truenot
a
true ifa
is false
The tag keys must be prefixed by
tag:
, the server properties must be prefixed byserver:
.The requirements expressions supports parenthesis()
.Requirements examples:
tag:color = 'pink' and (server:Host.Os.Family = 'windows' or tag:color := 'red')
"server:Host.Aws.Ec2InstanceType := 't2' and server:Host.CpuInfo.NumberOfCpus >= 2"
Numerical values can be specified using the exponential notation, for example:
"server:Host.Memory.TotalBytes > 1024E6"
.The supported server properties are:
Id
Hostname
Version
SessionManagerAgentVersion
Host.Os.BuildNumber
Host.Os.Family
Host.Os.KernelVersion
Host.Os.Name
Host.Os.Version
Host.Memory.TotalBytes
Host.Memory.UsedBytes
Host.Swap.TotalBytes
Host.Swap.UsedBytes
Host.CpuLoadAverage.OneMinute
Host.CpuLoadAverage.FiveMinutes
Host.CpuLoadAverage.FifteenMinutes
Host.Aws.Ec2InstanceId
Host.Aws.Ec2InstanceType
Host.Aws.Region
Host.Aws.Ec2ImageId
Host.CpuInfo.Architecture
Host.CpuInfo.ModelName
Host.CpuInfo.NumberOfCpus
Host.CpuInfo.PhysicalCoresPerCpu
Host.CpuInfo.Vendor
Type: String
Required: No
StorageRoot
-
Specifies the path to the folder used for session storage. For more information about the Amazon DCV session storage, see Enabling Session Storage in the Amazon DCV Administrator Guide.
Type: String
Required: No
Response parameters
Id
-
The unique ID of the session.
Name
-
The session name.
Owner
-
The session owner.
Type
-
The type of session.
State
-
The state of the session. If the request completes successfully, the session enters the
CREATING
state. Substate
-
The substate of the session. If the request completes successfully, the substate enters the
SESSION_PLACING
substate.