CfnScriptPropsMixin
- class aws_cdk.mixins_preview.aws_gamelift.mixins.CfnScriptPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::GameLift::Scriptresource creates a new script record for your Realtime Servers script.Realtime scripts are JavaScript that provide configuration settings and optional custom game logic for your game. The script is deployed when you create a Realtime Servers fleet to host your game sessions. Script logic is executed during an active game session.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-script.html
- CloudformationResource:
AWS::GameLift::Script
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_gamelift import mixins as gamelift_mixins cfn_script_props_mixin = gamelift_mixins.CfnScriptPropsMixin(gamelift_mixins.CfnScriptMixinProps( name="name", storage_location=gamelift_mixins.CfnScriptPropsMixin.S3LocationProperty( bucket="bucket", key="key", object_version="objectVersion", role_arn="roleArn" ), tags=[CfnTag( key="key", value="value" )], version="version" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::GameLift::Script.- Parameters:
props (
Union[CfnScriptMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['name', 'storageLocation', 'tags', 'version']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
S3LocationProperty
- class CfnScriptPropsMixin.S3LocationProperty(*, bucket=None, key=None, object_version=None, role_arn=None)
Bases:
objectThe location in Amazon S3 where build or script files can be stored for access by Amazon GameLift.
- Parameters:
bucket (
Optional[str]) – An Amazon S3 bucket identifier. Thename of the S3 bucket. .. epigraph:: Amazon GameLift Servers doesn’t support uploading from Amazon S3 buckets with names that contain a dot (.).key (
Optional[str]) – The name of the zip file that contains the build files or script files.object_version (
Optional[str]) – The version of the file, if object versioning is turned on for the bucket. Amazon GameLift Servers uses this information when retrieving files from an S3 bucket that you own. Use this parameter to specify a specific version of the file. If not set, the latest version of the file is retrieved.role_arn (
Optional[str]) – The Amazon Resource Name ( ARN ) for an IAM role that allows Amazon GameLift Servers to access the S3 bucket.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_gamelift import mixins as gamelift_mixins s3_location_property = gamelift_mixins.CfnScriptPropsMixin.S3LocationProperty( bucket="bucket", key="key", object_version="objectVersion", role_arn="roleArn" )
Attributes
- bucket
An Amazon S3 bucket identifier. Thename of the S3 bucket.
Amazon GameLift Servers doesn’t support uploading from Amazon S3 buckets with names that contain a dot (.).
- key
The name of the zip file that contains the build files or script files.
- object_version
The version of the file, if object versioning is turned on for the bucket.
Amazon GameLift Servers uses this information when retrieving files from an S3 bucket that you own. Use this parameter to specify a specific version of the file. If not set, the latest version of the file is retrieved.