interface ScriptProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.GameLift.Alpha.ScriptProps |
Go | github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#ScriptProps |
Java | software.amazon.awscdk.services.gamelift.alpha.ScriptProps |
Python | aws_cdk.aws_gamelift_alpha.ScriptProps |
TypeScript (source) | @aws-cdk/aws-gamelift-alpha ยป ScriptProps |
Properties for a new realtime server script.
Example
declare const bucket: s3.Bucket;
new gamelift.Script(this, 'Script', {
content: gamelift.Content.fromBucket(bucket, "sample-asset-key")
});
Properties
Name | Type | Description |
---|---|---|
content | Content | The game content. |
role? | IRole | The IAM role assumed by GameLift to access server script in S3. |
script | string | Name of this realtime server script. |
script | string | Version of this realtime server script. |
content
Type:
Content
The game content.
role?
Type:
IRole
(optional, default: a role will be created with default permissions.)
The IAM role assumed by GameLift to access server script in S3.
If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions to have Read access to a specific key content into a specific S3 bucket. Below an example of required permission: { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetObjectVersion" ], "Resource": "arn:aws:s3:::bucket-name/object-name" }] }
scriptName?
Type:
string
(optional, default: No name)
Name of this realtime server script.
scriptVersion?
Type:
string
(optional, default: No version)
Version of this realtime server script.