aws-cdk-lib 2.143.0__py3-none-any.whl → 2.144.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aws-cdk-lib might be problematic. Click here for more details.

@@ -2023,6 +2023,22 @@ ec2.Vpc(self, "VPC",
2023
2023
 
2024
2024
  **Note**: `CpuCredits.UNLIMITED` mode is not supported for T3 instances that are launched on a Dedicated Host.
2025
2025
 
2026
+ ### Shutdown behavior
2027
+
2028
+ You can specify the behavior of the instance when you initiate shutdown from the instance (using the operating system command for system shutdown).
2029
+
2030
+ ```python
2031
+ # vpc: ec2.Vpc
2032
+
2033
+
2034
+ ec2.Instance(self, "Instance",
2035
+ vpc=vpc,
2036
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.NANO),
2037
+ machine_image=ec2.AmazonLinuxImage(generation=ec2.AmazonLinuxGeneration.AMAZON_LINUX_2),
2038
+ instance_initiated_shutdown_behavior=ec2.InstanceInitiatedShutdownBehavior.TERMINATE
2039
+ )
2040
+ ```
2041
+
2026
2042
  ## VPC Flow Logs
2027
2043
 
2028
2044
  VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. Flow log data can be published to Amazon CloudWatch Logs and Amazon S3. After you've created a flow log, you can retrieve and view its data in the chosen destination. ([https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html)).
@@ -3782,29 +3798,19 @@ class AmazonLinuxEdition(enum.Enum):
3782
3798
  class AmazonLinuxGeneration(enum.Enum):
3783
3799
  '''What generation of Amazon Linux to use.
3784
3800
 
3785
- :exampleMetadata: lit=aws-autoscaling/test/example.images.lit.ts infused
3801
+ :exampleMetadata: infused
3786
3802
 
3787
3803
  Example::
3788
3804
 
3789
- # Pick a Windows edition to use
3790
- windows = ec2.WindowsImage(ec2.WindowsVersion.WINDOWS_SERVER_2019_ENGLISH_FULL_BASE)
3791
-
3792
- # Pick the right Amazon Linux edition. All arguments shown are optional
3793
- # and will default to these values when omitted.
3794
- amzn_linux = ec2.AmazonLinuxImage(
3795
- generation=ec2.AmazonLinuxGeneration.AMAZON_LINUX,
3796
- edition=ec2.AmazonLinuxEdition.STANDARD,
3797
- virtualization=ec2.AmazonLinuxVirt.HVM,
3798
- storage=ec2.AmazonLinuxStorage.GENERAL_PURPOSE
3799
- )
3805
+ # vpc: ec2.Vpc
3800
3806
 
3801
- # For other custom (Linux) images, instantiate a `GenericLinuxImage` with
3802
- # a map giving the AMI to in for each region:
3803
3807
 
3804
- linux = ec2.GenericLinuxImage({
3805
- "us-east-1": "ami-97785bed",
3806
- "eu-west-1": "ami-12345678"
3807
- })
3808
+ ec2.Instance(self, "Instance",
3809
+ vpc=vpc,
3810
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.NANO),
3811
+ machine_image=ec2.AmazonLinuxImage(generation=ec2.AmazonLinuxGeneration.AMAZON_LINUX_2),
3812
+ instance_initiated_shutdown_behavior=ec2.InstanceInitiatedShutdownBehavior.TERMINATE
3813
+ )
3808
3814
  '''
3809
3815
 
3810
3816
  AMAZON_LINUX = "AMAZON_LINUX"
@@ -72054,6 +72060,7 @@ class Instance(
72054
72060
  ebs_optimized: typing.Optional[builtins.bool] = None,
72055
72061
  init: typing.Optional[CloudFormationInit] = None,
72056
72062
  init_options: typing.Optional[typing.Union[ApplyCloudFormationInitOptions, typing.Dict[builtins.str, typing.Any]]] = None,
72063
+ instance_initiated_shutdown_behavior: typing.Optional["InstanceInitiatedShutdownBehavior"] = None,
72057
72064
  instance_name: typing.Optional[builtins.str] = None,
72058
72065
  key_name: typing.Optional[builtins.str] = None,
72059
72066
  key_pair: typing.Optional[IKeyPair] = None,
@@ -72086,6 +72093,7 @@ class Instance(
72086
72093
  :param ebs_optimized: Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance. Default: false
72087
72094
  :param init: Apply the given CloudFormation Init configuration to the instance at startup. Default: - no CloudFormation init
72088
72095
  :param init_options: Use the given options for applying CloudFormation Init. Describes the configsets to use and the timeout to wait Default: - default options
72096
+ :param instance_initiated_shutdown_behavior: Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown). Default: InstanceInitiatedShutdownBehavior.STOP
72089
72097
  :param instance_name: The name of the instance. Default: - CDK generated name
72090
72098
  :param key_name: (deprecated) Name of SSH keypair to grant access to instance. Default: - No SSH access will be possible.
72091
72099
  :param key_pair: The SSH keypair to grant access to the instance. Default: - No SSH access will be possible.
@@ -72120,6 +72128,7 @@ class Instance(
72120
72128
  ebs_optimized=ebs_optimized,
72121
72129
  init=init,
72122
72130
  init_options=init_options,
72131
+ instance_initiated_shutdown_behavior=instance_initiated_shutdown_behavior,
72123
72132
  instance_name=instance_name,
72124
72133
  key_name=key_name,
72125
72134
  key_pair=key_pair,
@@ -72828,6 +72837,19 @@ class InstanceInitiatedShutdownBehavior(enum.Enum):
72828
72837
  '''Provides the options for specifying the instance initiated shutdown behavior.
72829
72838
 
72830
72839
  :see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior
72840
+ :exampleMetadata: infused
72841
+
72842
+ Example::
72843
+
72844
+ # vpc: ec2.Vpc
72845
+
72846
+
72847
+ ec2.Instance(self, "Instance",
72848
+ vpc=vpc,
72849
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.NANO),
72850
+ machine_image=ec2.AmazonLinuxImage(generation=ec2.AmazonLinuxGeneration.AMAZON_LINUX_2),
72851
+ instance_initiated_shutdown_behavior=ec2.InstanceInitiatedShutdownBehavior.TERMINATE
72852
+ )
72831
72853
  '''
72832
72854
 
72833
72855
  STOP = "STOP"
@@ -72853,6 +72875,7 @@ class InstanceInitiatedShutdownBehavior(enum.Enum):
72853
72875
  "ebs_optimized": "ebsOptimized",
72854
72876
  "init": "init",
72855
72877
  "init_options": "initOptions",
72878
+ "instance_initiated_shutdown_behavior": "instanceInitiatedShutdownBehavior",
72856
72879
  "instance_name": "instanceName",
72857
72880
  "key_name": "keyName",
72858
72881
  "key_pair": "keyPair",
@@ -72887,6 +72910,7 @@ class InstanceProps:
72887
72910
  ebs_optimized: typing.Optional[builtins.bool] = None,
72888
72911
  init: typing.Optional[CloudFormationInit] = None,
72889
72912
  init_options: typing.Optional[typing.Union[ApplyCloudFormationInitOptions, typing.Dict[builtins.str, typing.Any]]] = None,
72913
+ instance_initiated_shutdown_behavior: typing.Optional[InstanceInitiatedShutdownBehavior] = None,
72890
72914
  instance_name: typing.Optional[builtins.str] = None,
72891
72915
  key_name: typing.Optional[builtins.str] = None,
72892
72916
  key_pair: typing.Optional[IKeyPair] = None,
@@ -72918,6 +72942,7 @@ class InstanceProps:
72918
72942
  :param ebs_optimized: Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance. Default: false
72919
72943
  :param init: Apply the given CloudFormation Init configuration to the instance at startup. Default: - no CloudFormation init
72920
72944
  :param init_options: Use the given options for applying CloudFormation Init. Describes the configsets to use and the timeout to wait Default: - default options
72945
+ :param instance_initiated_shutdown_behavior: Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown). Default: InstanceInitiatedShutdownBehavior.STOP
72921
72946
  :param instance_name: The name of the instance. Default: - CDK generated name
72922
72947
  :param key_name: (deprecated) Name of SSH keypair to grant access to instance. Default: - No SSH access will be possible.
72923
72948
  :param key_pair: The SSH keypair to grant access to the instance. Default: - No SSH access will be possible.
@@ -72972,6 +72997,7 @@ class InstanceProps:
72972
72997
  check_type(argname="argument ebs_optimized", value=ebs_optimized, expected_type=type_hints["ebs_optimized"])
72973
72998
  check_type(argname="argument init", value=init, expected_type=type_hints["init"])
72974
72999
  check_type(argname="argument init_options", value=init_options, expected_type=type_hints["init_options"])
73000
+ check_type(argname="argument instance_initiated_shutdown_behavior", value=instance_initiated_shutdown_behavior, expected_type=type_hints["instance_initiated_shutdown_behavior"])
72975
73001
  check_type(argname="argument instance_name", value=instance_name, expected_type=type_hints["instance_name"])
72976
73002
  check_type(argname="argument key_name", value=key_name, expected_type=type_hints["key_name"])
72977
73003
  check_type(argname="argument key_pair", value=key_pair, expected_type=type_hints["key_pair"])
@@ -73012,6 +73038,8 @@ class InstanceProps:
73012
73038
  self._values["init"] = init
73013
73039
  if init_options is not None:
73014
73040
  self._values["init_options"] = init_options
73041
+ if instance_initiated_shutdown_behavior is not None:
73042
+ self._values["instance_initiated_shutdown_behavior"] = instance_initiated_shutdown_behavior
73015
73043
  if instance_name is not None:
73016
73044
  self._values["instance_name"] = instance_name
73017
73045
  if key_name is not None:
@@ -73175,6 +73203,19 @@ class InstanceProps:
73175
73203
  result = self._values.get("init_options")
73176
73204
  return typing.cast(typing.Optional[ApplyCloudFormationInitOptions], result)
73177
73205
 
73206
+ @builtins.property
73207
+ def instance_initiated_shutdown_behavior(
73208
+ self,
73209
+ ) -> typing.Optional[InstanceInitiatedShutdownBehavior]:
73210
+ '''Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
73211
+
73212
+ :default: InstanceInitiatedShutdownBehavior.STOP
73213
+
73214
+ :see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior
73215
+ '''
73216
+ result = self._values.get("instance_initiated_shutdown_behavior")
73217
+ return typing.cast(typing.Optional[InstanceInitiatedShutdownBehavior], result)
73218
+
73178
73219
  @builtins.property
73179
73220
  def instance_name(self) -> typing.Optional[builtins.str]:
73180
73221
  '''The name of the instance.
@@ -73531,17 +73572,11 @@ class InstanceSize(enum.Enum):
73531
73572
 
73532
73573
  cluster = rds.DatabaseCluster(self, "Database",
73533
73574
  engine=rds.DatabaseClusterEngine.aurora_mysql(version=rds.AuroraMysqlEngineVersion.VER_3_01_0),
73534
- writer=rds.ClusterInstance.provisioned("writer",
73535
- instance_type=ec2.InstanceType.of(ec2.InstanceClass.R6G, ec2.InstanceSize.XLARGE4)
73575
+ writer=rds.ClusterInstance.provisioned("Instance",
73576
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.SMALL)
73536
73577
  ),
73537
- serverless_v2_min_capacity=6.5,
73538
- serverless_v2_max_capacity=64,
73539
- readers=[
73540
- # will be put in promotion tier 1 and will scale with the writer
73541
- rds.ClusterInstance.serverless_v2("reader1", scale_with_writer=True),
73542
- # will be put in promotion tier 2 and will not scale with the writer
73543
- rds.ClusterInstance.serverless_v2("reader2")
73544
- ],
73578
+ readers=[rds.ClusterInstance.provisioned("reader")],
73579
+ instance_update_behaviour=rds.InstanceUpdateBehaviour.ROLLING, # Optional - defaults to rds.InstanceUpdateBehaviour.BULK
73545
73580
  vpc=vpc
73546
73581
  )
73547
73582
  '''
@@ -74865,6 +74900,11 @@ class InterfaceVpcEndpointAwsService(
74865
74900
  def PINPOINT_V1(cls) -> "InterfaceVpcEndpointAwsService":
74866
74901
  return typing.cast("InterfaceVpcEndpointAwsService", jsii.sget(cls, "PINPOINT_V1"))
74867
74902
 
74903
+ @jsii.python.classproperty
74904
+ @jsii.member(jsii_name="PIPES_DATA")
74905
+ def PIPES_DATA(cls) -> "InterfaceVpcEndpointAwsService":
74906
+ return typing.cast("InterfaceVpcEndpointAwsService", jsii.sget(cls, "PIPES_DATA"))
74907
+
74868
74908
  @jsii.python.classproperty
74869
74909
  @jsii.member(jsii_name="POLLY")
74870
74910
  def POLLY(cls) -> "InterfaceVpcEndpointAwsService":
@@ -104074,6 +104114,7 @@ def _typecheckingstub__5fdf31f5ae2497c7efcb56df558011698f38dc19cff28ca7a78a08a6d
104074
104114
  ebs_optimized: typing.Optional[builtins.bool] = None,
104075
104115
  init: typing.Optional[CloudFormationInit] = None,
104076
104116
  init_options: typing.Optional[typing.Union[ApplyCloudFormationInitOptions, typing.Dict[builtins.str, typing.Any]]] = None,
104117
+ instance_initiated_shutdown_behavior: typing.Optional[InstanceInitiatedShutdownBehavior] = None,
104077
104118
  instance_name: typing.Optional[builtins.str] = None,
104078
104119
  key_name: typing.Optional[builtins.str] = None,
104079
104120
  key_pair: typing.Optional[IKeyPair] = None,
@@ -104126,6 +104167,7 @@ def _typecheckingstub__2d4dc63c6e6ee3ddc68d5dd204d8ac5ef1f1dec37a7b84d636225df1c
104126
104167
  ebs_optimized: typing.Optional[builtins.bool] = None,
104127
104168
  init: typing.Optional[CloudFormationInit] = None,
104128
104169
  init_options: typing.Optional[typing.Union[ApplyCloudFormationInitOptions, typing.Dict[builtins.str, typing.Any]]] = None,
104170
+ instance_initiated_shutdown_behavior: typing.Optional[InstanceInitiatedShutdownBehavior] = None,
104129
104171
  instance_name: typing.Optional[builtins.str] = None,
104130
104172
  key_name: typing.Optional[builtins.str] = None,
104131
104173
  key_pair: typing.Optional[IKeyPair] = None,
@@ -882,6 +882,42 @@ application_load_balanced_fargate_service = ecs_patterns.ApplicationLoadBalanced
882
882
  )
883
883
  ```
884
884
 
885
+ ### Customize Container Name for ScheduledFargateTask
886
+
887
+ ```python
888
+ # cluster: ecs.Cluster
889
+
890
+ scheduled_fargate_task = ecs_patterns.ScheduledFargateTask(self, "ScheduledFargateTask",
891
+ cluster=cluster,
892
+ scheduled_fargate_task_image_options=ecsPatterns.ScheduledFargateTaskImageOptions(
893
+ image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
894
+ container_name="customContainerName",
895
+ memory_limit_mi_b=512
896
+ ),
897
+ schedule=appscaling.Schedule.expression("rate(1 minute)"),
898
+ platform_version=ecs.FargatePlatformVersion.LATEST
899
+ )
900
+ ```
901
+
902
+ ### Customize Container Name for ScheduledEc2Task
903
+
904
+ ```python
905
+ # cluster: ecs.Cluster
906
+
907
+ ecs_scheduled_task = ecs_patterns.ScheduledEc2Task(self, "ScheduledTask",
908
+ cluster=cluster,
909
+ scheduled_ec2_task_image_options=ecsPatterns.ScheduledEc2TaskImageOptions(
910
+ image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
911
+ container_name="customContainerName",
912
+ memory_limit_mi_b=256,
913
+ environment={"name": "TRIGGER", "value": "CloudWatch Events"}
914
+ ),
915
+ schedule=appscaling.Schedule.expression("rate(1 minute)"),
916
+ enabled=True,
917
+ rule_name="sample-scheduled-task-rule"
918
+ )
919
+ ```
920
+
885
921
  ### Set PlatformVersion for ScheduledFargateTask
886
922
 
887
923
  ```python
@@ -7107,6 +7143,7 @@ class ScheduledTaskBaseProps:
7107
7143
  name_mapping={
7108
7144
  "image": "image",
7109
7145
  "command": "command",
7146
+ "container_name": "containerName",
7110
7147
  "environment": "environment",
7111
7148
  "log_driver": "logDriver",
7112
7149
  "secrets": "secrets",
@@ -7118,6 +7155,7 @@ class ScheduledTaskImageProps:
7118
7155
  *,
7119
7156
  image: _ContainerImage_94af1b43,
7120
7157
  command: typing.Optional[typing.Sequence[builtins.str]] = None,
7158
+ container_name: typing.Optional[builtins.str] = None,
7121
7159
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
7122
7160
  log_driver: typing.Optional[_LogDriver_393a21bb] = None,
7123
7161
  secrets: typing.Optional[typing.Mapping[builtins.str, _Secret_6be2f64f]] = None,
@@ -7125,6 +7163,7 @@ class ScheduledTaskImageProps:
7125
7163
  '''
7126
7164
  :param image: The image used to start a container. Image or taskDefinition must be specified, but not both. Default: - none
7127
7165
  :param command: The command that is passed to the container. If you provide a shell command as a single string, you have to quote command-line arguments. Default: - CMD value built into container image.
7166
+ :param container_name: Optional name for the container added. Default: - ScheduledContainer
7128
7167
  :param environment: The environment variables to pass to the container. Default: none
7129
7168
  :param log_driver: The log driver to use. Default: - AwsLogDriver if enableLogging is true
7130
7169
  :param secrets: The secret to expose to the container as an environment variable. Default: - No secret environment variables.
@@ -7147,6 +7186,7 @@ class ScheduledTaskImageProps:
7147
7186
 
7148
7187
  # the properties below are optional
7149
7188
  command=["command"],
7189
+ container_name="containerName",
7150
7190
  environment={
7151
7191
  "environment_key": "environment"
7152
7192
  },
@@ -7160,6 +7200,7 @@ class ScheduledTaskImageProps:
7160
7200
  type_hints = typing.get_type_hints(_typecheckingstub__4aa2efa8ff1cfca00647a05fc250401ad24348dd97b5fa82c5f8ca12e0c43302)
7161
7201
  check_type(argname="argument image", value=image, expected_type=type_hints["image"])
7162
7202
  check_type(argname="argument command", value=command, expected_type=type_hints["command"])
7203
+ check_type(argname="argument container_name", value=container_name, expected_type=type_hints["container_name"])
7163
7204
  check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
7164
7205
  check_type(argname="argument log_driver", value=log_driver, expected_type=type_hints["log_driver"])
7165
7206
  check_type(argname="argument secrets", value=secrets, expected_type=type_hints["secrets"])
@@ -7168,6 +7209,8 @@ class ScheduledTaskImageProps:
7168
7209
  }
7169
7210
  if command is not None:
7170
7211
  self._values["command"] = command
7212
+ if container_name is not None:
7213
+ self._values["container_name"] = container_name
7171
7214
  if environment is not None:
7172
7215
  self._values["environment"] = environment
7173
7216
  if log_driver is not None:
@@ -7198,6 +7241,15 @@ class ScheduledTaskImageProps:
7198
7241
  result = self._values.get("command")
7199
7242
  return typing.cast(typing.Optional[typing.List[builtins.str]], result)
7200
7243
 
7244
+ @builtins.property
7245
+ def container_name(self) -> typing.Optional[builtins.str]:
7246
+ '''Optional name for the container added.
7247
+
7248
+ :default: - ScheduledContainer
7249
+ '''
7250
+ result = self._values.get("container_name")
7251
+ return typing.cast(typing.Optional[builtins.str], result)
7252
+
7201
7253
  @builtins.property
7202
7254
  def environment(
7203
7255
  self,
@@ -14656,6 +14708,7 @@ class ScheduledEc2Task(
14656
14708
  name_mapping={
14657
14709
  "image": "image",
14658
14710
  "command": "command",
14711
+ "container_name": "containerName",
14659
14712
  "environment": "environment",
14660
14713
  "log_driver": "logDriver",
14661
14714
  "secrets": "secrets",
@@ -14670,6 +14723,7 @@ class ScheduledEc2TaskImageOptions(ScheduledTaskImageProps):
14670
14723
  *,
14671
14724
  image: _ContainerImage_94af1b43,
14672
14725
  command: typing.Optional[typing.Sequence[builtins.str]] = None,
14726
+ container_name: typing.Optional[builtins.str] = None,
14673
14727
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
14674
14728
  log_driver: typing.Optional[_LogDriver_393a21bb] = None,
14675
14729
  secrets: typing.Optional[typing.Mapping[builtins.str, _Secret_6be2f64f]] = None,
@@ -14681,6 +14735,7 @@ class ScheduledEc2TaskImageOptions(ScheduledTaskImageProps):
14681
14735
 
14682
14736
  :param image: The image used to start a container. Image or taskDefinition must be specified, but not both. Default: - none
14683
14737
  :param command: The command that is passed to the container. If you provide a shell command as a single string, you have to quote command-line arguments. Default: - CMD value built into container image.
14738
+ :param container_name: Optional name for the container added. Default: - ScheduledContainer
14684
14739
  :param environment: The environment variables to pass to the container. Default: none
14685
14740
  :param log_driver: The log driver to use. Default: - AwsLogDriver if enableLogging is true
14686
14741
  :param secrets: The secret to expose to the container as an environment variable. Default: - No secret environment variables.
@@ -14711,6 +14766,7 @@ class ScheduledEc2TaskImageOptions(ScheduledTaskImageProps):
14711
14766
  type_hints = typing.get_type_hints(_typecheckingstub__e93374ad5dd5f7125f15d5a78dc084f3c790e70e31747218ac4971e2100b17a5)
14712
14767
  check_type(argname="argument image", value=image, expected_type=type_hints["image"])
14713
14768
  check_type(argname="argument command", value=command, expected_type=type_hints["command"])
14769
+ check_type(argname="argument container_name", value=container_name, expected_type=type_hints["container_name"])
14714
14770
  check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
14715
14771
  check_type(argname="argument log_driver", value=log_driver, expected_type=type_hints["log_driver"])
14716
14772
  check_type(argname="argument secrets", value=secrets, expected_type=type_hints["secrets"])
@@ -14722,6 +14778,8 @@ class ScheduledEc2TaskImageOptions(ScheduledTaskImageProps):
14722
14778
  }
14723
14779
  if command is not None:
14724
14780
  self._values["command"] = command
14781
+ if container_name is not None:
14782
+ self._values["container_name"] = container_name
14725
14783
  if environment is not None:
14726
14784
  self._values["environment"] = environment
14727
14785
  if log_driver is not None:
@@ -14758,6 +14816,15 @@ class ScheduledEc2TaskImageOptions(ScheduledTaskImageProps):
14758
14816
  result = self._values.get("command")
14759
14817
  return typing.cast(typing.Optional[typing.List[builtins.str]], result)
14760
14818
 
14819
+ @builtins.property
14820
+ def container_name(self) -> typing.Optional[builtins.str]:
14821
+ '''Optional name for the container added.
14822
+
14823
+ :default: - ScheduledContainer
14824
+ '''
14825
+ result = self._values.get("container_name")
14826
+ return typing.cast(typing.Optional[builtins.str], result)
14827
+
14761
14828
  @builtins.property
14762
14829
  def environment(
14763
14830
  self,
@@ -15220,6 +15287,7 @@ class ScheduledFargateTask(
15220
15287
  name_mapping={
15221
15288
  "image": "image",
15222
15289
  "command": "command",
15290
+ "container_name": "containerName",
15223
15291
  "environment": "environment",
15224
15292
  "log_driver": "logDriver",
15225
15293
  "secrets": "secrets",
@@ -15240,6 +15308,7 @@ class ScheduledFargateTaskImageOptions(
15240
15308
  *,
15241
15309
  image: _ContainerImage_94af1b43,
15242
15310
  command: typing.Optional[typing.Sequence[builtins.str]] = None,
15311
+ container_name: typing.Optional[builtins.str] = None,
15243
15312
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
15244
15313
  log_driver: typing.Optional[_LogDriver_393a21bb] = None,
15245
15314
  secrets: typing.Optional[typing.Mapping[builtins.str, _Secret_6be2f64f]] = None,
@@ -15254,6 +15323,7 @@ class ScheduledFargateTaskImageOptions(
15254
15323
 
15255
15324
  :param image: The image used to start a container. Image or taskDefinition must be specified, but not both. Default: - none
15256
15325
  :param command: The command that is passed to the container. If you provide a shell command as a single string, you have to quote command-line arguments. Default: - CMD value built into container image.
15326
+ :param container_name: Optional name for the container added. Default: - ScheduledContainer
15257
15327
  :param environment: The environment variables to pass to the container. Default: none
15258
15328
  :param log_driver: The log driver to use. Default: - AwsLogDriver if enableLogging is true
15259
15329
  :param secrets: The secret to expose to the container as an environment variable. Default: - No secret environment variables.
@@ -15268,20 +15338,17 @@ class ScheduledFargateTaskImageOptions(
15268
15338
 
15269
15339
  Example::
15270
15340
 
15271
- vpc = ec2.Vpc(self, "Vpc", max_azs=1)
15272
- cluster = ecs.Cluster(self, "EcsCluster", vpc=vpc)
15341
+ # cluster: ecs.Cluster
15342
+
15273
15343
  scheduled_fargate_task = ecs_patterns.ScheduledFargateTask(self, "ScheduledFargateTask",
15274
15344
  cluster=cluster,
15275
15345
  scheduled_fargate_task_image_options=ecsPatterns.ScheduledFargateTaskImageOptions(
15276
15346
  image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
15347
+ container_name="customContainerName",
15277
15348
  memory_limit_mi_b=512
15278
15349
  ),
15279
15350
  schedule=appscaling.Schedule.expression("rate(1 minute)"),
15280
- tags=[Tag(
15281
- key="my-tag",
15282
- value="my-tag-value"
15283
- )
15284
- ]
15351
+ platform_version=ecs.FargatePlatformVersion.LATEST
15285
15352
  )
15286
15353
  '''
15287
15354
  if isinstance(runtime_platform, dict):
@@ -15290,6 +15357,7 @@ class ScheduledFargateTaskImageOptions(
15290
15357
  type_hints = typing.get_type_hints(_typecheckingstub__4a749e8e91135e4a7ff734b7c08ac37ec5bc550062036c75493dec9505f90952)
15291
15358
  check_type(argname="argument image", value=image, expected_type=type_hints["image"])
15292
15359
  check_type(argname="argument command", value=command, expected_type=type_hints["command"])
15360
+ check_type(argname="argument container_name", value=container_name, expected_type=type_hints["container_name"])
15293
15361
  check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
15294
15362
  check_type(argname="argument log_driver", value=log_driver, expected_type=type_hints["log_driver"])
15295
15363
  check_type(argname="argument secrets", value=secrets, expected_type=type_hints["secrets"])
@@ -15304,6 +15372,8 @@ class ScheduledFargateTaskImageOptions(
15304
15372
  }
15305
15373
  if command is not None:
15306
15374
  self._values["command"] = command
15375
+ if container_name is not None:
15376
+ self._values["container_name"] = container_name
15307
15377
  if environment is not None:
15308
15378
  self._values["environment"] = environment
15309
15379
  if log_driver is not None:
@@ -15346,6 +15416,15 @@ class ScheduledFargateTaskImageOptions(
15346
15416
  result = self._values.get("command")
15347
15417
  return typing.cast(typing.Optional[typing.List[builtins.str]], result)
15348
15418
 
15419
+ @builtins.property
15420
+ def container_name(self) -> typing.Optional[builtins.str]:
15421
+ '''Optional name for the container added.
15422
+
15423
+ :default: - ScheduledContainer
15424
+ '''
15425
+ result = self._values.get("container_name")
15426
+ return typing.cast(typing.Optional[builtins.str], result)
15427
+
15349
15428
  @builtins.property
15350
15429
  def environment(
15351
15430
  self,
@@ -16584,6 +16663,7 @@ def _typecheckingstub__4aa2efa8ff1cfca00647a05fc250401ad24348dd97b5fa82c5f8ca12e
16584
16663
  *,
16585
16664
  image: _ContainerImage_94af1b43,
16586
16665
  command: typing.Optional[typing.Sequence[builtins.str]] = None,
16666
+ container_name: typing.Optional[builtins.str] = None,
16587
16667
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
16588
16668
  log_driver: typing.Optional[_LogDriver_393a21bb] = None,
16589
16669
  secrets: typing.Optional[typing.Mapping[builtins.str, _Secret_6be2f64f]] = None,
@@ -17321,6 +17401,7 @@ def _typecheckingstub__e93374ad5dd5f7125f15d5a78dc084f3c790e70e31747218ac4971e21
17321
17401
  *,
17322
17402
  image: _ContainerImage_94af1b43,
17323
17403
  command: typing.Optional[typing.Sequence[builtins.str]] = None,
17404
+ container_name: typing.Optional[builtins.str] = None,
17324
17405
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
17325
17406
  log_driver: typing.Optional[_LogDriver_393a21bb] = None,
17326
17407
  secrets: typing.Optional[typing.Mapping[builtins.str, _Secret_6be2f64f]] = None,
@@ -17379,6 +17460,7 @@ def _typecheckingstub__4a749e8e91135e4a7ff734b7c08ac37ec5bc550062036c75493dec950
17379
17460
  *,
17380
17461
  image: _ContainerImage_94af1b43,
17381
17462
  command: typing.Optional[typing.Sequence[builtins.str]] = None,
17463
+ container_name: typing.Optional[builtins.str] = None,
17382
17464
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
17383
17465
  log_driver: typing.Optional[_LogDriver_393a21bb] = None,
17384
17466
  secrets: typing.Optional[typing.Mapping[builtins.str, _Secret_6be2f64f]] = None,
@@ -7515,7 +7515,7 @@ class LustreMaintenanceTime(
7515
7515
  metaclass=jsii.JSIIMeta,
7516
7516
  jsii_type="aws-cdk-lib.aws_fsx.LustreMaintenanceTime",
7517
7517
  ):
7518
- '''Class for scheduling a weekly manitenance time.
7518
+ '''Class for scheduling a weekly maintenance time.
7519
7519
 
7520
7520
  :exampleMetadata: fixture=_generated
7521
7521
 
@@ -7541,7 +7541,7 @@ class LustreMaintenanceTime(
7541
7541
  ) -> None:
7542
7542
  '''
7543
7543
  :param day: The day of the week for maintenance to be performed.
7544
- :param hour: The hour of the day (from 0-24) for maintenance to be performed.
7544
+ :param hour: The hour of the day (from 0-23) for maintenance to be performed.
7545
7545
  :param minute: The minute of the hour (from 0-59) for maintenance to be performed.
7546
7546
  '''
7547
7547
  props = LustreMaintenanceTimeProps(day=day, hour=hour, minute=minute)
@@ -7570,7 +7570,7 @@ class LustreMaintenanceTimeProps:
7570
7570
  '''Properties required for setting up a weekly maintenance time.
7571
7571
 
7572
7572
  :param day: The day of the week for maintenance to be performed.
7573
- :param hour: The hour of the day (from 0-24) for maintenance to be performed.
7573
+ :param hour: The hour of the day (from 0-23) for maintenance to be performed.
7574
7574
  :param minute: The minute of the hour (from 0-59) for maintenance to be performed.
7575
7575
 
7576
7576
  :exampleMetadata: fixture=_generated
@@ -7607,7 +7607,7 @@ class LustreMaintenanceTimeProps:
7607
7607
 
7608
7608
  @builtins.property
7609
7609
  def hour(self) -> jsii.Number:
7610
- '''The hour of the day (from 0-24) for maintenance to be performed.'''
7610
+ '''The hour of the day (from 0-23) for maintenance to be performed.'''
7611
7611
  result = self._values.get("hour")
7612
7612
  assert result is not None, "Required property 'hour' is missing"
7613
7613
  return typing.cast(jsii.Number, result)
@@ -5960,6 +5960,7 @@ class CfnJob(
5960
5960
  ),
5961
5961
  glue_version="glueVersion",
5962
5962
  log_uri="logUri",
5963
+ maintenance_window="maintenanceWindow",
5963
5964
  max_capacity=123,
5964
5965
  max_retries=123,
5965
5966
  name="name",
@@ -5990,6 +5991,7 @@ class CfnJob(
5990
5991
  execution_property: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnJob.ExecutionPropertyProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
5991
5992
  glue_version: typing.Optional[builtins.str] = None,
5992
5993
  log_uri: typing.Optional[builtins.str] = None,
5994
+ maintenance_window: typing.Optional[builtins.str] = None,
5993
5995
  max_capacity: typing.Optional[jsii.Number] = None,
5994
5996
  max_retries: typing.Optional[jsii.Number] = None,
5995
5997
  name: typing.Optional[builtins.str] = None,
@@ -6014,6 +6016,7 @@ class CfnJob(
6014
6016
  :param execution_property: The maximum number of concurrent runs that are allowed for this job.
6015
6017
  :param glue_version: Glue version determines the versions of Apache Spark and Python that AWS Glue supports. The Python version indicates the version supported for jobs of type Spark. For more information about the available AWS Glue versions and corresponding Spark and Python versions, see `Glue version <https://docs.aws.amazon.com/glue/latest/dg/add-job.html>`_ in the developer guide. Jobs that are created without specifying a Glue version default to Glue 0.9.
6016
6018
  :param log_uri: This field is reserved for future use.
6019
+ :param maintenance_window:
6017
6020
  :param max_capacity: The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. Do not set ``Max Capacity`` if using ``WorkerType`` and ``NumberOfWorkers`` . The value that can be allocated for ``MaxCapacity`` depends on whether you are running a Python shell job or an Apache Spark ETL job: - When you specify a Python shell job ( ``JobCommand.Name`` ="pythonshell"), you can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU. - When you specify an Apache Spark ETL job ( ``JobCommand.Name`` ="glueetl"), you can allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a fractional DPU allocation.
6018
6021
  :param max_retries: The maximum number of times to retry this job after a JobRun fails.
6019
6022
  :param name: The name you assign to this job definition.
@@ -6040,6 +6043,7 @@ class CfnJob(
6040
6043
  execution_property=execution_property,
6041
6044
  glue_version=glue_version,
6042
6045
  log_uri=log_uri,
6046
+ maintenance_window=maintenance_window,
6043
6047
  max_capacity=max_capacity,
6044
6048
  max_retries=max_retries,
6045
6049
  name=name,
@@ -6252,6 +6256,18 @@ class CfnJob(
6252
6256
  check_type(argname="argument value", value=value, expected_type=type_hints["value"])
6253
6257
  jsii.set(self, "logUri", value)
6254
6258
 
6259
+ @builtins.property
6260
+ @jsii.member(jsii_name="maintenanceWindow")
6261
+ def maintenance_window(self) -> typing.Optional[builtins.str]:
6262
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "maintenanceWindow"))
6263
+
6264
+ @maintenance_window.setter
6265
+ def maintenance_window(self, value: typing.Optional[builtins.str]) -> None:
6266
+ if __debug__:
6267
+ type_hints = typing.get_type_hints(_typecheckingstub__42885410f13bc9dd6ce3f11fca98e52266bcf89c43473b8d39f8980ef7b211d0)
6268
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
6269
+ jsii.set(self, "maintenanceWindow", value)
6270
+
6255
6271
  @builtins.property
6256
6272
  @jsii.member(jsii_name="maxCapacity")
6257
6273
  def max_capacity(self) -> typing.Optional[jsii.Number]:
@@ -6680,6 +6696,7 @@ class CfnJob(
6680
6696
  "execution_property": "executionProperty",
6681
6697
  "glue_version": "glueVersion",
6682
6698
  "log_uri": "logUri",
6699
+ "maintenance_window": "maintenanceWindow",
6683
6700
  "max_capacity": "maxCapacity",
6684
6701
  "max_retries": "maxRetries",
6685
6702
  "name": "name",
@@ -6706,6 +6723,7 @@ class CfnJobProps:
6706
6723
  execution_property: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnJob.ExecutionPropertyProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
6707
6724
  glue_version: typing.Optional[builtins.str] = None,
6708
6725
  log_uri: typing.Optional[builtins.str] = None,
6726
+ maintenance_window: typing.Optional[builtins.str] = None,
6709
6727
  max_capacity: typing.Optional[jsii.Number] = None,
6710
6728
  max_retries: typing.Optional[jsii.Number] = None,
6711
6729
  name: typing.Optional[builtins.str] = None,
@@ -6729,6 +6747,7 @@ class CfnJobProps:
6729
6747
  :param execution_property: The maximum number of concurrent runs that are allowed for this job.
6730
6748
  :param glue_version: Glue version determines the versions of Apache Spark and Python that AWS Glue supports. The Python version indicates the version supported for jobs of type Spark. For more information about the available AWS Glue versions and corresponding Spark and Python versions, see `Glue version <https://docs.aws.amazon.com/glue/latest/dg/add-job.html>`_ in the developer guide. Jobs that are created without specifying a Glue version default to Glue 0.9.
6731
6749
  :param log_uri: This field is reserved for future use.
6750
+ :param maintenance_window:
6732
6751
  :param max_capacity: The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. Do not set ``Max Capacity`` if using ``WorkerType`` and ``NumberOfWorkers`` . The value that can be allocated for ``MaxCapacity`` depends on whether you are running a Python shell job or an Apache Spark ETL job: - When you specify a Python shell job ( ``JobCommand.Name`` ="pythonshell"), you can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU. - When you specify an Apache Spark ETL job ( ``JobCommand.Name`` ="glueetl"), you can allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a fractional DPU allocation.
6733
6752
  :param max_retries: The maximum number of times to retry this job after a JobRun fails.
6734
6753
  :param name: The name you assign to this job definition.
@@ -6775,6 +6794,7 @@ class CfnJobProps:
6775
6794
  ),
6776
6795
  glue_version="glueVersion",
6777
6796
  log_uri="logUri",
6797
+ maintenance_window="maintenanceWindow",
6778
6798
  max_capacity=123,
6779
6799
  max_retries=123,
6780
6800
  name="name",
@@ -6801,6 +6821,7 @@ class CfnJobProps:
6801
6821
  check_type(argname="argument execution_property", value=execution_property, expected_type=type_hints["execution_property"])
6802
6822
  check_type(argname="argument glue_version", value=glue_version, expected_type=type_hints["glue_version"])
6803
6823
  check_type(argname="argument log_uri", value=log_uri, expected_type=type_hints["log_uri"])
6824
+ check_type(argname="argument maintenance_window", value=maintenance_window, expected_type=type_hints["maintenance_window"])
6804
6825
  check_type(argname="argument max_capacity", value=max_capacity, expected_type=type_hints["max_capacity"])
6805
6826
  check_type(argname="argument max_retries", value=max_retries, expected_type=type_hints["max_retries"])
6806
6827
  check_type(argname="argument name", value=name, expected_type=type_hints["name"])
@@ -6831,6 +6852,8 @@ class CfnJobProps:
6831
6852
  self._values["glue_version"] = glue_version
6832
6853
  if log_uri is not None:
6833
6854
  self._values["log_uri"] = log_uri
6855
+ if maintenance_window is not None:
6856
+ self._values["maintenance_window"] = maintenance_window
6834
6857
  if max_capacity is not None:
6835
6858
  self._values["max_capacity"] = max_capacity
6836
6859
  if max_retries is not None:
@@ -6968,6 +6991,14 @@ class CfnJobProps:
6968
6991
  result = self._values.get("log_uri")
6969
6992
  return typing.cast(typing.Optional[builtins.str], result)
6970
6993
 
6994
+ @builtins.property
6995
+ def maintenance_window(self) -> typing.Optional[builtins.str]:
6996
+ '''
6997
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-job.html#cfn-glue-job-maintenancewindow
6998
+ '''
6999
+ result = self._values.get("maintenance_window")
7000
+ return typing.cast(typing.Optional[builtins.str], result)
7001
+
6971
7002
  @builtins.property
6972
7003
  def max_capacity(self) -> typing.Optional[jsii.Number]:
6973
7004
  '''The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.
@@ -16027,6 +16058,7 @@ def _typecheckingstub__2bea698eff4ea1d2bc08b1ab842f318f77ba719c0241a0959453e2698
16027
16058
  execution_property: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnJob.ExecutionPropertyProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
16028
16059
  glue_version: typing.Optional[builtins.str] = None,
16029
16060
  log_uri: typing.Optional[builtins.str] = None,
16061
+ maintenance_window: typing.Optional[builtins.str] = None,
16030
16062
  max_capacity: typing.Optional[jsii.Number] = None,
16031
16063
  max_retries: typing.Optional[jsii.Number] = None,
16032
16064
  name: typing.Optional[builtins.str] = None,
@@ -16113,6 +16145,12 @@ def _typecheckingstub__9ca81eaaed120981305eb66586283b558b72d3b37cb0098234ec82c56
16113
16145
  """Type checking stubs"""
16114
16146
  pass
16115
16147
 
16148
+ def _typecheckingstub__42885410f13bc9dd6ce3f11fca98e52266bcf89c43473b8d39f8980ef7b211d0(
16149
+ value: typing.Optional[builtins.str],
16150
+ ) -> None:
16151
+ """Type checking stubs"""
16152
+ pass
16153
+
16116
16154
  def _typecheckingstub__6a764dd1178d54ad958e98a11fae132faf1dc82baf8cc6de7a480139bec56d6c(
16117
16155
  value: typing.Optional[jsii.Number],
16118
16156
  ) -> None:
@@ -16216,6 +16254,7 @@ def _typecheckingstub__1b5bd8295520fa719be46f80478ae155292fb66f6fc3016eb114b6fab
16216
16254
  execution_property: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnJob.ExecutionPropertyProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
16217
16255
  glue_version: typing.Optional[builtins.str] = None,
16218
16256
  log_uri: typing.Optional[builtins.str] = None,
16257
+ maintenance_window: typing.Optional[builtins.str] = None,
16219
16258
  max_capacity: typing.Optional[jsii.Number] = None,
16220
16259
  max_retries: typing.Optional[jsii.Number] = None,
16221
16260
  name: typing.Optional[builtins.str] = None,