# CfnBuildProps

Properties for defining a `CfnBuild`.

Used as props by: [CfnBuild](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_gamelift.CfnBuild.html)

- Source: Generated at build time
- Type last changed: v2.189.0 · 9 Apr 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_gamelift as gamelift } from 'aws-cdk-lib';
const cfnBuildProps: gamelift.CfnBuildProps = {
  name: 'name',
  operatingSystem: 'operatingSystem',
  serverSdkVersion: 'serverSdkVersion',
  storageLocation: {
    bucket: 'bucket',
    key: 'key',
    roleArn: 'roleArn',

    // the properties below are optional
    objectVersion: 'objectVersion',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  version: 'version',
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_gamelift as gamelift

cfn_build_props = gamelift.CfnBuildProps(
    name="name",
    operating_system="operatingSystem",
    server_sdk_version="serverSdkVersion",
    storage_location=gamelift.CfnBuild.StorageLocationProperty(
        bucket="bucket",
        key="key",
        role_arn="roleArn",

        # the properties below are optional
        object_version="objectVersion"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    version="version"
)
```

Java:

```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.*;

CfnBuildProps cfnBuildProps = CfnBuildProps.builder()
        .name("name")
        .operatingSystem("operatingSystem")
        .serverSdkVersion("serverSdkVersion")
        .storageLocation(StorageLocationProperty.builder()
                .bucket("bucket")
                .key("key")
                .roleArn("roleArn")

                // the properties below are optional
                .objectVersion("objectVersion")
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .version("version")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GameLift;

var cfnBuildProps = new CfnBuildProps {
    Name = "name",
    OperatingSystem = "operatingSystem",
    ServerSdkVersion = "serverSdkVersion",
    StorageLocation = new StorageLocationProperty {
        Bucket = "bucket",
        Key = "key",
        RoleArn = "roleArn",

        // the properties below are optional
        ObjectVersion = "objectVersion"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    Version = "version"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnBuildProps := &CfnBuildProps{
	Name: jsii.String("name"),
	OperatingSystem: jsii.String("operatingSystem"),
	ServerSdkVersion: jsii.String("serverSdkVersion"),
	StorageLocation: &StorageLocationProperty{
		Bucket: jsii.String("bucket"),
		Key: jsii.String("key"),
		RoleArn: jsii.String("roleArn"),

		// the properties below are optional
		ObjectVersion: jsii.String("objectVersion"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	Version: jsii.String("version"),
}
```

## Properties

- `name`: string — A descriptive label that is associated with a build.

  Build names do not need to be unique.

- `operatingSystem`: string — The operating system that your game server binaries run on.

  This value determines the type of fleet resources that you use for this build. If your game build contains multiple executables, they all must run on the same operating system. You must specify a valid operating system in this request. There is no default value. You can't change a build's operating system later.

  > Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the [Amazon Linux 2 FAQs](https://docs.aws.amazon.com/amazon-linux-2/faqs/) . For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See [Migrate to server SDK version 5.](https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html)

- `serverSdkVersion`: string — A server SDK version you used when integrating your game server build with Amazon GameLift Servers.

  For more information see [Integrate games with custom game servers](https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-custom-intro.html) . By default Amazon GameLift Servers sets this value to `4.0.2` .

- `storageLocation`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBuild.StorageLocationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_gamelift.CfnBuild.StorageLocationProperty.html) — Information indicating where your game build files are stored.

  Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key. The location must also specify a role ARN that you set up to allow Amazon GameLift Servers to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region.

  If a `StorageLocation` is specified, the size of your file can be found in your Amazon S3 bucket. Amazon GameLift Servers will report a `SizeOnDisk` of 0.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.

- `version`: string — Version information that is associated with this build.

  Version strings do not need to be unique.
