CfnGameServerGroup

class aws_cdk.aws_gamelift.CfnGameServerGroup(scope, id, *, game_server_group_name, instance_definitions, launch_template, role_arn, auto_scaling_policy=None, balancing_strategy=None, delete_option=None, game_server_protection_policy=None, max_size=None, min_size=None, tags=None, vpc_subnets=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::GameLift::GameServerGroup.

CloudformationResource

AWS::GameLift::GameServerGroup

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html

Create a new AWS::GameLift::GameServerGroup.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • game_server_group_name (str) – AWS::GameLift::GameServerGroup.GameServerGroupName.

  • instance_definitions (Union[IResolvable, Sequence[Union[IResolvable, InstanceDefinitionProperty]]]) – AWS::GameLift::GameServerGroup.InstanceDefinitions.

  • launch_template (Union[IResolvable, LaunchTemplateProperty]) – AWS::GameLift::GameServerGroup.LaunchTemplate.

  • role_arn (str) – AWS::GameLift::GameServerGroup.RoleArn.

  • auto_scaling_policy (Union[IResolvable, AutoScalingPolicyProperty, None]) – AWS::GameLift::GameServerGroup.AutoScalingPolicy.

  • balancing_strategy (Optional[str]) – AWS::GameLift::GameServerGroup.BalancingStrategy.

  • delete_option (Optional[str]) – AWS::GameLift::GameServerGroup.DeleteOption.

  • game_server_protection_policy (Optional[str]) – AWS::GameLift::GameServerGroup.GameServerProtectionPolicy.

  • max_size (Union[int, float, None]) – AWS::GameLift::GameServerGroup.MaxSize.

  • min_size (Union[int, float, None]) – AWS::GameLift::GameServerGroup.MinSize.

  • tags (Optional[Sequence[CfnTag]]) – AWS::GameLift::GameServerGroup.Tags.

  • vpc_subnets (Optional[Sequence[str]]) – AWS::GameLift::GameServerGroup.VpcSubnets.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

# Example automatically generated. See https://github.com/aws/jsii/issues/826
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}
Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::GameLift::GameServerGroup'
attr_auto_scaling_group_arn

AutoScalingGroupArn

Type

cloudformationAttribute

Return type

str

attr_game_server_group_arn

GameServerGroupArn

Type

cloudformationAttribute

Return type

str

auto_scaling_policy

AWS::GameLift::GameServerGroup.AutoScalingPolicy.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-autoscalingpolicy

Return type

Union[IResolvable, AutoScalingPolicyProperty, None]

balancing_strategy

AWS::GameLift::GameServerGroup.BalancingStrategy.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-balancingstrategy

Return type

Optional[str]

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

Return type

List[str]

delete_option

AWS::GameLift::GameServerGroup.DeleteOption.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-deleteoption

Return type

Optional[str]

game_server_group_name

AWS::GameLift::GameServerGroup.GameServerGroupName.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-gameservergroupname

Return type

str

game_server_protection_policy

AWS::GameLift::GameServerGroup.GameServerProtectionPolicy.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-gameserverprotectionpolicy

Return type

Optional[str]

instance_definitions

AWS::GameLift::GameServerGroup.InstanceDefinitions.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-instancedefinitions

Return type

Union[IResolvable, List[Union[IResolvable, InstanceDefinitionProperty]]]

launch_template

AWS::GameLift::GameServerGroup.LaunchTemplate.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-launchtemplate

Return type

Union[IResolvable, LaunchTemplateProperty]

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Return type

str

Returns

the logical ID as a stringified token. This value will only get resolved during synthesis.

max_size

AWS::GameLift::GameServerGroup.MaxSize.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-maxsize

Return type

Union[int, float, None]

min_size

AWS::GameLift::GameServerGroup.MinSize.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-minsize

Return type

Union[int, float, None]

node

The construct tree node associated with this construct.

Return type

ConstructNode

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Return type

str

role_arn

AWS::GameLift::GameServerGroup.RoleArn.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-rolearn

Return type

str

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

tags

AWS::GameLift::GameServerGroup.Tags.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-tags

Return type

TagManager

vpc_subnets

