aws-cdk-lib 2.141.0__py3-none-any.whl → 2.142.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.

@@ -384,12 +384,13 @@ fargate_task_definition = ecs.FargateTaskDefinition(self, "TaskDef",
384
384
  ),
385
385
  memory_limit_mi_b=512,
386
386
  cpu=256,
387
- pid_mode=ecs.PidMode.HOST
387
+ pid_mode=ecs.PidMode.TASK
388
388
  )
389
389
  ```
390
390
 
391
391
  **Note:** `pidMode` is only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version 1.4.0
392
- or later (Linux). This isn't supported for Windows containers on Fargate.
392
+ or later (Linux). Only the `task` option is supported for Linux containers. `pidMode` isn't supported for Windows containers on Fargate.
393
+ If `pidMode` is specified for a Fargate task, then `runtimePlatform.operatingSystemFamily` must also be specified.
393
394
 
394
395
  To add containers to a task definition, call `addContainer()`:
395
396
 
@@ -1971,6 +1972,7 @@ from ..aws_cloudwatch import (
1971
1972
  from ..aws_ec2 import (
1972
1973
  Connections as _Connections_0f31fce8,
1973
1974
  EbsDeviceVolumeType as _EbsDeviceVolumeType_6792555b,
1975
+ IKeyPair as _IKeyPair_bc344eda,
1974
1976
  IMachineImage as _IMachineImage_0e8bd50b,
1975
1977
  ISecurityGroup as _ISecurityGroup_acf8a799,
1976
1978
  IVpc as _IVpc_f30d5663,
@@ -2174,6 +2176,7 @@ class AddAutoScalingGroupCapacityOptions:
2174
2176
  "ignore_unmodified_size_properties": "ignoreUnmodifiedSizeProperties",
2175
2177
  "instance_monitoring": "instanceMonitoring",
2176
2178
  "key_name": "keyName",
2179
+ "key_pair": "keyPair",
2177
2180
  "max_capacity": "maxCapacity",
2178
2181
  "max_instance_lifetime": "maxInstanceLifetime",
2179
2182
  "min_capacity": "minCapacity",
@@ -2214,6 +2217,7 @@ class AddCapacityOptions(
2214
2217
  ignore_unmodified_size_properties: typing.Optional[builtins.bool] = None,
2215
2218
  instance_monitoring: typing.Optional[_Monitoring_50020f91] = None,
2216
2219
  key_name: typing.Optional[builtins.str] = None,
2220
+ key_pair: typing.Optional[_IKeyPair_bc344eda] = None,
2217
2221
  max_capacity: typing.Optional[jsii.Number] = None,
2218
2222
  max_instance_lifetime: typing.Optional[_Duration_4839e8c3] = None,
2219
2223
  min_capacity: typing.Optional[jsii.Number] = None,
@@ -2247,7 +2251,8 @@ class AddCapacityOptions(
2247
2251
  :param health_check: Configuration for health checks. Default: - HealthCheck.ec2 with no grace period
2248
2252
  :param ignore_unmodified_size_properties: If the ASG has scheduled actions, don't reset unchanged group sizes. Only used if the ASG has scheduled actions (which may scale your ASG up or down regardless of cdk deployments). If true, the size of the group will only be reset if it has been changed in the CDK app. If false, the sizes will always be changed back to what they were in the CDK app on deployment. Default: true
2249
2253
  :param instance_monitoring: Controls whether instances in this group are launched with detailed or basic monitoring. When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account is charged a fee. When you disable detailed monitoring, CloudWatch generates metrics every 5 minutes. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified Default: - Monitoring.DETAILED
2250
- :param key_name: Name of SSH keypair to grant access to instances. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified Default: - No SSH access will be possible.
2254
+ :param key_name: (deprecated) Name of SSH keypair to grant access to instances. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified You can either specify ``keyPair`` or ``keyName``, not both. Default: - No SSH access will be possible.
2255
+ :param key_pair: The SSH keypair to grant access to the instance. Feature flag ``AUTOSCALING_GENERATE_LAUNCH_TEMPLATE`` must be enabled to use this property. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified. You can either specify ``keyPair`` or ``keyName``, not both. Default: - No SSH access will be possible.
2251
2256
  :param max_capacity: Maximum number of instances in the fleet. Default: desiredCapacity
2252
2257
  :param max_instance_lifetime: The maximum amount of time that an instance can be in service. The maximum duration applies to all current and future instances in the group. As an instance approaches its maximum duration, it is terminated and replaced, and cannot be used again. You must specify a value of at least 604,800 seconds (7 days). To clear a previously set value, leave this property undefined. Default: none
2253
2258
  :param min_capacity: Minimum number of instances in the fleet. Default: 1
@@ -2297,6 +2302,7 @@ class AddCapacityOptions(
2297
2302
  check_type(argname="argument ignore_unmodified_size_properties", value=ignore_unmodified_size_properties, expected_type=type_hints["ignore_unmodified_size_properties"])
2298
2303
  check_type(argname="argument instance_monitoring", value=instance_monitoring, expected_type=type_hints["instance_monitoring"])
2299
2304
  check_type(argname="argument key_name", value=key_name, expected_type=type_hints["key_name"])
2305
+ check_type(argname="argument key_pair", value=key_pair, expected_type=type_hints["key_pair"])
2300
2306
  check_type(argname="argument max_capacity", value=max_capacity, expected_type=type_hints["max_capacity"])
2301
2307
  check_type(argname="argument max_instance_lifetime", value=max_instance_lifetime, expected_type=type_hints["max_instance_lifetime"])
2302
2308
  check_type(argname="argument min_capacity", value=min_capacity, expected_type=type_hints["min_capacity"])
@@ -2348,6 +2354,8 @@ class AddCapacityOptions(
2348
2354
  self._values["instance_monitoring"] = instance_monitoring
2349
2355
  if key_name is not None:
2350
2356
  self._values["key_name"] = key_name
2357
+ if key_pair is not None:
2358
+ self._values["key_pair"] = key_pair
2351
2359
  if max_capacity is not None:
2352
2360
  self._values["max_capacity"] = max_capacity
2353
2361
  if max_instance_lifetime is not None:
@@ -2582,15 +2590,36 @@ class AddCapacityOptions(
2582
2590
 
2583
2591
  @builtins.property
2584
2592
  def key_name(self) -> typing.Optional[builtins.str]:
2585
- '''Name of SSH keypair to grant access to instances.
2593
+ '''(deprecated) Name of SSH keypair to grant access to instances.
2586
2594
 
2587
2595
  ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified
2588
2596
 
2597
+ You can either specify ``keyPair`` or ``keyName``, not both.
2598
+
2589
2599
  :default: - No SSH access will be possible.
2600
+
2601
+ :deprecated: - Use ``keyPair`` instead - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2-readme.html#using-an-existing-ec2-key-pair
2602
+
2603
+ :stability: deprecated
2590
2604
  '''
2591
2605
  result = self._values.get("key_name")
2592
2606
  return typing.cast(typing.Optional[builtins.str], result)
2593
2607
 
2608
+ @builtins.property
2609
+ def key_pair(self) -> typing.Optional[_IKeyPair_bc344eda]:
2610
+ '''The SSH keypair to grant access to the instance.
2611
+
2612
+ Feature flag ``AUTOSCALING_GENERATE_LAUNCH_TEMPLATE`` must be enabled to use this property.
2613
+
2614
+ ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified.
2615
+
2616
+ You can either specify ``keyPair`` or ``keyName``, not both.
2617
+
2618
+ :default: - No SSH access will be possible.
2619
+ '''
2620
+ result = self._values.get("key_pair")
2621
+ return typing.cast(typing.Optional[_IKeyPair_bc344eda], result)
2622
+
2594
2623
  @builtins.property
2595
2624
  def max_capacity(self) -> typing.Optional[jsii.Number]:
2596
2625
  '''Maximum number of instances in the fleet.
@@ -26056,7 +26085,7 @@ class FargateTaskDefinitionProps(CommonTaskDefinitionProps):
26056
26085
  :param cpu: The number of cpu units used by the task. For tasks using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the memory parameter: 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) 8192 (8 vCPU) - Available memory values: Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) 16384 (16 vCPU) - Available memory values: Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) Default: 256
26057
26086
  :param ephemeral_storage_gib: The amount (in GiB) of ephemeral storage to be allocated to the task. The maximum supported value is 200 GiB. NOTE: This parameter is only supported for tasks hosted on AWS Fargate using platform version 1.4.0 or later. Default: 20
26058
26087
  :param memory_limit_mib: The amount (in MiB) of memory used by the task. For tasks using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU) 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU) 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU) Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) - Available cpu values: 8192 (8 vCPU) Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) - Available cpu values: 16384 (16 vCPU) Default: 512
26059
- :param pid_mode: The process namespace to use for the containers in the task. Only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version 1.4.0 or later (Linux). Not supported in Windows containers. Default: - PidMode used by the task is not specified
26088
+ :param pid_mode: The process namespace to use for the containers in the task. Only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version 1.4.0 or later (Linux). Only the TASK option is supported for Linux-based Fargate containers. Not supported in Windows containers. If pidMode is specified for a Fargate task, then runtimePlatform.operatingSystemFamily must also be specified. For more information, see `Task Definition Parameters <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_pidmode>`_. Default: - PidMode used by the task is not specified
26060
26089
  :param runtime_platform: The operating system that your task definitions are running on. A runtimePlatform is supported only for tasks using the Fargate launch type. Default: - Undefined.
26061
26090
 
26062
26091
  :exampleMetadata: infused
@@ -26070,7 +26099,7 @@ class FargateTaskDefinitionProps(CommonTaskDefinitionProps):
26070
26099
  ),
26071
26100
  memory_limit_mi_b=512,
26072
26101
  cpu=256,
26073
- pid_mode=ecs.PidMode.HOST
26102
+ pid_mode=ecs.PidMode.TASK
26074
26103
  )
26075
26104
  '''
26076
26105
  if isinstance(runtime_platform, dict):
@@ -26232,8 +26261,11 @@ class FargateTaskDefinitionProps(CommonTaskDefinitionProps):
26232
26261
  '''The process namespace to use for the containers in the task.
26233
26262
 
26234
26263
  Only supported for tasks that are hosted on AWS Fargate if the tasks
26235
- are using platform version 1.4.0 or later (Linux).
26236
- Not supported in Windows containers.
26264
+ are using platform version 1.4.0 or later (Linux). Only the TASK option
26265
+ is supported for Linux-based Fargate containers. Not supported in
26266
+ Windows containers. If pidMode is specified for a Fargate task, then
26267
+ runtimePlatform.operatingSystemFamily must also be specified. For more
26268
+ information, see `Task Definition Parameters <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_pidmode>`_.
26237
26269
 
26238
26270
  :default: - PidMode used by the task is not specified
26239
26271
  '''
@@ -31351,9 +31383,14 @@ class OperatingSystemFamily(
31351
31383
  check_type(argname="argument family", value=family, expected_type=type_hints["family"])
31352
31384
  return typing.cast("OperatingSystemFamily", jsii.sinvoke(cls, "of", [family]))
31353
31385
 
31386
+ @jsii.member(jsii_name="isLinux")
31387
+ def is_linux(self) -> builtins.bool:
31388
+ '''Indicates whether the operating system family is Linux.'''
31389
+ return typing.cast(builtins.bool, jsii.invoke(self, "isLinux", []))
31390
+
31354
31391
  @jsii.member(jsii_name="isWindows")
31355
31392
  def is_windows(self) -> builtins.bool:
31356
- '''Returns true if the operating system family is Windows.'''
31393
+ '''Indicates whether the operating system family is Windows.'''
31357
31394
  return typing.cast(builtins.bool, jsii.invoke(self, "isWindows", []))
31358
31395
 
31359
31396
  @jsii.python.classproperty
@@ -31420,7 +31457,7 @@ class PidMode(enum.Enum):
31420
31457
  ),
31421
31458
  memory_limit_mi_b=512,
31422
31459
  cpu=256,
31423
- pid_mode=ecs.PidMode.HOST
31460
+ pid_mode=ecs.PidMode.TASK
31424
31461
  )
31425
31462
  '''
31426
31463
 
@@ -35190,7 +35227,7 @@ class TaskDefinition(
35190
35227
  :param ipc_mode: The IPC resource namespace to use for the containers in the task. Not supported in Fargate and Windows containers. Default: - IpcMode used by the task is not specified
35191
35228
  :param memory_mib: The amount (in MiB) of memory used by the task. If using the EC2 launch type, this field is optional and any value can be used. If using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU) 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU) 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU) Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) - Available cpu values: 8192 (8 vCPU) Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) - Available cpu values: 16384 (16 vCPU) Default: - Memory used by task is not specified.
35192
35229
  :param network_mode: The networking mode to use for the containers in the task. On Fargate, the only supported networking mode is AwsVpc. Default: - NetworkMode.Bridge for EC2 & External tasks, AwsVpc for Fargate tasks.
35193
- :param pid_mode: The process namespace to use for the containers in the task. Only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version 1.4.0 or later (Linux). Not supported in Windows containers. Default: - PidMode used by the task is not specified
35230
+ :param pid_mode: The process namespace to use for the containers in the task. Only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version 1.4.0 or later (Linux). Only the TASK option is supported for Linux-based Fargate containers. Not supported in Windows containers. If pidMode is specified for a Fargate task, then runtimePlatform.operatingSystemFamily must also be specified. For more information, see `Task Definition Parameters <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_pidmode>`_. Default: - PidMode used by the task is not specified
35194
35231
  :param placement_constraints: The placement constraints to use for tasks in the service. You can specify a maximum of 10 constraints per task (this limit includes constraints in the task definition and those specified at run time). Not supported in Fargate. Default: - No placement constraints.
35195
35232
  :param runtime_platform: The operating system that your task definitions are running on. A runtimePlatform is supported only for tasks using the Fargate launch type. Default: - Undefined.
35196
35233
  :param execution_role: The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf. The role will be used to retrieve container images from ECR and create CloudWatch log groups. Default: - An execution role will be automatically created if you use ECR images in your task definition.
@@ -35766,8 +35803,10 @@ class TaskDefinition(
35766
35803
  '''The process namespace to use for the containers in the task.
35767
35804
 
35768
35805
  Only supported for tasks that are hosted on AWS Fargate if the tasks
35769
- are using platform version 1.4.0 or later (Linux).
35770
- Not supported in Windows containers.
35806
+ are using platform version 1.4.0 or later (Linux). Not supported in
35807
+ Windows containers. If pidMode is specified for a Fargate task,
35808
+ then runtimePlatform.operatingSystemFamily must also be specified. For more
35809
+ information, see `Task Definition Parameters <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_pidmode>`_.
35771
35810
  '''
35772
35811
  return typing.cast(typing.Optional[PidMode], jsii.get(self, "pidMode"))
35773
35812
 
@@ -35977,7 +36016,7 @@ class TaskDefinitionProps(CommonTaskDefinitionProps):
35977
36016
  :param ipc_mode: The IPC resource namespace to use for the containers in the task. Not supported in Fargate and Windows containers. Default: - IpcMode used by the task is not specified
35978
36017
  :param memory_mib: The amount (in MiB) of memory used by the task. If using the EC2 launch type, this field is optional and any value can be used. If using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU) 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU) 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU) Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) - Available cpu values: 8192 (8 vCPU) Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) - Available cpu values: 16384 (16 vCPU) Default: - Memory used by task is not specified.
35979
36018
  :param network_mode: The networking mode to use for the containers in the task. On Fargate, the only supported networking mode is AwsVpc. Default: - NetworkMode.Bridge for EC2 & External tasks, AwsVpc for Fargate tasks.
35980
- :param pid_mode: The process namespace to use for the containers in the task. Only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version 1.4.0 or later (Linux). Not supported in Windows containers. Default: - PidMode used by the task is not specified
36019
+ :param pid_mode: The process namespace to use for the containers in the task. Only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version 1.4.0 or later (Linux). Only the TASK option is supported for Linux-based Fargate containers. Not supported in Windows containers. If pidMode is specified for a Fargate task, then runtimePlatform.operatingSystemFamily must also be specified. For more information, see `Task Definition Parameters <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_pidmode>`_. Default: - PidMode used by the task is not specified
35981
36020
  :param placement_constraints: The placement constraints to use for tasks in the service. You can specify a maximum of 10 constraints per task (this limit includes constraints in the task definition and those specified at run time). Not supported in Fargate. Default: - No placement constraints.
35982
36021
  :param runtime_platform: The operating system that your task definitions are running on. A runtimePlatform is supported only for tasks using the Fargate launch type. Default: - Undefined.
35983
36022
 
@@ -36230,8 +36269,11 @@ class TaskDefinitionProps(CommonTaskDefinitionProps):
36230
36269
  '''The process namespace to use for the containers in the task.
36231
36270
 
36232
36271
  Only supported for tasks that are hosted on AWS Fargate if the tasks
36233
- are using platform version 1.4.0 or later (Linux).
36234
- Not supported in Windows containers.
36272
+ are using platform version 1.4.0 or later (Linux). Only the TASK option
36273
+ is supported for Linux-based Fargate containers. Not supported in Windows
36274
+ containers. If pidMode is specified for a Fargate task, then
36275
+ runtimePlatform.operatingSystemFamily must also be specified. For more
36276
+ information, see `Task Definition Parameters <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_pidmode>`_.
36235
36277
 
36236
36278
  :default: - PidMode used by the task is not specified
36237
36279
  '''
@@ -37649,6 +37691,7 @@ class Cluster(
37649
37691
  ignore_unmodified_size_properties: typing.Optional[builtins.bool] = None,
37650
37692
  instance_monitoring: typing.Optional[_Monitoring_50020f91] = None,
37651
37693
  key_name: typing.Optional[builtins.str] = None,
37694
+ key_pair: typing.Optional[_IKeyPair_bc344eda] = None,
37652
37695
  max_capacity: typing.Optional[jsii.Number] = None,
37653
37696
  max_instance_lifetime: typing.Optional[_Duration_4839e8c3] = None,
37654
37697
  min_capacity: typing.Optional[jsii.Number] = None,
@@ -37687,7 +37730,8 @@ class Cluster(
37687
37730
  :param health_check: Configuration for health checks. Default: - HealthCheck.ec2 with no grace period
37688
37731
  :param ignore_unmodified_size_properties: If the ASG has scheduled actions, don't reset unchanged group sizes. Only used if the ASG has scheduled actions (which may scale your ASG up or down regardless of cdk deployments). If true, the size of the group will only be reset if it has been changed in the CDK app. If false, the sizes will always be changed back to what they were in the CDK app on deployment. Default: true
37689
37732
  :param instance_monitoring: Controls whether instances in this group are launched with detailed or basic monitoring. When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account is charged a fee. When you disable detailed monitoring, CloudWatch generates metrics every 5 minutes. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified Default: - Monitoring.DETAILED
37690
- :param key_name: Name of SSH keypair to grant access to instances. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified Default: - No SSH access will be possible.
37733
+ :param key_name: (deprecated) Name of SSH keypair to grant access to instances. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified You can either specify ``keyPair`` or ``keyName``, not both. Default: - No SSH access will be possible.
37734
+ :param key_pair: The SSH keypair to grant access to the instance. Feature flag ``AUTOSCALING_GENERATE_LAUNCH_TEMPLATE`` must be enabled to use this property. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified. You can either specify ``keyPair`` or ``keyName``, not both. Default: - No SSH access will be possible.
37691
37735
  :param max_capacity: Maximum number of instances in the fleet. Default: desiredCapacity
37692
37736
  :param max_instance_lifetime: The maximum amount of time that an instance can be in service. The maximum duration applies to all current and future instances in the group. As an instance approaches its maximum duration, it is terminated and replaced, and cannot be used again. You must specify a value of at least 604,800 seconds (7 days). To clear a previously set value, leave this property undefined. Default: none
37693
37737
  :param min_capacity: Minimum number of instances in the fleet. Default: 1
@@ -37724,6 +37768,7 @@ class Cluster(
37724
37768
  ignore_unmodified_size_properties=ignore_unmodified_size_properties,
37725
37769
  instance_monitoring=instance_monitoring,
37726
37770
  key_name=key_name,
37771
+ key_pair=key_pair,
37727
37772
  max_capacity=max_capacity,
37728
37773
  max_instance_lifetime=max_instance_lifetime,
37729
37774
  min_capacity=min_capacity,
@@ -40506,7 +40551,7 @@ class FargateTaskDefinition(
40506
40551
  :param cpu: The number of cpu units used by the task. For tasks using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the memory parameter: 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) 8192 (8 vCPU) - Available memory values: Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) 16384 (16 vCPU) - Available memory values: Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) Default: 256
40507
40552
  :param ephemeral_storage_gib: The amount (in GiB) of ephemeral storage to be allocated to the task. The maximum supported value is 200 GiB. NOTE: This parameter is only supported for tasks hosted on AWS Fargate using platform version 1.4.0 or later. Default: 20
40508
40553
  :param memory_limit_mib: The amount (in MiB) of memory used by the task. For tasks using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU) 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU) 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU) Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) - Available cpu values: 8192 (8 vCPU) Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) - Available cpu values: 16384 (16 vCPU) Default: 512
40509
- :param pid_mode: The process namespace to use for the containers in the task. Only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version 1.4.0 or later (Linux). Not supported in Windows containers. Default: - PidMode used by the task is not specified
40554
+ :param pid_mode: The process namespace to use for the containers in the task. Only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version 1.4.0 or later (Linux). Only the TASK option is supported for Linux-based Fargate containers. Not supported in Windows containers. If pidMode is specified for a Fargate task, then runtimePlatform.operatingSystemFamily must also be specified. For more information, see `Task Definition Parameters <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_pidmode>`_. Default: - PidMode used by the task is not specified
40510
40555
  :param runtime_platform: The operating system that your task definitions are running on. A runtimePlatform is supported only for tasks using the Fargate launch type. Default: - Undefined.
40511
40556
  :param execution_role: The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf. The role will be used to retrieve container images from ECR and create CloudWatch log groups. Default: - An execution role will be automatically created if you use ECR images in your task definition.
40512
40557
  :param family: The name of a family that this task definition is registered to. A family groups multiple versions of a task definition. Default: - Automatically generated name.
@@ -40839,6 +40884,7 @@ def _typecheckingstub__64f2d9b3495e3be78346f77d5ad90928968c8ce230e670b6279dc67ad
40839
40884
  ignore_unmodified_size_properties: typing.Optional[builtins.bool] = None,
40840
40885
  instance_monitoring: typing.Optional[_Monitoring_50020f91] = None,
40841
40886
  key_name: typing.Optional[builtins.str] = None,
40887
+ key_pair: typing.Optional[_IKeyPair_bc344eda] = None,
40842
40888
  max_capacity: typing.Optional[jsii.Number] = None,
40843
40889
  max_instance_lifetime: typing.Optional[_Duration_4839e8c3] = None,
40844
40890
  min_capacity: typing.Optional[jsii.Number] = None,
@@ -44488,6 +44534,7 @@ def _typecheckingstub__63e98e008463515927d4aee3c938d64639e34ce8a2c09fa766883be6a
44488
44534
  ignore_unmodified_size_properties: typing.Optional[builtins.bool] = None,
44489
44535
  instance_monitoring: typing.Optional[_Monitoring_50020f91] = None,
44490
44536
  key_name: typing.Optional[builtins.str] = None,
44537
+ key_pair: typing.Optional[_IKeyPair_bc344eda] = None,
44491
44538
  max_capacity: typing.Optional[jsii.Number] = None,
44492
44539
  max_instance_lifetime: typing.Optional[_Duration_4839e8c3] = None,
44493
44540
  min_capacity: typing.Optional[jsii.Number] = None,
@@ -1813,6 +1813,7 @@ from ..aws_autoscaling import (
1813
1813
  from ..aws_ec2 import (
1814
1814
  Connections as _Connections_0f31fce8,
1815
1815
  IConnectable as _IConnectable_10015a05,
1816
+ IKeyPair as _IKeyPair_bc344eda,
1816
1817
  IMachineImage as _IMachineImage_0e8bd50b,
1817
1818
  ISecurityGroup as _ISecurityGroup_acf8a799,
1818
1819
  ISubnet as _ISubnet_d57d1229,
@@ -2401,6 +2402,7 @@ class AlbScheme(enum.Enum):
2401
2402
  "ignore_unmodified_size_properties": "ignoreUnmodifiedSizeProperties",
2402
2403
  "instance_monitoring": "instanceMonitoring",
2403
2404
  "key_name": "keyName",
2405
+ "key_pair": "keyPair",
2404
2406
  "max_capacity": "maxCapacity",
2405
2407
  "max_instance_lifetime": "maxInstanceLifetime",
2406
2408
  "min_capacity": "minCapacity",
@@ -2438,6 +2440,7 @@ class AutoScalingGroupCapacityOptions(_CommonAutoScalingGroupProps_808bbf2d):
2438
2440
  ignore_unmodified_size_properties: typing.Optional[builtins.bool] = None,
2439
2441
  instance_monitoring: typing.Optional[_Monitoring_50020f91] = None,
2440
2442
  key_name: typing.Optional[builtins.str] = None,
2443
+ key_pair: typing.Optional[_IKeyPair_bc344eda] = None,
2441
2444
  max_capacity: typing.Optional[jsii.Number] = None,
2442
2445
  max_instance_lifetime: typing.Optional[_Duration_4839e8c3] = None,
2443
2446
  min_capacity: typing.Optional[jsii.Number] = None,
@@ -2471,7 +2474,8 @@ class AutoScalingGroupCapacityOptions(_CommonAutoScalingGroupProps_808bbf2d):
2471
2474
  :param health_check: Configuration for health checks. Default: - HealthCheck.ec2 with no grace period
2472
2475
  :param ignore_unmodified_size_properties: If the ASG has scheduled actions, don't reset unchanged group sizes. Only used if the ASG has scheduled actions (which may scale your ASG up or down regardless of cdk deployments). If true, the size of the group will only be reset if it has been changed in the CDK app. If false, the sizes will always be changed back to what they were in the CDK app on deployment. Default: true
2473
2476
  :param instance_monitoring: Controls whether instances in this group are launched with detailed or basic monitoring. When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account is charged a fee. When you disable detailed monitoring, CloudWatch generates metrics every 5 minutes. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified Default: - Monitoring.DETAILED
2474
- :param key_name: Name of SSH keypair to grant access to instances. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified Default: - No SSH access will be possible.
2477
+ :param key_name: (deprecated) Name of SSH keypair to grant access to instances. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified You can either specify ``keyPair`` or ``keyName``, not both. Default: - No SSH access will be possible.
2478
+ :param key_pair: The SSH keypair to grant access to the instance. Feature flag ``AUTOSCALING_GENERATE_LAUNCH_TEMPLATE`` must be enabled to use this property. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified. You can either specify ``keyPair`` or ``keyName``, not both. Default: - No SSH access will be possible.
2475
2479
  :param max_capacity: Maximum number of instances in the fleet. Default: desiredCapacity
2476
2480
  :param max_instance_lifetime: The maximum amount of time that an instance can be in service. The maximum duration applies to all current and future instances in the group. As an instance approaches its maximum duration, it is terminated and replaced, and cannot be used again. You must specify a value of at least 604,800 seconds (7 days). To clear a previously set value, leave this property undefined. Default: none
2477
2481
  :param min_capacity: Minimum number of instances in the fleet. Default: 1
@@ -2522,6 +2526,7 @@ class AutoScalingGroupCapacityOptions(_CommonAutoScalingGroupProps_808bbf2d):
2522
2526
  check_type(argname="argument ignore_unmodified_size_properties", value=ignore_unmodified_size_properties, expected_type=type_hints["ignore_unmodified_size_properties"])
2523
2527
  check_type(argname="argument instance_monitoring", value=instance_monitoring, expected_type=type_hints["instance_monitoring"])
2524
2528
  check_type(argname="argument key_name", value=key_name, expected_type=type_hints["key_name"])
2529
+ check_type(argname="argument key_pair", value=key_pair, expected_type=type_hints["key_pair"])
2525
2530
  check_type(argname="argument max_capacity", value=max_capacity, expected_type=type_hints["max_capacity"])
2526
2531
  check_type(argname="argument max_instance_lifetime", value=max_instance_lifetime, expected_type=type_hints["max_instance_lifetime"])
2527
2532
  check_type(argname="argument min_capacity", value=min_capacity, expected_type=type_hints["min_capacity"])
@@ -2569,6 +2574,8 @@ class AutoScalingGroupCapacityOptions(_CommonAutoScalingGroupProps_808bbf2d):
2569
2574
  self._values["instance_monitoring"] = instance_monitoring
2570
2575
  if key_name is not None:
2571
2576
  self._values["key_name"] = key_name
2577
+ if key_pair is not None:
2578
+ self._values["key_pair"] = key_pair
2572
2579
  if max_capacity is not None:
2573
2580
  self._values["max_capacity"] = max_capacity
2574
2581
  if max_instance_lifetime is not None:
@@ -2765,15 +2772,36 @@ class AutoScalingGroupCapacityOptions(_CommonAutoScalingGroupProps_808bbf2d):
2765
2772
 
2766
2773
  @builtins.property
2767
2774
  def key_name(self) -> typing.Optional[builtins.str]:
2768
- '''Name of SSH keypair to grant access to instances.
2775
+ '''(deprecated) Name of SSH keypair to grant access to instances.
2769
2776
 
2770
2777
  ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified
2771
2778
 
2779
+ You can either specify ``keyPair`` or ``keyName``, not both.
2780
+
2772
2781
  :default: - No SSH access will be possible.
2782
+
2783
+ :deprecated: - Use ``keyPair`` instead - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2-readme.html#using-an-existing-ec2-key-pair
2784
+
2785
+ :stability: deprecated
2773
2786
  '''
2774
2787
  result = self._values.get("key_name")
2775
2788
  return typing.cast(typing.Optional[builtins.str], result)
2776
2789
 
2790
+ @builtins.property
2791
+ def key_pair(self) -> typing.Optional[_IKeyPair_bc344eda]:
2792
+ '''The SSH keypair to grant access to the instance.
2793
+
2794
+ Feature flag ``AUTOSCALING_GENERATE_LAUNCH_TEMPLATE`` must be enabled to use this property.
2795
+
2796
+ ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified.
2797
+
2798
+ You can either specify ``keyPair`` or ``keyName``, not both.
2799
+
2800
+ :default: - No SSH access will be possible.
2801
+ '''
2802
+ result = self._values.get("key_pair")
2803
+ return typing.cast(typing.Optional[_IKeyPair_bc344eda], result)
2804
+
2777
2805
  @builtins.property
2778
2806
  def max_capacity(self) -> typing.Optional[jsii.Number]:
2779
2807
  '''Maximum number of instances in the fleet.
@@ -15325,6 +15353,7 @@ class Cluster(
15325
15353
  ignore_unmodified_size_properties: typing.Optional[builtins.bool] = None,
15326
15354
  instance_monitoring: typing.Optional[_Monitoring_50020f91] = None,
15327
15355
  key_name: typing.Optional[builtins.str] = None,
15356
+ key_pair: typing.Optional[_IKeyPair_bc344eda] = None,
15328
15357
  max_capacity: typing.Optional[jsii.Number] = None,
15329
15358
  max_instance_lifetime: typing.Optional[_Duration_4839e8c3] = None,
15330
15359
  min_capacity: typing.Optional[jsii.Number] = None,
@@ -15371,7 +15400,8 @@ class Cluster(
15371
15400
  :param health_check: Configuration for health checks. Default: - HealthCheck.ec2 with no grace period
15372
15401
  :param ignore_unmodified_size_properties: If the ASG has scheduled actions, don't reset unchanged group sizes. Only used if the ASG has scheduled actions (which may scale your ASG up or down regardless of cdk deployments). If true, the size of the group will only be reset if it has been changed in the CDK app. If false, the sizes will always be changed back to what they were in the CDK app on deployment. Default: true
15373
15402
  :param instance_monitoring: Controls whether instances in this group are launched with detailed or basic monitoring. When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account is charged a fee. When you disable detailed monitoring, CloudWatch generates metrics every 5 minutes. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified Default: - Monitoring.DETAILED
15374
- :param key_name: Name of SSH keypair to grant access to instances. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified Default: - No SSH access will be possible.
15403
+ :param key_name: (deprecated) Name of SSH keypair to grant access to instances. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified You can either specify ``keyPair`` or ``keyName``, not both. Default: - No SSH access will be possible.
15404
+ :param key_pair: The SSH keypair to grant access to the instance. Feature flag ``AUTOSCALING_GENERATE_LAUNCH_TEMPLATE`` must be enabled to use this property. ``launchTemplate`` and ``mixedInstancesPolicy`` must not be specified when this property is specified. You can either specify ``keyPair`` or ``keyName``, not both. Default: - No SSH access will be possible.
15375
15405
  :param max_capacity: Maximum number of instances in the fleet. Default: desiredCapacity
15376
15406
  :param max_instance_lifetime: The maximum amount of time that an instance can be in service. The maximum duration applies to all current and future instances in the group. As an instance approaches its maximum duration, it is terminated and replaced, and cannot be used again. You must specify a value of at least 604,800 seconds (7 days). To clear a previously set value, leave this property undefined. Default: none
15377
15407
  :param min_capacity: Minimum number of instances in the fleet. Default: 1
@@ -15408,6 +15438,7 @@ class Cluster(
15408
15438
  ignore_unmodified_size_properties=ignore_unmodified_size_properties,
15409
15439
  instance_monitoring=instance_monitoring,
15410
15440
  key_name=key_name,
15441
+ key_pair=key_pair,
15411
15442
  max_capacity=max_capacity,
15412
15443
  max_instance_lifetime=max_instance_lifetime,
15413
15444
  min_capacity=min_capacity,
@@ -18064,6 +18095,7 @@ def _typecheckingstub__9ac94eb5cd9569dcf4122cf20026c6f104b737f68ecd3395b237320bd
18064
18095
  ignore_unmodified_size_properties: typing.Optional[builtins.bool] = None,
18065
18096
  instance_monitoring: typing.Optional[_Monitoring_50020f91] = None,
18066
18097
  key_name: typing.Optional[builtins.str] = None,
18098
+ key_pair: typing.Optional[_IKeyPair_bc344eda] = None,
18067
18099
  max_capacity: typing.Optional[jsii.Number] = None,
18068
18100
  max_instance_lifetime: typing.Optional[_Duration_4839e8c3] = None,
18069
18101
  min_capacity: typing.Optional[jsii.Number] = None,
@@ -19626,6 +19658,7 @@ def _typecheckingstub__e9e81d821b1c1d14225d1c9cc695af8e71b96a7489dcd36bd237c9363
19626
19658
  ignore_unmodified_size_properties: typing.Optional[builtins.bool] = None,
19627
19659
  instance_monitoring: typing.Optional[_Monitoring_50020f91] = None,
19628
19660
  key_name: typing.Optional[builtins.str] = None,
19661
+ key_pair: typing.Optional[_IKeyPair_bc344eda] = None,
19629
19662
  max_capacity: typing.Optional[jsii.Number] = None,
19630
19663
  max_instance_lifetime: typing.Optional[_Duration_4839e8c3] = None,
19631
19664
  min_capacity: typing.Optional[jsii.Number] = None,
@@ -10032,6 +10032,7 @@ class RuleProps(EventCommonOptions):
10032
10032
  jsii_struct_bases=[],
10033
10033
  name_mapping={
10034
10034
  "arn": "arn",
10035
+ "app_sync_parameters": "appSyncParameters",
10035
10036
  "batch_parameters": "batchParameters",
10036
10037
  "dead_letter_config": "deadLetterConfig",
10037
10038
  "ecs_parameters": "ecsParameters",
@@ -10050,6 +10051,7 @@ class RuleTargetConfig:
10050
10051
  self,
10051
10052
  *,
10052
10053
  arn: builtins.str,
10054
+ app_sync_parameters: typing.Optional[typing.Union[CfnRule.AppSyncParametersProperty, typing.Dict[builtins.str, typing.Any]]] = None,
10053
10055
  batch_parameters: typing.Optional[typing.Union[CfnRule.BatchParametersProperty, typing.Dict[builtins.str, typing.Any]]] = None,
10054
10056
  dead_letter_config: typing.Optional[typing.Union[CfnRule.DeadLetterConfigProperty, typing.Dict[builtins.str, typing.Any]]] = None,
10055
10057
  ecs_parameters: typing.Optional[typing.Union[CfnRule.EcsParametersProperty, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -10065,6 +10067,7 @@ class RuleTargetConfig:
10065
10067
  '''Properties for an event rule target.
10066
10068
 
10067
10069
  :param arn: The Amazon Resource Name (ARN) of the target.
10070
+ :param app_sync_parameters: Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API. Default: - None
10068
10071
  :param batch_parameters: Parameters used when the rule invokes Amazon AWS Batch Job/Queue. Default: no parameters set
10069
10072
  :param dead_letter_config: Contains information about a dead-letter queue configuration. Default: no dead-letter queue set
10070
10073
  :param ecs_parameters: The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.
@@ -10095,6 +10098,9 @@ class RuleTargetConfig:
10095
10098
  arn="arn",
10096
10099
 
10097
10100
  # the properties below are optional
10101
+ app_sync_parameters=events.CfnRule.AppSyncParametersProperty(
10102
+ graph_ql_operation="graphQlOperation"
10103
+ ),
10098
10104
  batch_parameters=events.CfnRule.BatchParametersProperty(
10099
10105
  job_definition="jobDefinition",
10100
10106
  job_name="jobName",
@@ -10181,6 +10187,8 @@ class RuleTargetConfig:
10181
10187
  target_resource=construct
10182
10188
  )
10183
10189
  '''
10190
+ if isinstance(app_sync_parameters, dict):
10191
+ app_sync_parameters = CfnRule.AppSyncParametersProperty(**app_sync_parameters)
10184
10192
  if isinstance(batch_parameters, dict):
10185
10193
  batch_parameters = CfnRule.BatchParametersProperty(**batch_parameters)
10186
10194
  if isinstance(dead_letter_config, dict):
@@ -10200,6 +10208,7 @@ class RuleTargetConfig:
10200
10208
  if __debug__:
10201
10209
  type_hints = typing.get_type_hints(_typecheckingstub__10b46a391417178d3d06a5360e56af2bf314e68a1662e39855324f1244482eab)
10202
10210
  check_type(argname="argument arn", value=arn, expected_type=type_hints["arn"])
10211
+ check_type(argname="argument app_sync_parameters", value=app_sync_parameters, expected_type=type_hints["app_sync_parameters"])
10203
10212
  check_type(argname="argument batch_parameters", value=batch_parameters, expected_type=type_hints["batch_parameters"])
10204
10213
  check_type(argname="argument dead_letter_config", value=dead_letter_config, expected_type=type_hints["dead_letter_config"])
10205
10214
  check_type(argname="argument ecs_parameters", value=ecs_parameters, expected_type=type_hints["ecs_parameters"])
@@ -10214,6 +10223,8 @@ class RuleTargetConfig:
10214
10223
  self._values: typing.Dict[builtins.str, typing.Any] = {
10215
10224
  "arn": arn,
10216
10225
  }
10226
+ if app_sync_parameters is not None:
10227
+ self._values["app_sync_parameters"] = app_sync_parameters
10217
10228
  if batch_parameters is not None:
10218
10229
  self._values["batch_parameters"] = batch_parameters
10219
10230
  if dead_letter_config is not None:
@@ -10244,6 +10255,15 @@ class RuleTargetConfig:
10244
10255
  assert result is not None, "Required property 'arn' is missing"
10245
10256
  return typing.cast(builtins.str, result)
10246
10257
 
10258
+ @builtins.property
10259
+ def app_sync_parameters(self) -> typing.Optional[CfnRule.AppSyncParametersProperty]:
10260
+ '''Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.
10261
+
10262
+ :default: - None
10263
+ '''
10264
+ result = self._values.get("app_sync_parameters")
10265
+ return typing.cast(typing.Optional[CfnRule.AppSyncParametersProperty], result)
10266
+
10247
10267
  @builtins.property
10248
10268
  def batch_parameters(self) -> typing.Optional[CfnRule.BatchParametersProperty]:
10249
10269
  '''Parameters used when the rule invokes Amazon AWS Batch Job/Queue.
@@ -10364,27 +10384,26 @@ class RuleTargetInput(
10364
10384
 
10365
10385
  Example::
10366
10386
 
10367
- import aws_cdk.aws_iam as iam
10368
- import aws_cdk.aws_stepfunctions as sfn
10387
+ import aws_cdk.aws_appsync as appsync
10369
10388
 
10370
10389
 
10371
- rule = events.Rule(self, "Rule",
10372
- schedule=events.Schedule.rate(Duration.minutes(1))
10390
+ api = appsync.GraphqlApi(self, "api",
10391
+ name="api",
10392
+ definition=appsync.Definition.from_file("schema.graphql"),
10393
+ authorization_config=appsync.AuthorizationConfig(
10394
+ default_authorization=appsync.AuthorizationMode(authorization_type=appsync.AuthorizationType.IAM)
10395
+ )
10373
10396
  )
10374
10397
 
10375
- dlq = sqs.Queue(self, "DeadLetterQueue")
10376
-
10377
- role = iam.Role(self, "Role",
10378
- assumed_by=iam.ServicePrincipal("events.amazonaws.com")
10379
- )
10380
- state_machine = sfn.StateMachine(self, "SM",
10381
- definition=sfn.Wait(self, "Hello", time=sfn.WaitTime.duration(Duration.seconds(10)))
10398
+ rule = events.Rule(self, "Rule",
10399
+ schedule=events.Schedule.rate(cdk.Duration.hours(1))
10382
10400
  )
10383
10401
 
10384
- rule.add_target(targets.SfnStateMachine(state_machine,
10385
- input=events.RuleTargetInput.from_object({"SomeParam": "SomeValue"}),
10386
- dead_letter_queue=dlq,
10387
- role=role
10402
+ rule.add_target(targets.AppSync(api,
10403
+ graph_qLOperation="mutation Publish($message: String!){ publish(message: $message) { message } }",
10404
+ variables=events.RuleTargetInput.from_object({
10405
+ "message": "hello world"
10406
+ })
10388
10407
  ))
10389
10408
  '''
10390
10409
 
@@ -10616,16 +10635,17 @@ class Schedule(
10616
10635
  schedule=events.Schedule.rate(cdk.Duration.hours(1))
10617
10636
  )
10618
10637
 
10619
- rule.add_target(targets.EcsTask(
10620
- cluster=cluster,
10621
- task_definition=task_definition,
10622
- task_count=1,
10623
- container_overrides=[targets.ContainerOverride(
10624
- container_name="TheContainer",
10625
- command=["echo", events.EventField.from_path("$.detail.event")]
10626
- )],
10627
- enable_execute_command=True
10628
- ))
10638
+ rule.add_target(
10639
+ targets.EcsTask(
10640
+ cluster=cluster,
10641
+ task_definition=task_definition,
10642
+ propagate_tags=ecs.PropagatedTagSource.TASK_DEFINITION,
10643
+ tags=[targets.Tag(
10644
+ key="my-tag",
10645
+ value="my-tag-value"
10646
+ )
10647
+ ]
10648
+ ))
10629
10649
  '''
10630
10650
 
10631
10651
  def __init__(self) -> None:
@@ -12586,6 +12606,7 @@ def _typecheckingstub__26677a946da4037892c1c589c005b7536d8ffed632ca92c5c52a92586
12586
12606
  def _typecheckingstub__10b46a391417178d3d06a5360e56af2bf314e68a1662e39855324f1244482eab(
12587
12607
  *,
12588
12608
  arn: builtins.str,
12609
+ app_sync_parameters: typing.Optional[typing.Union[CfnRule.AppSyncParametersProperty, typing.Dict[builtins.str, typing.Any]]] = None,
12589
12610
  batch_parameters: typing.Optional[typing.Union[CfnRule.BatchParametersProperty, typing.Dict[builtins.str, typing.Any]]] = None,
12590
12611
  dead_letter_config: typing.Optional[typing.Union[CfnRule.DeadLetterConfigProperty, typing.Dict[builtins.str, typing.Any]]] = None,
12591
12612
  ecs_parameters: typing.Optional[typing.Union[CfnRule.EcsParametersProperty, typing.Dict[builtins.str, typing.Any]]] = None,