class Content
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.GameLift.Alpha.Content |
Go | github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#Content |
Java | software.amazon.awscdk.services.gamelift.alpha.Content |
Python | aws_cdk.aws_gamelift_alpha.Content |
TypeScript (source) | @aws-cdk/aws-gamelift-alpha ยป Content |
Implemented by
Asset, S3
Before deploying your GameLift-enabled multiplayer game servers for hosting with the GameLift service, you need to upload your game server files.
The class helps you on preparing and uploading custom game server build files or Realtime Servers server script files.
Example
declare const bucket: s3.Bucket;
const build = new gamelift.Build(this, 'Build', {
content: gamelift.Content.fromBucket(bucket, "sample-asset-key"),
serverSdkVersion: '5.0.0',
});
Initializer
new Content()
Methods
| Name | Description |
|---|---|
| bind(scope, role) | Called when the Build is initialized to allow this object to bind. |
| static from | Loads the game content from a local disk path. |
| static from | Game content as an S3 object. |
bind(scope, role)
public bind(scope: Construct, role: IRole): ContentConfig
Parameters
Returns
Called when the Build is initialized to allow this object to bind.
static fromAsset(path, options?)
public static fromAsset(path: string, options?: AssetOptions): AssetContent
Parameters
- path
stringโ Either a directory with the game content bundle or a .zip file. - options
AssetOptions
Returns
Loads the game content from a local disk path.
static fromBucket(bucket, key, objectVersion?)
public static fromBucket(bucket: IBucket, key: string, objectVersion?: string): S3Content
Parameters
- bucket
IBucketโ The S3 bucket. - key
stringโ The object key. - objectVersion
stringโ Optional S3 ob ject version.
Returns
Game content as an S3 object.

.NET
Go
Java
Python
TypeScript (