CfnAliasPropsMixin
- class aws_cdk.mixins_preview.aws_gamelift.mixins.CfnAliasPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::GameLift::Aliasresource creates an alias for an Amazon GameLift (GameLift) fleet destination.There are two types of routing strategies for aliases: simple and terminal. A simple alias points to an active fleet. A terminal alias displays a message instead of routing players to an active fleet. For example, a terminal alias might display a URL link that directs players to an upgrade site. You can use aliases to define destinations in a game session queue or when requesting new game sessions.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html
- CloudformationResource:
AWS::GameLift::Alias
- 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_alias_props_mixin = gamelift_mixins.CfnAliasPropsMixin(gamelift_mixins.CfnAliasMixinProps( description="description", name="name", routing_strategy=gamelift_mixins.CfnAliasPropsMixin.RoutingStrategyProperty( fleet_id="fleetId", message="message", type="type" ), tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::GameLift::Alias.- Parameters:
props (
Union[CfnAliasMixinProps,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 = ['description', 'name', 'routingStrategy', 'tags']
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
RoutingStrategyProperty
- class CfnAliasPropsMixin.RoutingStrategyProperty(*, fleet_id=None, message=None, type=None)
Bases:
objectThe routing configuration for a fleet alias.
- Parameters:
fleet_id (
Optional[str]) – A unique identifier for a fleet that the alias points to. If you specifySIMPLEfor theTypeproperty, you must specify this property.message (
Optional[str]) – The message text to be used with a terminal routing strategy. If you specifyTERMINALfor theTypeproperty, you must specify this property.type (
Optional[str]) – A type of routing strategy. Possible routing types include the following: - SIMPLE - The alias resolves to one specific fleet. Use this type when routing to active fleets. - TERMINAL - The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws aTerminalRoutingStrategyExceptionwith the message that you specified in theMessageproperty.
- 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 routing_strategy_property = gamelift_mixins.CfnAliasPropsMixin.RoutingStrategyProperty( fleet_id="fleetId", message="message", type="type" )
Attributes
- fleet_id
A unique identifier for a fleet that the alias points to.
If you specify
SIMPLEfor theTypeproperty, you must specify this property.
- message
The message text to be used with a terminal routing strategy.
If you specify
TERMINALfor theTypeproperty, you must specify this property.
- type
A type of routing strategy.
Possible routing types include the following:
SIMPLE - The alias resolves to one specific fleet. Use this type when routing to active fleets.
TERMINAL - The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a
TerminalRoutingStrategyExceptionwith the message that you specified in theMessageproperty.