AWS::GameLift::GameServerGroup.VpcSubnets.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-gameservergroup.html#cfn-gamelift-gameservergroup-vpcsubnets

Return type

Optional[List[str]]

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

Return type

bool

Returns

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

AutoScalingPolicyProperty

class CfnGameServerGroup.AutoScalingPolicyProperty(*, target_tracking_configuration, estimated_instance_warmup=None)

Bases: object

Parameters
  • target_tracking_configuration (Union[IResolvable, TargetTrackingConfigurationProperty]) – CfnGameServerGroup.AutoScalingPolicyProperty.TargetTrackingConfiguration.

  • estimated_instance_warmup (Union[int, float, None]) – CfnGameServerGroup.AutoScalingPolicyProperty.EstimatedInstanceWarmup.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-autoscalingpolicy.html

Attributes

estimated_instance_warmup

CfnGameServerGroup.AutoScalingPolicyProperty.EstimatedInstanceWarmup.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-autoscalingpolicy.html#cfn-gamelift-gameservergroup-autoscalingpolicy-estimatedinstancewarmup

Return type

Union[int, float, None]

target_tracking_configuration

CfnGameServerGroup.AutoScalingPolicyProperty.TargetTrackingConfiguration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-autoscalingpolicy.html#cfn-gamelift-gameservergroup-autoscalingpolicy-targettrackingconfiguration

Return type

Union[IResolvable, TargetTrackingConfigurationProperty]

InstanceDefinitionProperty

class CfnGameServerGroup.InstanceDefinitionProperty(*, instance_type, weighted_capacity=None)

Bases: object

Parameters
  • instance_type (str) – CfnGameServerGroup.InstanceDefinitionProperty.InstanceType.

  • weighted_capacity (Optional[str]) – CfnGameServerGroup.InstanceDefinitionProperty.WeightedCapacity.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-instancedefinition.html

Attributes

instance_type

CfnGameServerGroup.InstanceDefinitionProperty.InstanceType.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-instancedefinition.html#cfn-gamelift-gameservergroup-instancedefinition-instancetype

Return type

str

weighted_capacity

CfnGameServerGroup.InstanceDefinitionProperty.WeightedCapacity.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-instancedefinition.html#cfn-gamelift-gameservergroup-instancedefinition-weightedcapacity

Return type

Optional[str]

LaunchTemplateProperty

class CfnGameServerGroup.LaunchTemplateProperty(*, launch_template_id=None, launch_template_name=None, version=None)

Bases: object

Parameters
  • launch_template_id (Optional[str]) – CfnGameServerGroup.LaunchTemplateProperty.LaunchTemplateId.

  • launch_template_name (Optional[str]) – CfnGameServerGroup.LaunchTemplateProperty.LaunchTemplateName.

  • version (Optional[str]) – CfnGameServerGroup.LaunchTemplateProperty.Version.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-launchtemplate.html

Attributes

launch_template_id

CfnGameServerGroup.LaunchTemplateProperty.LaunchTemplateId.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-launchtemplate.html#cfn-gamelift-gameservergroup-launchtemplate-launchtemplateid

Return type

Optional[str]

launch_template_name

CfnGameServerGroup.LaunchTemplateProperty.LaunchTemplateName.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-launchtemplate.html#cfn-gamelift-gameservergroup-launchtemplate-launchtemplatename

Return type

Optional[str]

version

CfnGameServerGroup.LaunchTemplateProperty.Version.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-launchtemplate.html#cfn-gamelift-gameservergroup-launchtemplate-version

Return type

Optional[str]

TargetTrackingConfigurationProperty

class CfnGameServerGroup.TargetTrackingConfigurationProperty(*, target_value)

Bases: object

Parameters

target_value (Union[int, float]) – CfnGameServerGroup.TargetTrackingConfigurationProperty.TargetValue.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-targettrackingconfiguration.html

Attributes

target_value

CfnGameServerGroup.TargetTrackingConfigurationProperty.TargetValue.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-targettrackingconfiguration.html#cfn-gamelift-gameservergroup-targettrackingconfiguration-targetvalue

Return type

Union[int, float]