> **Experimental**
>
> `@aws-cdk/aws-gamelift-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# Content

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.

Superclass of: [AssetContent](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-gamelift-alpha.AssetContent.html), [S3Content](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-gamelift-alpha.S3Content.html)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/content.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-gamelift-alpha/lib/content.ts#L11)

## Example

TypeScript:

```ts
declare const bucket: s3.Bucket;
const build = new gamelift.Build(this, 'Build', {
  content: gamelift.Content.fromBucket(bucket, "sample-asset-key"),
  serverSdkVersion: '5.0.0',
});
```

Python:

```python
# bucket: s3.Bucket

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

Java:

```java
Bucket bucket;

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

C# / .NET:

```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"),
    ServerSdkVersion = "5.0.0"
});
```

Golang:

```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")),
	ServerSdkVersion: jsii.String("5.0.0"),
})
```

## Initializer

TypeScript:

```ts
new Content()
```

Python:

```python
Content()
```

Java:

```java
new Content()
```

C# / .NET:

```csharp
new Content()
```

Golang:

```go
NewContent()
```

## Methods

- `bind(scope: Construct, role: IRole): ContentConfig` — Called when the Build is initialized to allow this object to bind.

- `fromAsset(path: string, options?: AssetOptions): AssetContent` (static) — Loads the game content from a local disk path.

  **Parameters**

  - `path` — Either a directory with the game content bundle or a .zip file.

- `fromBucket(bucket: IBucket, key: string, objectVersion?: string): S3Content` (static) — Game content as an S3 object.

  **Parameters**

  - `bucket` — The S3 bucket.
  - `key` — The object key.
  - `objectVersion` — Optional S3 ob ject version.
