class Content
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.GameLift.Alpha.Content |
![]() | github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#Content |
![]() | software.amazon.awscdk.services.gamelift.alpha.Content |
![]() | aws_cdk.aws_gamelift_alpha.Content |
![]() | @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
Asset
Options
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.