Class CfnDaemonTaskDefinition

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IDaemonTaskDefinitionRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-04-14T18:31:54.285Z") @Stability(Stable) public class CfnDaemonTaskDefinition extends CfnResource implements IInspectable, IDaemonTaskDefinitionRef, ITaggableV2
Resource Schema describing various properties for ECS DaemonTaskDefinition.

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.ecs.*;
 CfnDaemonTaskDefinition cfnDaemonTaskDefinition = CfnDaemonTaskDefinition.Builder.create(this, "MyCfnDaemonTaskDefinition")
         .containerDefinitions(List.of(DaemonContainerDefinitionProperty.builder()
                 .image("image")
                 .name("name")
                 // 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(KeyValuePairProperty.builder()
                         .name("name")
                         .value("value")
                         .build()))
                 .environmentFiles(List.of(EnvironmentFileProperty.builder()
                         .type("type")
                         .value("value")
                         .build()))
                 .essential(false)
                 .firelensConfiguration(FirelensConfigurationProperty.builder()
                         .options(Map.of(
                                 "optionsKey", "options"))
                         .type("type")
                         .build())
                 .healthCheck(HealthCheckProperty.builder()
                         .command(List.of("command"))
                         .interval(123)
                         .retries(123)
                         .startPeriod(123)
                         .timeout(123)
                         .build())
                 .interactive(false)
                 .linuxParameters(LinuxParametersProperty.builder()
                         .capabilities(KernelCapabilitiesProperty.builder()
                                 .add(List.of("add"))
                                 .drop(List.of("drop"))
                                 .build())
                         .devices(List.of(DeviceProperty.builder()
                                 .containerPath("containerPath")
                                 .hostPath("hostPath")
                                 .permissions(List.of("permissions"))
                                 .build()))
                         .initProcessEnabled(false)
                         .tmpfs(List.of(TmpfsProperty.builder()
                                 .size(123)
                                 // the properties below are optional
                                 .containerPath("containerPath")
                                 .mountOptions(List.of("mountOptions"))
                                 .build()))
                         .build())
                 .logConfiguration(LogConfigurationProperty.builder()
                         .logDriver("logDriver")
                         // the properties below are optional
                         .options(Map.of(
                                 "optionsKey", "options"))
                         .secretOptions(List.of(SecretProperty.builder()
                                 .name("name")
                                 .valueFrom("valueFrom")
                                 .build()))
                         .build())
                 .memory(123)
                 .memoryReservation(123)
                 .mountPoints(List.of(MountPointProperty.builder()
                         .containerPath("containerPath")
                         .readOnly(false)
                         .sourceVolume("sourceVolume")
                         .build()))
                 .privileged(false)
                 .pseudoTerminal(false)
                 .readonlyRootFilesystem(false)
                 .repositoryCredentials(RepositoryCredentialsProperty.builder()
                         .credentialsParameter("credentialsParameter")
                         .build())
                 .restartPolicy(RestartPolicyProperty.builder()
                         .enabled(false)
                         .ignoredExitCodes(List.of(123))
                         .restartAttemptPeriod(123)
                         .build())
                 .secrets(List.of(SecretProperty.builder()
                         .name("name")
                         .valueFrom("valueFrom")
                         .build()))
                 .startTimeout(123)
                 .stopTimeout(123)
                 .systemControls(List.of(SystemControlProperty.builder()
                         .namespace("namespace")
                         .value("value")
                         .build()))
                 .ulimits(List.of(UlimitProperty.builder()
                         .hardLimit(123)
                         .name("name")
                         .softLimit(123)
                         .build()))
                 .user("user")
                 .workingDirectory("workingDirectory")
                 .build()))
         .cpu("cpu")
         .executionRoleArn("executionRoleArn")
         .family("family")
         .memory("memory")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .taskRoleArn("taskRoleArn")
         .volumes(List.of(VolumeProperty.builder()
                 .host(HostVolumePropertiesProperty.builder()
                         .sourcePath("sourcePath")
                         .build())
                 .name("name")
                 .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

    • CfnDaemonTaskDefinition

      protected CfnDaemonTaskDefinition(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnDaemonTaskDefinition

      protected CfnDaemonTaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnDaemonTaskDefinition

      @Stability(Stable) public CfnDaemonTaskDefinition(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnDaemonTaskDefinitionProps props)
      Create a new AWS::ECS::DaemonTaskDefinition.

      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.
    • CfnDaemonTaskDefinition

      @Stability(Stable) public CfnDaemonTaskDefinition(@NotNull software.constructs.Construct scope, @NotNull String id)
      Create a new AWS::ECS::DaemonTaskDefinition.

      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.
  • Method Details

    • arnForDaemonTaskDefinition

      @Stability(Stable) @NotNull public static String arnForDaemonTaskDefinition(@NotNull IDaemonTaskDefinitionRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnDaemonTaskDefinition

      @Stability(Stable) @NotNull public static Boolean isCfnDaemonTaskDefinition(@NotNull Object x)
      Checks whether the given object is a CfnDaemonTaskDefinition.

      Parameters:
      x - This parameter is required.
    • 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.
    • getAttrDaemonTaskDefinitionArn

      @Stability(Stable) @NotNull public String getAttrDaemonTaskDefinitionArn()
      The Amazon Resource Name (ARN) of the Amazon ECS daemon task definition.
    • 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
    • getDaemonTaskDefinitionRef

      @Stability(Stable) @NotNull public DaemonTaskDefinitionReference getDaemonTaskDefinitionRef()
      A reference to a DaemonTaskDefinition resource.
      Specified by:
      getDaemonTaskDefinitionRef in interface IDaemonTaskDefinitionRef
    • getContainerDefinitions

      @Stability(Stable) @Nullable public Object getContainerDefinitions()
      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnDaemonTaskDefinition.DaemonContainerDefinitionProperty>
    • setContainerDefinitions

      @Stability(Stable) public void setContainerDefinitions(@Nullable IResolvable value)
    • setContainerDefinitions

      @Stability(Stable) public void setContainerDefinitions(@Nullable List<Object> value)
    • getCpu

      @Stability(Stable) @Nullable public String getCpu()
    • setCpu

      @Stability(Stable) public void setCpu(@Nullable String value)
    • getExecutionRoleArn

      @Stability(Stable) @Nullable public String getExecutionRoleArn()
    • setExecutionRoleArn

      @Stability(Stable) public void setExecutionRoleArn(@Nullable String value)
    • getFamily

      @Stability(Stable) @Nullable public String getFamily()
    • setFamily

      @Stability(Stable) public void setFamily(@Nullable String value)
    • getMemory

      @Stability(Stable) @Nullable public String getMemory()
    • setMemory

      @Stability(Stable) public void setMemory(@Nullable String value)
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
    • getTaskRoleArn

      @Stability(Stable) @Nullable public String getTaskRoleArn()
    • setTaskRoleArn

      @Stability(Stable) public void setTaskRoleArn(@Nullable String value)
    • getVolumes

      @Stability(Stable) @Nullable public Object getVolumes()
      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnDaemonTaskDefinition.VolumeProperty>
    • setVolumes

      @Stability(Stable) public void setVolumes(@Nullable IResolvable value)
    • setVolumes

      @Stability(Stable) public void setVolumes(@Nullable List<Object> value)