Class CfnContainerGroupDefinition

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.gamelift.CfnContainerGroupDefinition
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.494Z") @Stability(Stable) public class CfnContainerGroupDefinition extends CfnResource implements IInspectable, ITaggableV2
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

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")
         .containerDefinitions(List.of(ContainerDefinitionProperty.builder()
                 .containerName("containerName")
                 .imageUri("imageUri")
                 // the properties below are optional
                 .command(List.of("command"))
                 .cpu(123)
                 .dependsOn(List.of(ContainerDependencyProperty.builder()
                         .condition("condition")
                         .containerName("containerName")
                         .build()))
                 .entryPoint(List.of("entryPoint"))
                 .environment(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())
                 .memoryLimits(MemoryLimitsProperty.builder()
                         .hardLimit(123)
                         .softLimit(123)
                         .build())
                 .portConfiguration(PortConfigurationProperty.builder()
                         .containerPortRanges(List.of(ContainerPortRangeProperty.builder()
                                 .fromPort(123)
                                 .protocol("protocol")
                                 .toPort(123)
                                 .build()))
                         .build())
                 .resolvedImageDigest("resolvedImageDigest")
                 .workingDirectory("workingDirectory")
                 .build()))
         .name("name")
         .operatingSystem("operatingSystem")
         .totalCpuLimit(123)
         .totalMemoryLimit(123)
         // the properties below are optional
         .schedulingStrategy("schedulingStrategy")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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)
      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

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrContainerGroupDefinitionArn

      @Stability(Stable) @NotNull public String getAttrContainerGroupDefinitionArn()
      The Amazon Resource Name ( ARN ) that is assigned to an Amazon GameLift ContainerGroupDefinition resource. It uniquely identifies the resource across all AWS Regions. Format is arn:aws:gamelift:<region>::containergroupdefinition/[container group definition name] .
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String 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" ).

    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getContainerDefinitions

      @Stability(Stable) @NotNull public Object getContainerDefinitions()
      The set of container definitions that are included in the container group.
    • setContainerDefinitions

      @Stability(Stable) public void setContainerDefinitions(@NotNull IResolvable value)
      The set of container definitions that are included in the container group.
    • setContainerDefinitions

      @Stability(Stable) public void setContainerDefinitions(@NotNull List<Object> value)
      The set of container definitions that are included in the container group.
    • getName

      @Stability(Stable) @NotNull public String getName()
      A descriptive identifier for the container group definition.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      A descriptive identifier for the container group definition.
    • getOperatingSystem

      @Stability(Stable) @NotNull public String getOperatingSystem()
      The platform required for all containers in the container group definition.
    • setOperatingSystem

      @Stability(Stable) public void setOperatingSystem(@NotNull String value)
      The platform required for all containers in the container group definition.
    • getTotalCpuLimit

      @Stability(Stable) @NotNull public Number getTotalCpuLimit()
      The amount of CPU units on a fleet instance to allocate for the container group.
    • setTotalCpuLimit

      @Stability(Stable) public void setTotalCpuLimit(@NotNull Number value)
      The amount of CPU units on a fleet instance to allocate for the container group.
    • getTotalMemoryLimit

      @Stability(Stable) @NotNull public Number getTotalMemoryLimit()
      The amount of memory (in MiB) on a fleet instance to allocate for the container group.
    • setTotalMemoryLimit

      @Stability(Stable) public void setTotalMemoryLimit(@NotNull Number value)
      The amount of memory (in MiB) on a fleet instance to allocate for the container group.
    • getSchedulingStrategy

      @Stability(Stable) @Nullable public String getSchedulingStrategy()
      The method for deploying the container group across fleet instances.
    • setSchedulingStrategy

      @Stability(Stable) public void setSchedulingStrategy(@Nullable String value)
      The method for deploying the container group across fleet instances.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of key-value pairs to apply to this resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.