Experimental
@aws-cdk/aws-gamelift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
S3Content Class
Game content from an S3 archive.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as gamelift_alpha from '@aws-cdk/aws-gamelift-alpha';
import { aws_s3 as s3 } from 'aws-cdk-lib';
declare const bucket: s3.Bucket;
const s3Content = new gamelift_alpha.S3Content(bucket, 'key', /* all optional props */ 'objectVersion');
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_gamelift_alpha as gamelift_alpha
from aws_cdk import aws_s3 as s3
# bucket: s3.Bucket
s3_content = gamelift_alpha.S3Content(bucket, "key", "objectVersion")
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.gamelift.alpha.*;
import software.amazon.awscdk.services.s3.*;
Bucket bucket;
S3Content s3Content = new S3Content(bucket, "key", "objectVersion");
csharp
// Install: dotnet add package Amazon.CDK.AWS.GameLift.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GameLift.Alpha;
using Amazon.CDK.AWS.S3;
Bucket bucket;
var s3Content = new S3Content(bucket, "key", "objectVersion");
go
// Install: go get github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2
// 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"))
Initializer
ts
new S3Content(bucket: IBucket, key: string, objectVersion?: string)
python
S3Content(bucket: IBucket, key: str, object_version: typing.Optional[str] = None)
java
new S3Content(IBucket bucket, String key, String objectVersion)
csharp
new S3Content(IBucket bucket, string key, string? objectVersion = null)
go
NewS3Content(Bucket IBucket, Key *string, ObjectVersion *string)
Methods
bind(_scope: Construct, role: IRole): ContentConfigdef bind(self, _scope: Construct, role: IRole) -> ContentConfigpublic ContentConfig bind(Construct _scope, IRole role)public ContentConfig Bind(Construct _scope, IRole role)func Bind(_scope Construct, Role IRole) ContentConfig#Called when the Build is initialized to allow this object to bind.
fromAsset(path: string, options?: AssetOptions): AssetContent@staticmethod def from_asset(path: str, options: typing.Optional[AssetOptions] = None) -> AssetContentpublic static AssetContent fromAsset(String path, AssetOptions options)public static AssetContent FromAsset(string path, AssetOptions? options = null)func FromAsset(Path *string, Options AssetOptions) AssetContentstatic#Loads the game content from a local disk path.
1 parameter
Parameters
pathpathpathpathPath— Either a directory with the game content bundle or a .zip file.
fromBucket(bucket: IBucket, key: string, objectVersion?: string): S3Content // chainable@staticmethod def from_bucket(bucket: IBucket, key: str, object_version: typing.Optional[str] = None) -> S3Contentpublic static S3Content fromBucket(IBucket bucket, String key, String objectVersion)public static S3Content FromBucket(IBucket bucket, string key, string? objectVersion = null)func FromBucket(Bucket IBucket, Key *string, ObjectVersion *string) S3Contentstatic#Game content as an S3 object.
3 parameters
Parameters
bucketbucketbucketbucketBucket— The S3 bucket.keykeykeykeyKey— The object key.objectVersionobject_versionobjectVersionobjectVersionObjectVersion— Optional S3 ob ject version.