Class CfnDaemonTaskDefinition
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.ecs.CfnDaemonTaskDefinition
- All Implemented Interfaces:
IInspectable,IDaemonTaskDefinitionRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.129.0 (build eaca441)",
date="2026-05-13T16:55:08.404Z")
@Stability(Stable)
public class CfnDaemonTaskDefinition
extends CfnResource
implements IInspectable, IDaemonTaskDefinitionRef, ITaggableV2
The details of a daemon task definition.
A daemon task definition is a template that describes the containers that form a daemon. Daemons deploy cross-cutting software agents independently across your Amazon ECS infrastructure.
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnDaemonTaskDefinition.static interfaceThe dependencies defined for container startup and shutdown.static interfaceA container definition for a daemon task.static interfaceAn object representing a container instance host device.static interfaceA list of files containing the environment variables to pass to a container.static interfaceThe FireLens configuration for the container.static interfaceAn object representing a container health check.static interfaceDetails on a container instance bind mount host volume.static interfaceThe Linux capabilities to add or remove from the default Docker configuration for a container defined in the task definition.static interfaceA key-value pair object.static interfaceThe Linux-specific options that are applied to the container, such as Linux KernelCapabilities.static interfaceThe log configuration for the container.static interfaceThe details for a volume mount point that's used in a container definition.static interfaceThe repository credentials for private registry authentication.static interfaceExample:static interfaceAn object representing the secret to expose to your container.static interfaceA list of namespaced kernel parameters to set in the container.static interfaceThe container path, mount options, and size of the tmpfs mount.static interfaceTheulimitsettings to pass to the container.static interfaceThe data volume configuration for tasks launched using this task definition.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.ecs.IDaemonTaskDefinitionRef
IDaemonTaskDefinitionRef.Jsii$Default, IDaemonTaskDefinitionRef.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
ConstructorsModifierConstructorDescriptionprotectedCfnDaemonTaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDaemonTaskDefinition(software.amazon.jsii.JsiiObjectRef objRef) CfnDaemonTaskDefinition(software.constructs.Construct scope, String id) Create a newAWS::ECS::DaemonTaskDefinition.CfnDaemonTaskDefinition(software.constructs.Construct scope, String id, CfnDaemonTaskDefinitionProps props) Create a newAWS::ECS::DaemonTaskDefinition. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringTag Manager which manages the tags for this resource.A list of container definitions in JSON format that describe the containers that make up the daemon task.getCpu()The number of CPU units used by the daemon task.A reference to a DaemonTaskDefinition resource.The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf.The name of a family that this daemon task definition is registered to.The amount of memory (in MiB) used by the daemon task.getTags()The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf.The list of data volume definitions for the daemon task.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnDaemonTaskDefinition.renderProperties(Map<String, Object> props) voidsetContainerDefinitions(List<Object> value) A list of container definitions in JSON format that describe the containers that make up the daemon task.voidA list of container definitions in JSON format that describe the containers that make up the daemon task.voidThe number of CPU units used by the daemon task.voidsetExecutionRoleArn(String value) The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf.voidThe name of a family that this daemon task definition is registered to.voidThe amount of memory (in MiB) used by the daemon task.voidvoidsetTaskRoleArn(String value) The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf.voidsetVolumes(List<Object> value) The list of data volume definitions for the daemon task.voidsetVolumes(IResolvable value) The list of data volume definitions for the daemon task.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, cfnPropertyName, 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, overrideLogicalId, withMethods 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
getNode, withMethods 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
-
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 newAWS::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 newAWS::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
Checks whether the given object is a CfnDaemonTaskDefinition.- 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.
-
getAttrDaemonTaskDefinitionArn
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getCfnPropertyNames
- Overrides:
getCfnPropertyNamesin classCfnResource
-
getDaemonTaskDefinitionRef
A reference to a DaemonTaskDefinition resource.- Specified by:
getDaemonTaskDefinitionRefin interfaceIDaemonTaskDefinitionRef
-
getContainerDefinitions
A list of container definitions in JSON format that describe the containers that make up the daemon task.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnDaemonTaskDefinition.DaemonContainerDefinitionProperty> -
setContainerDefinitions
A list of container definitions in JSON format that describe the containers that make up the daemon task. -
setContainerDefinitions
A list of container definitions in JSON format that describe the containers that make up the daemon task. -
getCpu
The number of CPU units used by the daemon task. -
setCpu
The number of CPU units used by the daemon task. -
getExecutionRoleArn
The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf. -
setExecutionRoleArn
The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf. -
getFamily
The name of a family that this daemon task definition is registered to. -
setFamily
The name of a family that this daemon task definition is registered to. -
getMemory
The amount of memory (in MiB) used by the daemon task. -
setMemory
The amount of memory (in MiB) used by the daemon task. -
getTags
-
setTags
-
getTaskRoleArn
The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf. -
setTaskRoleArn
The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf. -
getVolumes
The list of data volume definitions for the daemon task.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnDaemonTaskDefinition.VolumeProperty> -
setVolumes
The list of data volume definitions for the daemon task. -
setVolumes
The list of data volume definitions for the daemon task.
-