@aws-cdk_aws-gamelift-alpha.Content

class Content ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.GameLift.Alpha.Content
Gogithub.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#Content
Javasoftware.amazon.awscdk.services.gamelift.alpha.Content
Pythonaws_cdk.aws_gamelift_alpha.Content
TypeScript (source)@aws-cdk/aws-gamelift-alpha ยป Content

Implemented by AssetContent, S3Content

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")
});

new CfnOutput(this, 'BuildArn', { value: build.buildArn });
new CfnOutput(this, 'BuildId', { value: build.buildId });

Initializer

new Content()

Methods

NameDescription
bind(scope, role)๐Ÿ”นCalled when the Build is initialized to allow this object to bind.
static fromAsset(path, options?)๐Ÿ”นLoads the game content from a local disk path.
static fromBucket(bucket, key, objectVersion?)๐Ÿ”นGame content as an S3 object.

bind(scope, role)๐Ÿ”น

public bind(scope: Construct, role: IRole): ContentConfig

Parameters

  • scope Construct
  • role IRole

Returns

  • ContentConfig

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

  • AssetContent

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

  • S3Content

Game content as an S3 object.