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

Properties for a new realtime server script.

Used as props by: [Script](/cdk/api/v2/docs/@aws-cdk_aws-gamelift-alpha.Script.html)

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/script.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-gamelift-alpha/lib/script.ts#L69)

## Example

TypeScript:

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

Python:

```python
# bucket: s3.Bucket

gamelift.Script(self, "Script",
    content=gamelift.Content.from_bucket(bucket, "sample-asset-key")
)
```

Java:

```java
Bucket bucket;

Script.Builder.create(this, "Script")
        .content(Content.fromBucket(bucket, "sample-asset-key"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.GameLift.Alpha
Bucket bucket;

new Script(this, "Script", new ScriptProps {
    Content = Content.FromBucket(bucket, "sample-asset-key")
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2
var bucket Bucket

gamelift.NewScript(this, jsii.String("Script"), &ScriptProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
})
```

## Properties

- `content`: [Content](/cdk/api/v2/docs/@aws-cdk_aws-gamelift-alpha.Content.html) (required) — The game content.

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM role assumed by GameLift to access server script in S3.

  **Default:** a role will be created with default permissions.

  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"
   }]
  }

- `scriptName`: string — Name of this realtime server script.

  **Default:** No name

- `scriptVersion`: string — Version of this realtime server script.

  **Default:** No version
