CfnDaemonProps Struct
Properties for defining a CfnDaemon.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const cfnDaemonProps: ecs.CfnDaemonProps = {
capacityProviderArns: ['capacityProviderArns'],
clusterArn: 'clusterArn',
critical: false,
daemonName: 'daemonName',
daemonTaskDefinitionArn: 'daemonTaskDefinitionArn',
deploymentConfiguration: {
alarms: {
alarmNames: ['alarmNames'],
enable: false,
},
bakeTimeInMinutes: 123,
drainPercent: 123,
},
enableEcsManagedTags: false,
enableExecuteCommand: false,
propagateTags: 'propagateTags',
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs
cfn_daemon_props = ecs.CfnDaemonProps(
capacity_provider_arns=["capacityProviderArns"],
cluster_arn="clusterArn",
critical=False,
daemon_name="daemonName",
daemon_task_definition_arn="daemonTaskDefinitionArn",
deployment_configuration=ecs.CfnDaemon.DaemonDeploymentConfigurationProperty(
alarms=ecs.CfnDaemon.DaemonAlarmConfigurationProperty(
alarm_names=["alarmNames"],
enable=False
),
bake_time_in_minutes=123,
drain_percent=123
),
enable_ecs_managed_tags=False,
enable_execute_command=False,
propagate_tags="propagateTags",
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// 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.*;
CfnDaemonProps cfnDaemonProps = CfnDaemonProps.builder()
.capacityProviderArns(List.of("capacityProviderArns"))
.clusterArn("clusterArn")
.critical(false)
.daemonName("daemonName")
.daemonTaskDefinitionArn("daemonTaskDefinitionArn")
.deploymentConfiguration(DaemonDeploymentConfigurationProperty.builder()
.alarms(DaemonAlarmConfigurationProperty.builder()
.alarmNames(List.of("alarmNames"))
.enable(false)
.build())
.bakeTimeInMinutes(123)
.drainPercent(123)
.build())
.enableEcsManagedTags(false)
.enableExecuteCommand(false)
.propagateTags("propagateTags")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
var cfnDaemonProps = new CfnDaemonProps {
CapacityProviderArns = new [] { "capacityProviderArns" },
ClusterArn = "clusterArn",
Critical = false,
DaemonName = "daemonName",
DaemonTaskDefinitionArn = "daemonTaskDefinitionArn",
DeploymentConfiguration = new DaemonDeploymentConfigurationProperty {
Alarms = new DaemonAlarmConfigurationProperty {
AlarmNames = new [] { "alarmNames" },
Enable = false
},
BakeTimeInMinutes = 123,
DrainPercent = 123
},
EnableEcsManagedTags = false,
EnableExecuteCommand = false,
PropagateTags = "propagateTags",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnDaemonProps := &CfnDaemonProps{
CapacityProviderArns: []*string{
jsii.String("capacityProviderArns"),
},
ClusterArn: jsii.String("clusterArn"),
Critical: jsii.Boolean(false),
DaemonName: jsii.String("daemonName"),
DaemonTaskDefinitionArn: jsii.String("daemonTaskDefinitionArn"),
DeploymentConfiguration: &DaemonDeploymentConfigurationProperty{
Alarms: &DaemonAlarmConfigurationProperty{
AlarmNames: []*string{
jsii.String("alarmNames"),
},
Enable: jsii.Boolean(false),
},
BakeTimeInMinutes: jsii.Number(123),
DrainPercent: jsii.Number(123),
},
EnableEcsManagedTags: jsii.Boolean(false),
EnableExecuteCommand: jsii.Boolean(false),
PropagateTags: jsii.String("propagateTags"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
capacityProviderArnsoptionalstring[]capacity_provider_arnsoptionaltyping.List[str]capacityProviderArnsoptionalList<String>CapacityProviderArnsoptionalstring[]CapacityProviderArnsoptional*[]*string #The Amazon Resource Names (ARNs) of the capacity providers associated with the daemon.
clusterArnoptionalstringcluster_arnoptionalstrclusterArnoptionalStringClusterArnoptionalstringClusterArnoptional*string #The Amazon Resource Name (ARN) of the cluster that the daemon is running in.
criticaloptionalboolean | IResolvablecriticaloptionaltyping.Union[bool, IResolvable]criticaloptionalBooleanCriticaloptionalboolCriticaloptionalinterface{} #If the ``critical`` parameter of this daemon revision is ``true``, and the daemon task fails, stops, or becomes unhealthy, Amazon ECS drains the container instance and stops the other tasks running on it.
If the parameter is false, the daemon task failure doesn't affect the other tasks on the instance, and doesn't block instance registration. The default value is true.
daemonNameoptionalstringdaemon_nameoptionalstrdaemonNameoptionalStringDaemonNameoptionalstringDaemonNameoptional*string #daemonTaskDefinitionArnoptionalstringdaemon_task_definition_arnoptionalstrdaemonTaskDefinitionArnoptionalStringDaemonTaskDefinitionArnoptionalstringDaemonTaskDefinitionArnoptional*string #The Amazon Resource Name (ARN) of the daemon task definition used by this revision.
deploymentConfigurationoptionalIResolvable | CfnDaemon.deployment_configurationoptionaltyping.Union[IResolvable, DaemonDeploymentConfigurationProperty]deploymentConfigurationoptionalIResolvableDeploymentConfigurationoptionalIResolvableDeploymentConfigurationoptionalinterface{} #Optional deployment parameters that control how a daemon rolls out updates across container instances.
enableEcsManagedTagsoptionalboolean | IResolvableenable_ecs_managed_tagsoptionaltyping.Union[bool, IResolvable]enableEcsManagedTagsoptionalBooleanEnableEcsManagedTagsoptionalboolEnableEcsManagedTagsoptionalinterface{} #Specifies whether Amazon ECS managed tags are turned on for the daemon tasks.
enableExecuteCommandoptionalboolean | IResolvableenable_execute_commandoptionaltyping.Union[bool, IResolvable]enableExecuteCommandoptionalBooleanEnableExecuteCommandoptionalboolEnableExecuteCommandoptionalinterface{} #Specifies whether the execute command functionality is turned on for the daemon tasks.
propagateTagsoptionalstringpropagate_tagsoptionalstrpropagateTagsoptionalStringPropagateTagsoptionalstringPropagateTagsoptional*string #Specifies whether tags are propagated from the daemon to the daemon tasks.