Class CfnContainerGroupDefinition
- All Implemented Interfaces:
IInspectable,IContainerGroupDefinitionRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
You can update all properties of a container group definition properties. Updates to a container group definition are saved as new versions.
Used with: CreateContainerGroupDefinition
Returned by: DescribeContainerGroupDefinition , ListContainerGroupDefinitions , UpdateContainerGroupDefinition
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.gamelift.*;
CfnContainerGroupDefinition cfnContainerGroupDefinition = CfnContainerGroupDefinition.Builder.create(this, "MyCfnContainerGroupDefinition")
.name("name")
.operatingSystem("operatingSystem")
.totalMemoryLimitMebibytes(123)
.totalVcpuLimit(123)
// the properties below are optional
.containerGroupType("containerGroupType")
.gameServerContainerDefinition(GameServerContainerDefinitionProperty.builder()
.containerName("containerName")
.imageUri("imageUri")
.serverSdkVersion("serverSdkVersion")
// the properties below are optional
.dependsOn(List.of(ContainerDependencyProperty.builder()
.condition("condition")
.containerName("containerName")
.build()))
.environmentOverride(List.of(ContainerEnvironmentProperty.builder()
.name("name")
.value("value")
.build()))
.mountPoints(List.of(ContainerMountPointProperty.builder()
.instancePath("instancePath")
// the properties below are optional
.accessLevel("accessLevel")
.containerPath("containerPath")
.build()))
.portConfiguration(PortConfigurationProperty.builder()
.containerPortRanges(List.of(ContainerPortRangeProperty.builder()
.fromPort(123)
.protocol("protocol")
.toPort(123)
.build()))
.build())
.resolvedImageDigest("resolvedImageDigest")
.build())
.sourceVersionNumber(123)
.supportContainerDefinitions(List.of(SupportContainerDefinitionProperty.builder()
.containerName("containerName")
.imageUri("imageUri")
// the properties below are optional
.dependsOn(List.of(ContainerDependencyProperty.builder()
.condition("condition")
.containerName("containerName")
.build()))
.environmentOverride(List.of(ContainerEnvironmentProperty.builder()
.name("name")
.value("value")
.build()))
.essential(false)
.healthCheck(ContainerHealthCheckProperty.builder()
.command(List.of("command"))
// the properties below are optional
.interval(123)
.retries(123)
.startPeriod(123)
.timeout(123)
.build())
.memoryHardLimitMebibytes(123)
.mountPoints(List.of(ContainerMountPointProperty.builder()
.instancePath("instancePath")
// the properties below are optional
.accessLevel("accessLevel")
.containerPath("containerPath")
.build()))
.portConfiguration(PortConfigurationProperty.builder()
.containerPortRanges(List.of(ContainerPortRangeProperty.builder()
.fromPort(123)
.protocol("protocol")
.toPort(123)
.build()))
.build())
.resolvedImageDigest("resolvedImageDigest")
.vcpu(123)
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.versionDescription("versionDescription")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnContainerGroupDefinition.static interfaceA container's dependency on another container in the same container group.static interfaceAn environment variable to set inside a container, in the form of a key-value pair.static interfaceInstructions on when and how to check the health of a support container in a container fleet.static interfaceA mount point that binds a container to a file or directory on the host system.static interfaceA set of one or more port numbers that can be opened on the container, and the supported network protocol.static interfaceDescribes the game server container in an existing game server container group.static interfaceDefines the ports on a container.static interfaceDescribes a support container in a container group.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.gamelift.IContainerGroupDefinitionRef
IContainerGroupDefinitionRef.Jsii$Default, IContainerGroupDefinitionRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnContainerGroupDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnContainerGroupDefinition(software.amazon.jsii.JsiiObjectRef objRef) CfnContainerGroupDefinition(software.constructs.Construct scope, String id, CfnContainerGroupDefinitionProps props) Create a newAWS::GameLift::ContainerGroupDefinition. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringThe Amazon Resource Name ( ARN ) that is assigned to an Amazon GameLift ServersContainerGroupDefinitionresource.A time stamp indicating when this data object was created.Current status of the container group definition resource.Additional information about a container group definition that's inFAILEDstatus.Indicates the version of a particular container group definition.Tag Manager which manages the tags for this resource.A reference to a ContainerGroupDefinition resource.The type of container group.The definition for the game server container in this group.getName()A descriptive identifier for the container group definition.The platform that all containers in the container group definition run on.A specific ContainerGroupDefinition version to be updated.The set of definitions for support containers in this group.getTags()An array of key-value pairs to apply to this resource.The amount of memory (in MiB) on a fleet instance to allocate for the container group.The amount of vCPU units on a fleet instance to allocate for the container group (1 vCPU is equal to 1024 CPU units).An optional description that was provided for a container group definition update.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnContainerGroupDefinition.renderProperties(Map<String, Object> props) voidsetContainerGroupType(String value) The type of container group.voidThe definition for the game server container in this group.voidsetGameServerContainerDefinition(CfnContainerGroupDefinition.GameServerContainerDefinitionProperty value) The definition for the game server container in this group.voidA descriptive identifier for the container group definition.voidsetOperatingSystem(String value) The platform that all containers in the container group definition run on.voidsetSourceVersionNumber(Number value) A specific ContainerGroupDefinition version to be updated.voidsetSupportContainerDefinitions(List<Object> value) The set of definitions for support containers in this group.voidThe set of definitions for support containers in this group.voidAn array of key-value pairs to apply to this resource.voidThe amount of memory (in MiB) on a fleet instance to allocate for the container group.voidsetTotalVcpuLimit(Number value) The amount of vCPU units on a fleet instance to allocate for the container group (1 vCPU is equal to 1024 CPU units).voidsetVersionDescription(String value) An optional description that was provided for a container group definition update.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnContainerGroupDefinition
protected CfnContainerGroupDefinition(software.amazon.jsii.JsiiObjectRef objRef) -
CfnContainerGroupDefinition
protected CfnContainerGroupDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnContainerGroupDefinition
@Stability(Stable) public CfnContainerGroupDefinition(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnContainerGroupDefinitionProps props) Create a newAWS::GameLift::ContainerGroupDefinition.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForContainerGroupDefinition
@Stability(Stable) @NotNull public static String arnForContainerGroupDefinition(@NotNull IContainerGroupDefinitionRef resource) - Parameters:
resource- This parameter is required.
-
isCfnContainerGroupDefinition
Checks whether the given object is a CfnContainerGroupDefinition.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrContainerGroupDefinitionArn
The Amazon Resource Name ( ARN ) that is assigned to an Amazon GameLift ServersContainerGroupDefinitionresource. It uniquely identifies the resource across all AWS Regions. Format isarn:aws:gamelift:[region]::containergroupdefinition/[container group definition name]:[version]. -
getAttrCreationTime
A time stamp indicating when this data object was created.Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"). -
getAttrStatus
Current status of the container group definition resource. Values include:.COPYING-- Amazon GameLift Servers is in the process of making copies of all container images that are defined in the group. While in this state, the resource can't be used to create a container fleet.READY-- Amazon GameLift Servers has copied the registry images for all containers that are defined in the group. You can use a container group definition in this status to create a container fleet.FAILED-- Amazon GameLift Servers failed to create a valid container group definition resource. For more details on the cause of the failure, seeStatusReason. A container group definition resource in failed status will be deleted within a few minutes.
-
getAttrStatusReason
Additional information about a container group definition that's inFAILEDstatus. Possible reasons include:.- An internal issue prevented Amazon GameLift Servers from creating the container group definition resource. Delete the failed resource and call CreateContainerGroupDefinition again.
- An access-denied message means that you don't have permissions to access the container image on ECR. See IAM permission examples for help setting up required IAM permissions for Amazon GameLift Servers.
- The
ImageUrivalue for at least one of the containers in the container group definition was invalid or not found in the current AWS account. - At least one of the container images referenced in the container group definition exceeds the allowed size. For size limits, see Amazon GameLift Servers endpoints and quotas .
- At least one of the container images referenced in the container group definition uses a different operating system than the one defined for the container group.
-
getAttrVersionNumber
Indicates the version of a particular container group definition.This number is incremented automatically when you update a container group definition. You can view, update, or delete individual versions or the entire container group definition.
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getContainerGroupDefinitionRef
@Stability(Stable) @NotNull public ContainerGroupDefinitionReference getContainerGroupDefinitionRef()A reference to a ContainerGroupDefinition resource.- Specified by:
getContainerGroupDefinitionRefin interfaceIContainerGroupDefinitionRef
-
getName
A descriptive identifier for the container group definition. -
setName
A descriptive identifier for the container group definition. -
getOperatingSystem
The platform that all containers in the container group definition run on. -
setOperatingSystem
The platform that all containers in the container group definition run on. -
getTotalMemoryLimitMebibytes
The amount of memory (in MiB) on a fleet instance to allocate for the container group. -
setTotalMemoryLimitMebibytes
The amount of memory (in MiB) on a fleet instance to allocate for the container group. -
getTotalVcpuLimit
The amount of vCPU units on a fleet instance to allocate for the container group (1 vCPU is equal to 1024 CPU units). -
setTotalVcpuLimit
The amount of vCPU units on a fleet instance to allocate for the container group (1 vCPU is equal to 1024 CPU units). -
getContainerGroupType
The type of container group. -
setContainerGroupType
The type of container group. -
getGameServerContainerDefinition
The definition for the game server container in this group.Returns union: either
IResolvableorCfnContainerGroupDefinition.GameServerContainerDefinitionProperty -
setGameServerContainerDefinition
The definition for the game server container in this group. -
setGameServerContainerDefinition
@Stability(Stable) public void setGameServerContainerDefinition(@Nullable CfnContainerGroupDefinition.GameServerContainerDefinitionProperty value) The definition for the game server container in this group. -
getSourceVersionNumber
A specific ContainerGroupDefinition version to be updated. -
setSourceVersionNumber
A specific ContainerGroupDefinition version to be updated. -
getSupportContainerDefinitions
The set of definitions for support containers in this group.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnContainerGroupDefinition.SupportContainerDefinitionProperty> -
setSupportContainerDefinitions
The set of definitions for support containers in this group. -
setSupportContainerDefinitions
The set of definitions for support containers in this group. -
getTags
An array of key-value pairs to apply to this resource. -
setTags
An array of key-value pairs to apply to this resource. -
getVersionDescription
An optional description that was provided for a container group definition update. -
setVersionDescription
An optional description that was provided for a container group definition update.
-