ScheduledEc2TaskProps¶
-
class
aws_cdk.aws_ecs_patterns.
ScheduledEc2TaskProps
(*, schedule, cluster=None, desired_task_count=None, vpc=None, scheduled_ec2_task_definition_options=None, scheduled_ec2_task_image_options=None)¶ Bases:
aws_cdk.aws_ecs_patterns.ScheduledTaskBaseProps
-
__init__
(*, schedule, cluster=None, desired_task_count=None, vpc=None, scheduled_ec2_task_definition_options=None, scheduled_ec2_task_image_options=None)¶ The properties for the ScheduledEc2Task task.
- Parameters
schedule (
Schedule
) – The schedule or rate (frequency) that determines when CloudWatch Events runs the rule. For more information, see Schedule Expression Syntax for Rules in the Amazon CloudWatch User Guide.cluster (
Optional
[ICluster
]) – The name of the cluster that hosts the service. If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc. Default: - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.desired_task_count (
Union
[int
,float
,None
]) – The desired number of instantiations of the task definition to keep running on the service. Default: 1vpc (
Optional
[IVpc
]) – The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed. If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster. Default: - uses the VPC defined in the cluster or creates a new VPC.scheduled_ec2_task_definition_options (
Optional
[ScheduledEc2TaskDefinitionOptions
]) – The properties to define if using an existing TaskDefinition in this construct. ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both. Default: nonescheduled_ec2_task_image_options (
Optional
[ScheduledEc2TaskImageOptions
]) – The properties to define if the construct is to create a TaskDefinition. ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both. Default: none
Attributes
-
cluster
¶ The name of the cluster that hosts the service.
If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
default :default: - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
- Return type
Optional
[ICluster
]
-
desired_task_count
¶ The desired number of instantiations of the task definition to keep running on the service.
default :default: 1
- Return type
Union
[int
,float
,None
]
-
schedule
¶ The schedule or rate (frequency) that determines when CloudWatch Events runs the rule.
For more information, see Schedule Expression Syntax for Rules in the Amazon CloudWatch User Guide.
- Return type
-
scheduled_ec2_task_definition_options
¶ The properties to define if using an existing TaskDefinition in this construct. ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.
default :default: none
- Return type
Optional
[ScheduledEc2TaskDefinitionOptions
]
-
scheduled_ec2_task_image_options
¶ The properties to define if the construct is to create a TaskDefinition. ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.
default :default: none
- Return type
Optional
[ScheduledEc2TaskImageOptions
]
-
vpc
¶ The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
default :default: - uses the VPC defined in the cluster or creates a new VPC.
- Return type
Optional
[IVpc
]
-