Documentation ¶
Overview ¶
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
The CDK Construct Library for AWS::GameLift
Index ¶
- func BuildBase_IsConstruct(x interface{}) *bool
- func BuildBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func BuildBase_IsResource(construct constructs.IConstruct) *bool
- func Build_IsConstruct(x interface{}) *bool
- func Build_IsOwnedResource(construct constructs.IConstruct) *bool
- func Build_IsResource(construct constructs.IConstruct) *bool
- func NewAssetContent_Override(a AssetContent, path *string, options *awss3assets.AssetOptions)
- func NewBuildBase_Override(b BuildBase, scope constructs.Construct, id *string, ...)
- func NewBuild_Override(b Build, scope constructs.Construct, id *string, props *BuildProps)
- func NewContent_Override(c Content)
- func NewS3Content_Override(s S3Content, bucket awss3.IBucket, key *string, objectVersion *string)
- func NewScriptBase_Override(s ScriptBase, scope constructs.Construct, id *string, ...)
- func NewScript_Override(s Script, scope constructs.Construct, id *string, props *ScriptProps)
- func ScriptBase_IsConstruct(x interface{}) *bool
- func ScriptBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func ScriptBase_IsResource(construct constructs.IConstruct) *bool
- func Script_IsConstruct(x interface{}) *bool
- func Script_IsOwnedResource(construct constructs.IConstruct) *bool
- func Script_IsResource(construct constructs.IConstruct) *bool
- type AssetContent
- func AssetContent_FromAsset(path *string, options *awss3assets.AssetOptions) AssetContent
- func Content_FromAsset(path *string, options *awss3assets.AssetOptions) AssetContent
- func NewAssetContent(path *string, options *awss3assets.AssetOptions) AssetContent
- func S3Content_FromAsset(path *string, options *awss3assets.AssetOptions) AssetContent
- type Build
- type BuildAttributes
- type BuildBase
- type BuildProps
- type Content
- type ContentConfig
- type IBuild
- type IScript
- type OperatingSystem
- type S3Content
- func AssetContent_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Content
- func Content_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Content
- func NewS3Content(bucket awss3.IBucket, key *string, objectVersion *string) S3Content
- func S3Content_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Content
- type Script
- type ScriptAttributes
- type ScriptBase
- type ScriptProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBase_IsConstruct ¶
func BuildBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func BuildBase_IsOwnedResource ¶
func BuildBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func BuildBase_IsResource ¶
func BuildBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func Build_IsConstruct ¶
func Build_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Build_IsOwnedResource ¶
func Build_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func Build_IsResource ¶
func Build_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func NewAssetContent_Override ¶
func NewAssetContent_Override(a AssetContent, path *string, options *awss3assets.AssetOptions)
Experimental.
func NewBuildBase_Override ¶
func NewBuildBase_Override(b BuildBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewBuild_Override ¶
func NewBuild_Override(b Build, scope constructs.Construct, id *string, props *BuildProps)
Experimental.
func NewS3Content_Override ¶
Experimental.
func NewScriptBase_Override ¶
func NewScriptBase_Override(s ScriptBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewScript_Override ¶
func NewScript_Override(s Script, scope constructs.Construct, id *string, props *ScriptProps)
Experimental.
func ScriptBase_IsConstruct ¶
func ScriptBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func ScriptBase_IsOwnedResource ¶
func ScriptBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func ScriptBase_IsResource ¶
func ScriptBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func Script_IsConstruct ¶
func Script_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Script_IsOwnedResource ¶
func Script_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func Script_IsResource ¶
func Script_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
Types ¶
type AssetContent ¶
type AssetContent interface { Content // The path to the asset file or directory. // Experimental. Path() *string // Called when the Build is initialized to allow this object to bind. // Experimental. Bind(scope constructs.Construct, grantable awsiam.IGrantable) *ContentConfig }
Game content from a local directory.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha" import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var dockerImage dockerImage var grantable iGrantable var localBundling iLocalBundling assetContent := gamelift_alpha.NewAssetContent(jsii.String("path"), &assetOptions{ assetHash: jsii.String("assetHash"), assetHashType: cdk.assetHashType_SOURCE, bundling: &bundlingOptions{ image: dockerImage, // the properties below are optional command: []*string{ jsii.String("command"), }, entrypoint: []*string{ jsii.String("entrypoint"), }, environment: map[string]*string{ "environmentKey": jsii.String("environment"), }, local: localBundling, network: jsii.String("network"), outputType: cdk.bundlingOutput_ARCHIVED, securityOpt: jsii.String("securityOpt"), user: jsii.String("user"), volumes: []dockerVolume{ &dockerVolume{ containerPath: jsii.String("containerPath"), hostPath: jsii.String("hostPath"), // the properties below are optional consistency: cdk.dockerVolumeConsistency_CONSISTENT, }, }, workingDirectory: jsii.String("workingDirectory"), }, exclude: []*string{ jsii.String("exclude"), }, followSymlinks: cdk.symlinkFollowMode_NEVER, ignoreMode: cdk.ignoreMode_GLOB, readers: []*iGrantable{ grantable, }, })
Experimental.
func AssetContent_FromAsset ¶
func AssetContent_FromAsset(path *string, options *awss3assets.AssetOptions) AssetContent
Loads the game content from a local disk path. Experimental.
func Content_FromAsset ¶
func Content_FromAsset(path *string, options *awss3assets.AssetOptions) AssetContent
Loads the game content from a local disk path. Experimental.
func NewAssetContent ¶
func NewAssetContent(path *string, options *awss3assets.AssetOptions) AssetContent
Experimental.
func S3Content_FromAsset ¶
func S3Content_FromAsset(path *string, options *awss3assets.AssetOptions) AssetContent
Loads the game content from a local disk path. Experimental.
type Build ¶
type Build interface { BuildBase // The Identifier of the build. // Experimental. BuildId() *string // 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. // Experimental. Env() *awscdk.ResourceEnvironment // The principal this GameLift Build is using. // Experimental. GrantPrincipal() awsiam.IPrincipal // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The IAM role GameLift assumes to acccess server build content. // Experimental. Role() awsiam.IRole // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // 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`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
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.
Example:
var bucket bucket gamelift.NewBuild(this, jsii.String("Build"), &buildProps{ content: gamelift.content.fromBucket(bucket, jsii.String("sample-asset-key")), })
See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html
Experimental.
func Build_FromAsset ¶
func Build_FromAsset(scope constructs.Construct, id *string, path *string, options *awss3assets.AssetOptions) Build
Create a new Build from asset content. Experimental.
func Build_FromBucket ¶
func Build_FromBucket(scope constructs.Construct, id *string, bucket awss3.IBucket, key *string, objectVersion *string) Build
Create a new Build from s3 content. Experimental.
func NewBuild ¶
func NewBuild(scope constructs.Construct, id *string, props *BuildProps) Build
Experimental.
type BuildAttributes ¶
type BuildAttributes struct { // The identifier of the build. // Experimental. BuildId *string `field:"required" json:"buildId" yaml:"buildId"` // The IAM role assumed by GameLift to access server build in S3. // Experimental. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` }
Represents a Build content defined outside of this stack.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha" import "github.com/aws/aws-cdk-go/awscdk" var role role buildAttributes := &buildAttributes{ buildId: jsii.String("buildId"), // the properties below are optional role: role, }
Experimental.
type BuildBase ¶
type BuildBase interface { awscdk.Resource IBuild // The Identifier of the build. // Experimental. BuildId() *string // 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. // Experimental. Env() *awscdk.ResourceEnvironment // The principal to grant permissions to. // Experimental. GrantPrincipal() awsiam.IPrincipal // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // 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`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Base class for new and imported GameLift server build. Experimental.
type BuildProps ¶
type BuildProps struct { // The game build file storage. // Experimental. Content Content `field:"required" json:"content" yaml:"content"` // Name of this build. // Experimental. BuildName *string `field:"optional" json:"buildName" yaml:"buildName"` // Version of this build. // Experimental. BuildVersion *string `field:"optional" json:"buildVersion" yaml:"buildVersion"` // The operating system that the game server binaries are built to run on. // Experimental. OperatingSystem OperatingSystem `field:"optional" json:"operatingSystem" yaml:"operatingSystem"` // 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: https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc // // Experimental. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` }
Properties for a new build.
Example:
var bucket bucket gamelift.NewBuild(this, jsii.String("Build"), &buildProps{ content: gamelift.content.fromBucket(bucket, jsii.String("sample-asset-key")), })
Experimental.
type Content ¶
type Content interface { // Called when the Build is initialized to allow this object to bind. // Experimental. Bind(scope constructs.Construct, grantable awsiam.IGrantable) *ContentConfig }
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:
var bucket bucket gamelift.NewBuild(this, jsii.String("Build"), &buildProps{ content: gamelift.content.fromBucket(bucket, jsii.String("sample-asset-key")), })
Experimental.
type ContentConfig ¶
type ContentConfig struct { // The location of the content in S3. // Experimental. S3Location *awss3.Location `field:"required" json:"s3Location" yaml:"s3Location"` }
Result of binding `Content` into a `Build`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha" contentConfig := &contentConfig{ s3Location: &location{ bucketName: jsii.String("bucketName"), objectKey: jsii.String("objectKey"), // the properties below are optional objectVersion: jsii.String("objectVersion"), }, }
Experimental.
type IBuild ¶
type IBuild interface { awsiam.IGrantable awscdk.IResource // The Identifier of the build. // Experimental. BuildId() *string }
Your custom-built game server software that runs on GameLift and hosts game sessions for your players.
A game build represents the set of files that run your game server on a particular operating system. You can have many different builds, such as for different flavors of your game. The game build must be integrated with the GameLift service. You upload game build files to the GameLift service in the Regions where you plan to set up fleets. See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html
Experimental.
func Build_FromBuildAttributes ¶
func Build_FromBuildAttributes(scope constructs.Construct, id *string, attrs *BuildAttributes) IBuild
Import an existing build from its attributes. Experimental.
func Build_FromBuildId ¶
Import a build into CDK using its identifier. Experimental.
type IScript ¶
type IScript interface { awsiam.IGrantable awscdk.IResource // The ARN of the realtime server script. // Experimental. ScriptArn() *string // The Identifier of the realtime server script. // Experimental. ScriptId() *string }
Your configuration and custom game logic for use with Realtime Servers.
Realtime Servers are provided by GameLift to use instead of a custom-built game server. You configure Realtime Servers for your game clients by creating a script using JavaScript, and add custom game logic as appropriate to host game sessions for your players. You upload the Realtime script to the GameLift service in the Regions where you plan to set up fleets. See: https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script-uploading.html
Experimental.
func Script_FromScriptArn ¶
Import a script into CDK using its ARN. Experimental.
func Script_FromScriptAttributes ¶
func Script_FromScriptAttributes(scope constructs.Construct, id *string, attrs *ScriptAttributes) IScript
Import an existing realtime server script from its attributes. Experimental.
type OperatingSystem ¶
type OperatingSystem string
The operating system that the game server binaries are built to run on. Experimental.
const ( // Experimental. OperatingSystem_AMAZON_LINUX OperatingSystem = "AMAZON_LINUX" // Experimental. OperatingSystem_AMAZON_LINUX_2 OperatingSystem = "AMAZON_LINUX_2" // Experimental. OperatingSystem_WINDOWS_2012 OperatingSystem = "WINDOWS_2012" )
type S3Content ¶
type S3Content interface { Content // Called when the Build is initialized to allow this object to bind. // Experimental. Bind(_scope constructs.Construct, grantable awsiam.IGrantable) *ContentConfig }
Game content from an S3 archive.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha" import "github.com/aws/aws-cdk-go/awscdk" var bucket bucket s3Content := gamelift_alpha.NewS3Content(bucket, jsii.String("key"), jsii.String("objectVersion"))
Experimental.
func AssetContent_FromBucket ¶
Game content as an S3 object. Experimental.
func Content_FromBucket ¶
Game content as an S3 object. Experimental.
func NewS3Content ¶
Experimental.
type Script ¶
type Script interface { ScriptBase // 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. // Experimental. Env() *awscdk.ResourceEnvironment // The principal this GameLift script is using. // Experimental. GrantPrincipal() awsiam.IPrincipal // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The IAM role GameLift assumes to acccess server script content. // Experimental. Role() awsiam.IRole // The ARN of the realtime server script. // Experimental. ScriptArn() *string // The Identifier of the realtime server script. // Experimental. ScriptId() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // 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`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
A GameLift script, 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 realtime game server script.
Example:
var bucket bucket gamelift.NewScript(this, jsii.String("Script"), &scriptProps{ content: gamelift.content.fromBucket(bucket, jsii.String("sample-asset-key")), })
See: https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script-uploading.html
Experimental.
func NewScript ¶
func NewScript(scope constructs.Construct, id *string, props *ScriptProps) Script
Experimental.
func Script_FromAsset ¶
func Script_FromAsset(scope constructs.Construct, id *string, path *string, options *awss3assets.AssetOptions) Script
Create a new realtime server script from asset content. Experimental.
type ScriptAttributes ¶
type ScriptAttributes struct { // The ARN of the realtime server script. // Experimental. ScriptArn *string `field:"required" json:"scriptArn" yaml:"scriptArn"` // The IAM role assumed by GameLift to access server script in S3. // Experimental. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` }
Represents a Script content defined outside of this stack.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha" import "github.com/aws/aws-cdk-go/awscdk" var role role scriptAttributes := &scriptAttributes{ scriptArn: jsii.String("scriptArn"), // the properties below are optional role: role, }
Experimental.
type ScriptBase ¶
type ScriptBase interface { awscdk.Resource IScript // 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. // Experimental. Env() *awscdk.ResourceEnvironment // The principal to grant permissions to. // Experimental. GrantPrincipal() awsiam.IPrincipal // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The ARN of the realtime server script. // Experimental. ScriptArn() *string // The Identifier of the realtime server script. // Experimental. ScriptId() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // 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`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Base class for new and imported GameLift realtime server script. Experimental.
type ScriptProps ¶
type ScriptProps struct { // The game content. // Experimental. Content Content `field:"required" json:"content" yaml:"content"` // The IAM role assumed by GameLift to access server script 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: https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc // // Experimental. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // Name of this realtime server script. // Experimental. ScriptName *string `field:"optional" json:"scriptName" yaml:"scriptName"` // Version of this realtime server script. // Experimental. ScriptVersion *string `field:"optional" json:"scriptVersion" yaml:"scriptVersion"` }
Properties for a new realtime server script.
Example:
var bucket bucket gamelift.NewScript(this, jsii.String("Script"), &scriptProps{ content: gamelift.content.fromBucket(bucket, jsii.String("sample-asset-key")), })
Experimental.
Source Files ¶
- awscdkgameliftalpha.go
- awscdkgameliftalpha_AssetContent.go
- awscdkgameliftalpha_AssetContent__runtime_type_checks.go
- awscdkgameliftalpha_Build.go
- awscdkgameliftalpha_BuildAttributes.go
- awscdkgameliftalpha_BuildBase.go
- awscdkgameliftalpha_BuildBase__runtime_type_checks.go
- awscdkgameliftalpha_BuildProps.go
- awscdkgameliftalpha_Build__runtime_type_checks.go
- awscdkgameliftalpha_Content.go
- awscdkgameliftalpha_ContentConfig.go
- awscdkgameliftalpha_Content__runtime_type_checks.go
- awscdkgameliftalpha_IBuild.go
- awscdkgameliftalpha_IBuild__runtime_type_checks.go
- awscdkgameliftalpha_IScript.go
- awscdkgameliftalpha_IScript__runtime_type_checks.go
- awscdkgameliftalpha_OperatingSystem.go
- awscdkgameliftalpha_S3Content.go
- awscdkgameliftalpha_S3Content__runtime_type_checks.go
- awscdkgameliftalpha_Script.go
- awscdkgameliftalpha_ScriptAttributes.go
- awscdkgameliftalpha_ScriptBase.go
- awscdkgameliftalpha_ScriptBase__runtime_type_checks.go
- awscdkgameliftalpha_ScriptProps.go
- awscdkgameliftalpha_Script__runtime_type_checks.go