Skip to content
v2.277.0

Experimental

@aws-cdk/aws-gamelift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

BuildProps Struct ​

Properties for a new build.

Example ​

ts
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 });
python
# bucket: s3.Bucket

build = gamelift.Build(self, "Build",
    content=gamelift.Content.from_bucket(bucket, "sample-asset-key")
)

CfnOutput(self, "BuildArn", value=build.build_arn)
CfnOutput(self, "BuildId", value=build.build_id)
java
Bucket bucket;

Build build = Build.Builder.create(this, "Build")
        .content(Content.fromBucket(bucket, "sample-asset-key"))
        .build();

CfnOutput.Builder.create(this, "BuildArn").value(build.getBuildArn()).build();
CfnOutput.Builder.create(this, "BuildId").value(build.getBuildId()).build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.GameLift.Alpha
Bucket bucket;

var build = new Build(this, "Build", new BuildProps {
    Content = Content.FromBucket(bucket, "sample-asset-key")
});

new CfnOutput(this, "BuildArn", new CfnOutputProps { Value = build.BuildArn });
new CfnOutput(this, "BuildId", new CfnOutputProps { Value = build.BuildId });
go
// Install: go get github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2
var bucket Bucket

build := gamelift.NewBuild(this, jsii.String("Build"), &BuildProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
})

awscdk.NewCfnOutput(this, jsii.String("BuildArn"), &CfnOutputProps{
	Value: build.buildArn,
})
awscdk.NewCfnOutput(this, jsii.String("BuildId"), &CfnOutputProps{
	Value: build.buildId,
})

Properties ​

buildNameoptionalstringbuild_nameoptionalstrbuildNameoptionalStringBuildNameoptionalstringBuildNameoptional*string#
Name of this build.

Default: No name

buildVersionoptionalstringbuild_versionoptionalstrbuildVersionoptionalStringBuildVersionoptionalstringBuildVersionoptional*string#
Version of this build.

Default: No version

contentContentcontentContentcontentContentContentContentContentContentrequired#
The game build file storage.
operatingSystemoptionalOperatingSystemoperating_systemoptionalOperatingSystemoperatingSystemoptionalOperatingSystemOperatingSystemoptionalOperatingSystemOperatingSystemoptionalOperatingSystem#
The operating system that the game server binaries are built to run on.

Default: No version

roleoptionalIRoleroleoptionalIRoleroleoptionalIRoleRoleoptionalIRoleRoleoptionalIRole#
The IAM role assumed by GameLift to access server build in S3.

Default: a role will be created with default permissions.

notes

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" }] }

serverSdkVersionoptionalstringserver_sdk_versionoptionalstrserverSdkVersionoptionalStringServerSdkVersionoptionalstringServerSdkVersionoptional*string= '4.0.2'#
A server SDK version you used when integrating your game server build with Amazon GameLift.