CfnContainerGroupDefinition
- class aws_cdk.aws_gamelift.CfnContainerGroupDefinition(scope, id, *, container_definitions, name, operating_system, total_cpu_limit, total_memory_limit, scheduling_strategy=None, tags=None)
Bases:
CfnResource
This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
The properties that describe a container group resource. Container group definition properties can’t be updated. To change a property, create a new container group definition.
Used with:
CreateContainerGroupDefinition
Returned by:
DescribeContainerGroupDefinition
,ListContainerGroupDefinitions
- See:
- CloudformationResource:
AWS::GameLift::ContainerGroupDefinition
- 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 import aws_gamelift as gamelift cfn_container_group_definition = gamelift.CfnContainerGroupDefinition(self, "MyCfnContainerGroupDefinition", container_definitions=[gamelift.CfnContainerGroupDefinition.ContainerDefinitionProperty( container_name="containerName", image_uri="imageUri", # the properties below are optional command=["command"], cpu=123, depends_on=[gamelift.CfnContainerGroupDefinition.ContainerDependencyProperty( condition="condition", container_name="containerName" )], entry_point=["entryPoint"], environment=[gamelift.CfnContainerGroupDefinition.ContainerEnvironmentProperty( name="name", value="value" )], essential=False, health_check=gamelift.CfnContainerGroupDefinition.ContainerHealthCheckProperty( command=["command"], # the properties below are optional interval=123, retries=123, start_period=123, timeout=123 ), memory_limits=gamelift.CfnContainerGroupDefinition.MemoryLimitsProperty( hard_limit=123, soft_limit=123 ), port_configuration=gamelift.CfnContainerGroupDefinition.PortConfigurationProperty( container_port_ranges=[gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty( from_port=123, protocol="protocol", to_port=123 )] ), resolved_image_digest="resolvedImageDigest", working_directory="workingDirectory" )], name="name", operating_system="operatingSystem", total_cpu_limit=123, total_memory_limit=123, # the properties below are optional scheduling_strategy="schedulingStrategy", tags=[CfnTag( key="key", value="value" )] )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).container_definitions (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ContainerDefinitionProperty
,Dict
[str
,Any
]]]]) – The set of container definitions that are included in the container group.name (
str
) – A descriptive identifier for the container group definition. The name value is unique in an AWS Region.operating_system (
str
) – The platform required for all containers in the container group definition.total_cpu_limit (
Union
[int
,float
]) – The amount of CPU units on a fleet instance to allocate for the container group. All containers in the group share these resources. This property is an integer value in CPU units (1 vCPU is equal to 1024 CPU units). You can set additional limits for eachContainerDefinition
in the group. If individual containers have limits, this value must be equal to or greater than the sum of all container-specific CPU limits in the group. For more details on memory allocation, see the Container fleet design guide .total_memory_limit (
Union
[int
,float
]) –The amount of memory (in MiB) on a fleet instance to allocate for the container group. All containers in the group share these resources. You can set additional limits for each
ContainerDefinition
in the group. If individual containers have limits, this value must meet the following requirements: - Equal to or greater than the sum of all container-specific soft memory limits in the group. - Equal to or greater than any container-specific hard limits in the group. For more details on memory allocation, see the Container fleet design guide .scheduling_strategy (
Optional
[str
]) – The method for deploying the container group across fleet instances. A replica container group might have multiple copies on each fleet instance. A daemon container group maintains only one copy per fleet instance.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – An array of key-value pairs to apply to this resource.
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_dependency(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_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
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.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
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:
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" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermediate 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
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
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 resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
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.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
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.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- 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
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- 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::ContainerGroupDefinition'
- attr_container_group_definition_arn
//docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html>`_ ) that is assigned to an Amazon GameLift
ContainerGroupDefinition
resource. It uniquely identifies the resource across all AWS Regions. Format isarn:aws:gamelift:<region>::containergroupdefinition/[container group definition name]
.- CloudformationAttribute:
ContainerGroupDefinitionArn
- Type:
The Amazon Resource Name ( `ARN <https
- attr_creation_time
A time stamp indicating when this data object was created.
Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).- CloudformationAttribute:
CreationTime
- cdk_tag_manager
Tag Manager which manages the tags for this resource.
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- container_definitions
The set of container definitions that are included in the container group.
- 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.
- 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)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- name
A descriptive identifier for the container group definition.
- node
The tree node.
- operating_system
The platform required for all containers in the container group definition.
- 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 })
.
- scheduling_strategy
The method for deploying the container group across fleet instances.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- tags
An array of key-value pairs to apply to this resource.
- total_cpu_limit
The amount of CPU units on a fleet instance to allocate for the container group.
- total_memory_limit
The amount of memory (in MiB) on a fleet instance to allocate for the container group.
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(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
ContainerDefinitionProperty
- class CfnContainerGroupDefinition.ContainerDefinitionProperty(*, container_name, image_uri, command=None, cpu=None, depends_on=None, entry_point=None, environment=None, essential=None, health_check=None, memory_limits=None, port_configuration=None, resolved_image_digest=None, working_directory=None)
Bases:
object
This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
Describes a container in a container fleet, the resources available to the container, and the commands that are run when the container starts. Container properties can’t be updated. To change a property, create a new container group definition. See also
ContainerDefinitionInput
.Part of:
ContainerGroupDefinition
Returned by:
DescribeContainerGroupDefinition
,ListContainerGroupDefinitions
- Parameters:
container_name (
str
) – The container definition identifier. Container names are unique within a container group definition.image_uri (
str
) – The URI to the image that $short; copied and deployed to a container fleet. For a more specific identifier, seeResolvedImageDigest
.command (
Optional
[Sequence
[str
]]) – A command that’s passed to the container on startup. Each argument for the command is an additional string in the array. See the ContainerDefinition::command parameter in the Amazon Elastic Container Service API reference.cpu (
Union
[int
,float
,None
]) – The number of CPU units that are reserved for the container. Note: 1 vCPU unit equals 1024 CPU units. If no resources are reserved, the container shares the total CPU limit for the container group. Related data type:ContainerGroupDefinition$TotalCpuLimit
depends_on (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ContainerDependencyProperty
,Dict
[str
,Any
]]],None
]) – Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.entry_point (
Optional
[Sequence
[str
]]) – The entry point that’s passed to the container on startup. If there are multiple arguments, each argument is an additional string in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference .environment (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ContainerEnvironmentProperty
,Dict
[str
,Any
]]],None
]) – A set of environment variables that’s passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference .essential (
Union
[bool
,IResolvable
,None
]) – Indicates whether the container is vital to the container group. If an essential container fails, the entire container group is restarted.health_check (
Union
[IResolvable
,ContainerHealthCheckProperty
,Dict
[str
,Any
],None
]) – A configuration for a non-terminal health check. A container, which automatically restarts if it stops functioning, also restarts if it fails this health check. If an essential container in the daemon group fails a health check, the entire container group is restarted. The essential container in the replica group doesn’t use this health check mechanism, because the Amazon GameLift Agent automatically handles the task.memory_limits (
Union
[IResolvable
,MemoryLimitsProperty
,Dict
[str
,Any
],None
]) – The amount of memory that Amazon GameLift makes available to the container. If memory limits aren’t set for an individual container, the container shares the container group’s total memory allocation. Related data type:ContainerGroupDefinition$TotalMemoryLimit
port_configuration (
Union
[IResolvable
,PortConfigurationProperty
,Dict
[str
,Any
],None
]) – Defines the ports that are available to assign to processes in the container. For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren’t directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet’sConnectionPortRange
.resolved_image_digest (
Optional
[str
]) – A unique and immutable identifier for the container image that is deployed to a container fleet. The digest is a SHA 256 hash of the container image manifest.working_directory (
Optional
[str
]) – The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API Reference .
- 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 import aws_gamelift as gamelift container_definition_property = gamelift.CfnContainerGroupDefinition.ContainerDefinitionProperty( container_name="containerName", image_uri="imageUri", # the properties below are optional command=["command"], cpu=123, depends_on=[gamelift.CfnContainerGroupDefinition.ContainerDependencyProperty( condition="condition", container_name="containerName" )], entry_point=["entryPoint"], environment=[gamelift.CfnContainerGroupDefinition.ContainerEnvironmentProperty( name="name", value="value" )], essential=False, health_check=gamelift.CfnContainerGroupDefinition.ContainerHealthCheckProperty( command=["command"], # the properties below are optional interval=123, retries=123, start_period=123, timeout=123 ), memory_limits=gamelift.CfnContainerGroupDefinition.MemoryLimitsProperty( hard_limit=123, soft_limit=123 ), port_configuration=gamelift.CfnContainerGroupDefinition.PortConfigurationProperty( container_port_ranges=[gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty( from_port=123, protocol="protocol", to_port=123 )] ), resolved_image_digest="resolvedImageDigest", working_directory="workingDirectory" )
Attributes
- command
A command that’s passed to the container on startup.
Each argument for the command is an additional string in the array. See the ContainerDefinition::command parameter in the Amazon Elastic Container Service API reference.
- container_name
The container definition identifier.
Container names are unique within a container group definition.
- cpu
The number of CPU units that are reserved for the container.
Note: 1 vCPU unit equals 1024 CPU units. If no resources are reserved, the container shares the total CPU limit for the container group.
Related data type:
ContainerGroupDefinition$TotalCpuLimit
- depends_on
Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences.
A container might have dependencies on multiple containers.
- entry_point
The entry point that’s passed to the container on startup.
If there are multiple arguments, each argument is an additional string in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference .
- environment
A set of environment variables that’s passed to the container on startup.
See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference .
- essential
Indicates whether the container is vital to the container group.
If an essential container fails, the entire container group is restarted.
- health_check
A configuration for a non-terminal health check.
A container, which automatically restarts if it stops functioning, also restarts if it fails this health check. If an essential container in the daemon group fails a health check, the entire container group is restarted. The essential container in the replica group doesn’t use this health check mechanism, because the Amazon GameLift Agent automatically handles the task.
- image_uri
The URI to the image that $short;
copied and deployed to a container fleet. For a more specific identifier, see
ResolvedImageDigest
.
- memory_limits
The amount of memory that Amazon GameLift makes available to the container.
If memory limits aren’t set for an individual container, the container shares the container group’s total memory allocation.
Related data type:
ContainerGroupDefinition$TotalMemoryLimit
- port_configuration
Defines the ports that are available to assign to processes in the container.
For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren’t directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet’s
ConnectionPortRange
.
- resolved_image_digest
A unique and immutable identifier for the container image that is deployed to a container fleet.
The digest is a SHA 256 hash of the container image manifest.
- working_directory
The directory in the container where commands are run.
See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API Reference .
ContainerDependencyProperty
- class CfnContainerGroupDefinition.ContainerDependencyProperty(*, condition, container_name)
Bases:
object
This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
A container’s dependency on another container in the same container group. The dependency impacts how the dependent container is able to start or shut down based the status of the other container.
For example, ContainerA is configured with the following dependency: a
START
dependency on ContainerB. This means that ContainerA can’t start until ContainerB has started. It also means that ContainerA must shut down before ContainerB.Part of:
ContainerDefinition
- Parameters:
condition (
str
) – The condition that the dependency container must reach before the dependent container can start. Valid conditions include:. - START - The dependency container must have started. - COMPLETE - The dependency container has run to completion (exits). Use this condition with nonessential containers, such as those that run a script and then exit. The dependency container can’t be an essential container. - SUCCESS - The dependency container has run to completion and exited with a zero status. The dependency container can’t be an essential container. - HEALTHY - The dependency container has passed its Docker health check. Use this condition with dependency containers that have health checks configured. This condition is confirmed at container group startup only.container_name (
str
) – A descriptive label for the container definition that this container depends on.
- 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 import aws_gamelift as gamelift container_dependency_property = gamelift.CfnContainerGroupDefinition.ContainerDependencyProperty( condition="condition", container_name="containerName" )
Attributes
- condition
.
START - The dependency container must have started.
COMPLETE - The dependency container has run to completion (exits). Use this condition with nonessential containers, such as those that run a script and then exit. The dependency container can’t be an essential container.
SUCCESS - The dependency container has run to completion and exited with a zero status. The dependency container can’t be an essential container.
HEALTHY - The dependency container has passed its Docker health check. Use this condition with dependency containers that have health checks configured. This condition is confirmed at container group startup only.
- See:
- Type:
The condition that the dependency container must reach before the dependent container can start. Valid conditions include
- container_name
A descriptive label for the container definition that this container depends on.
ContainerEnvironmentProperty
- class CfnContainerGroupDefinition.ContainerEnvironmentProperty(*, name, value)
Bases:
object
This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
An environment variable to set inside a container, in the form of a key-value pair.
Related data type:
ContainerDefinition$Environment
- Parameters:
name (
str
) – The environment variable name.value (
str
) – The environment variable value.
- 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 import aws_gamelift as gamelift container_environment_property = gamelift.CfnContainerGroupDefinition.ContainerEnvironmentProperty( name="name", value="value" )
Attributes
- name
The environment variable name.
ContainerHealthCheckProperty
- class CfnContainerGroupDefinition.ContainerHealthCheckProperty(*, command, interval=None, retries=None, start_period=None, timeout=None)
Bases:
object
Instructions on when and how to check the health of a container in a container fleet.
When health check properties are set in a container definition, they override any Docker health checks in the container image. For more information on container health checks, see HealthCheck command in the Amazon Elastic Container Service API .
The following example instructions tell the container to wait 100 seconds after launch before counting failed health checks, then initiate the health check command every 60 seconds. After issuing the health check command, wait 10 seconds for it to succeed. If it fails, retry the command 3 times before considering the container to be unhealthy.
{"Command": [ "CMD-SHELL", "ps cax | grep "processmanager" || exit 1" ], "Interval": 300, "Timeout": 30, "Retries": 5, "StartPeriod": 100 }
Part of:
ContainerDefinition$HealthCheck
- Parameters:
command (
Sequence
[str
]) – A string array that specifies the command that the container runs to determine if it’s healthy.interval (
Union
[int
,float
,None
]) – The time period (in seconds) between each health check.retries (
Union
[int
,float
,None
]) – The number of times to retry a failed health check before the container is considered unhealthy. The first run of the command does not count as a retry.start_period (
Union
[int
,float
,None
]) – The optional grace period (in seconds) to give a container time to bootstrap before the first failed health check counts toward the number of retries.timeout (
Union
[int
,float
,None
]) – The time period (in seconds) to wait for a health check to succeed before a failed health check is counted.
- 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 import aws_gamelift as gamelift container_health_check_property = gamelift.CfnContainerGroupDefinition.ContainerHealthCheckProperty( command=["command"], # the properties below are optional interval=123, retries=123, start_period=123, timeout=123 )
Attributes
- command
A string array that specifies the command that the container runs to determine if it’s healthy.
- interval
The time period (in seconds) between each health check.
- retries
The number of times to retry a failed health check before the container is considered unhealthy.
The first run of the command does not count as a retry.
- start_period
The optional grace period (in seconds) to give a container time to bootstrap before the first failed health check counts toward the number of retries.
- timeout
The time period (in seconds) to wait for a health check to succeed before a failed health check is counted.
ContainerPortRangeProperty
- class CfnContainerGroupDefinition.ContainerPortRangeProperty(*, from_port, protocol, to_port)
Bases:
object
This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
A set of one or more port numbers that can be opened on the container.
Part of:
ContainerPortConfiguration
- Parameters:
from_port (
Union
[int
,float
]) – A starting value for the range of allowed port numbers.protocol (
str
) – The network protocol that these ports support.to_port (
Union
[int
,float
]) – An ending value for the range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater thanFromPort
.
- 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 import aws_gamelift as gamelift container_port_range_property = gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty( from_port=123, protocol="protocol", to_port=123 )
Attributes
- from_port
A starting value for the range of allowed port numbers.
- protocol
The network protocol that these ports support.
- to_port
An ending value for the range of allowed port numbers.
Port numbers are end-inclusive. This value must be equal to or greater than
FromPort
.
MemoryLimitsProperty
- class CfnContainerGroupDefinition.MemoryLimitsProperty(*, hard_limit=None, soft_limit=None)
Bases:
object
Specifies how much memory is available to the container.
- Parameters:
hard_limit (
Union
[int
,float
,None
]) – The hard limit of memory to reserve for the container.soft_limit (
Union
[int
,float
,None
]) – The amount of memory that is reserved for the container.
- 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 import aws_gamelift as gamelift memory_limits_property = gamelift.CfnContainerGroupDefinition.MemoryLimitsProperty( hard_limit=123, soft_limit=123 )
Attributes
- hard_limit
The hard limit of memory to reserve for the container.
- soft_limit
The amount of memory that is reserved for the container.
PortConfigurationProperty
- class CfnContainerGroupDefinition.PortConfigurationProperty(*, container_port_ranges)
Bases:
object
Defines the ports on a container.
- Parameters:
container_port_ranges (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ContainerPortRangeProperty
,Dict
[str
,Any
]]]]) – Specifies one or more ranges of ports on a container.- 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 import aws_gamelift as gamelift port_configuration_property = gamelift.CfnContainerGroupDefinition.PortConfigurationProperty( container_port_ranges=[gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty( from_port=123, protocol="protocol", to_port=123 )] )
Attributes
- container_port_ranges
Specifies one or more ranges of ports on a container.