@aws-cdk_aws-gamelift-alpha.Build

class Build (construct) ๐Ÿ”น

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

Implements IConstruct, IDependable, IResource, IBuild, IGrantable

A GameLift build, that is installed and runs on instances in an Amazon GameLift fleet.

It consists of a zip file with all of the components of the game server build.

See also: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html

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 Build(scope: Construct, id: string, props: BuildProps)

Parameters

  • scope Construct
  • id string
  • props BuildProps

Construct Props

NameTypeDescription
content๐Ÿ”นContentThe game build file storage.
buildName?๐Ÿ”นstringName of this build.
buildVersion?๐Ÿ”นstringVersion of this build.
operatingSystem?๐Ÿ”นOperatingSystemThe operating system that the game server binaries are built to run on.
role?๐Ÿ”นIRoleThe IAM role assumed by GameLift to access server build in S3.

content๐Ÿ”น

Type: Content

The game build file storage.


buildName?๐Ÿ”น

Type: string (optional, default: No name)

Name of this build.


buildVersion?๐Ÿ”น

Type: string (optional, default: No version)

Version of this build.


operatingSystem?๐Ÿ”น

Type: OperatingSystem (optional, default: No version)

The operating system that the game server binaries are built to run on.


role?๐Ÿ”น

Type: IRole (optional, default: a role will be created with default permissions.)

The IAM role assumed by GameLift to access server build 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" }] }

See also: https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc

Properties

NameTypeDescription
buildArn๐Ÿ”นstringThe ARN of the build.
buildId๐Ÿ”นstringThe Identifier of the build.
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
grantPrincipal๐Ÿ”นIPrincipalThe principal this GameLift Build is using.
node๐Ÿ”นNodeThe tree node.
role๐Ÿ”นIRoleThe IAM role GameLift assumes to acccess server build content.
stack๐Ÿ”นStackThe stack in which this resource is defined.

buildArn๐Ÿ”น

Type: string

The ARN of the build.


buildId๐Ÿ”น

Type: string

The Identifier of the build.


env๐Ÿ”น

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


grantPrincipal๐Ÿ”น

Type: IPrincipal

The principal this GameLift Build is using.


node๐Ÿ”น

Type: Node

The tree node.


role๐Ÿ”น

Type: IRole

The IAM role GameLift assumes to acccess server build content.


stack๐Ÿ”น

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.
toString()๐Ÿ”นReturns a string representation of this construct.
static fromAsset(scope, id, path, options?)๐Ÿ”นCreate a new Build from asset content.
static fromBucket(scope, id, bucket, key, objectVersion?)๐Ÿ”นCreate a new Build from s3 content.
static fromBuildArn(scope, id, buildArn)๐Ÿ”นImport a build into CDK using its ARN.
static fromBuildAttributes(scope, id, attrs)๐Ÿ”นImport an existing build from its attributes.
static fromBuildId(scope, id, buildId)๐Ÿ”นImport a build into CDK using its identifier.

applyRemovalPolicy(policy)๐Ÿ”น

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).


toString()๐Ÿ”น

public toString(): string

Returns

  • string

Returns a string representation of this construct.


static fromAsset(scope, id, path, options?)๐Ÿ”น

public static fromAsset(scope: Construct, id: string, path: string, options?: AssetOptions): Build

Parameters

  • scope Construct
  • id string
  • path string
  • options AssetOptions

Returns

  • Build

Create a new Build from asset content.


static fromBucket(scope, id, bucket, key, objectVersion?)๐Ÿ”น

public static fromBucket(scope: Construct, id: string, bucket: IBucket, key: string, objectVersion?: string): Build

Parameters

  • scope Construct
  • id string
  • bucket IBucket
  • key string
  • objectVersion string

Returns

  • Build

Create a new Build from s3 content.


static fromBuildArn(scope, id, buildArn)๐Ÿ”น

public static fromBuildArn(scope: Construct, id: string, buildArn: string): IBuild

Parameters

  • scope Construct
  • id string
  • buildArn string

Returns

  • IBuild

Import a build into CDK using its ARN.


static fromBuildAttributes(scope, id, attrs)๐Ÿ”น

public static fromBuildAttributes(scope: Construct, id: string, attrs: BuildAttributes): IBuild

Parameters

  • scope Construct
  • id string
  • attrs BuildAttributes

Returns

  • IBuild

Import an existing build from its attributes.


static fromBuildId(scope, id, buildId)๐Ÿ”น

public static fromBuildId(scope: Construct, id: string, buildId: string): IBuild

Parameters

  • scope Construct
  • id string
  • buildId string

Returns

  • IBuild

Import a build into CDK using its identifier.