aws-cdk-lib 2.161.1__py3-none-any.whl → 2.162.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.
Files changed (45) hide show
  1. aws_cdk/__init__.py +64 -10
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.161.1.jsii.tgz → aws-cdk-lib@2.162.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigatewayv2/__init__.py +16 -7
  5. aws_cdk/aws_apigatewayv2_authorizers/__init__.py +94 -0
  6. aws_cdk/aws_appsync/__init__.py +35 -0
  7. aws_cdk/aws_b2bi/__init__.py +18 -21
  8. aws_cdk/aws_cloudformation/__init__.py +59 -5
  9. aws_cdk/aws_cloudfront/__init__.py +4 -4
  10. aws_cdk/aws_codebuild/__init__.py +6 -6
  11. aws_cdk/aws_codepipeline/__init__.py +1 -1
  12. aws_cdk/aws_codepipeline_actions/__init__.py +1 -1
  13. aws_cdk/aws_dynamodb/__init__.py +1 -1
  14. aws_cdk/aws_ec2/__init__.py +13 -3
  15. aws_cdk/aws_ecs/__init__.py +122 -29
  16. aws_cdk/aws_eks/__init__.py +62 -51
  17. aws_cdk/aws_elasticloadbalancingv2/__init__.py +139 -25
  18. aws_cdk/aws_emr/__init__.py +2182 -2129
  19. aws_cdk/aws_glue/__init__.py +9 -6
  20. aws_cdk/aws_iam/__init__.py +26 -4
  21. aws_cdk/aws_iot/__init__.py +190 -0
  22. aws_cdk/aws_iotsitewise/__init__.py +3 -1
  23. aws_cdk/aws_lambda/__init__.py +7 -1
  24. aws_cdk/aws_lambda_event_sources/__init__.py +2 -2
  25. aws_cdk/aws_logs/__init__.py +6 -6
  26. aws_cdk/aws_quicksight/__init__.py +32 -19
  27. aws_cdk/aws_rds/__init__.py +62 -30
  28. aws_cdk/aws_route53/__init__.py +5 -1
  29. aws_cdk/aws_route53resolver/__init__.py +17 -3
  30. aws_cdk/aws_s3/__init__.py +47 -25
  31. aws_cdk/aws_s3_assets/__init__.py +2 -2
  32. aws_cdk/aws_s3_notifications/__init__.py +1 -1
  33. aws_cdk/aws_servicecatalog/__init__.py +2 -2
  34. aws_cdk/aws_servicediscovery/__init__.py +8 -8
  35. aws_cdk/aws_sqs/__init__.py +12 -10
  36. aws_cdk/aws_stepfunctions_tasks/__init__.py +20 -20
  37. aws_cdk/cloudformation_include/__init__.py +4 -4
  38. aws_cdk/custom_resources/__init__.py +1 -1
  39. aws_cdk/pipelines/__init__.py +1 -1
  40. {aws_cdk_lib-2.161.1.dist-info → aws_cdk_lib-2.162.0.dist-info}/METADATA +4 -4
  41. {aws_cdk_lib-2.161.1.dist-info → aws_cdk_lib-2.162.0.dist-info}/RECORD +45 -45
  42. {aws_cdk_lib-2.161.1.dist-info → aws_cdk_lib-2.162.0.dist-info}/LICENSE +0 -0
  43. {aws_cdk_lib-2.161.1.dist-info → aws_cdk_lib-2.162.0.dist-info}/NOTICE +0 -0
  44. {aws_cdk_lib-2.161.1.dist-info → aws_cdk_lib-2.162.0.dist-info}/WHEEL +0 -0
  45. {aws_cdk_lib-2.161.1.dist-info → aws_cdk_lib-2.162.0.dist-info}/top_level.txt +0 -0
@@ -9,18 +9,18 @@ bucket = s3.Bucket(self, "MyFirstBucket")
9
9
 
10
10
  `Bucket` constructs expose the following deploy-time attributes:
11
11
 
12
- * `bucketArn` - the ARN of the bucket (i.e. `arn:aws:s3:::bucket_name`)
13
- * `bucketName` - the name of the bucket (i.e. `bucket_name`)
12
+ * `bucketArn` - the ARN of the bucket (i.e. `arn:aws:s3:::amzn-s3-demo-bucket`)
13
+ * `bucketName` - the name of the bucket (i.e. `amzn-s3-demo-bucket`)
14
14
  * `bucketWebsiteUrl` - the Website URL of the bucket (i.e.
15
- `http://bucket_name.s3-website-us-west-1.amazonaws.com`)
16
- * `bucketDomainName` - the URL of the bucket (i.e. `bucket_name.s3.amazonaws.com`)
15
+ `http://amzn-s3-demo-bucket.s3-website-us-west-1.amazonaws.com`)
16
+ * `bucketDomainName` - the URL of the bucket (i.e. `amzn-s3-demo-bucket.s3.amazonaws.com`)
17
17
  * `bucketDualStackDomainName` - the dual-stack URL of the bucket (i.e.
18
- `bucket_name.s3.dualstack.eu-west-1.amazonaws.com`)
18
+ `amzn-s3-demo-bucket.s3.dualstack.eu-west-1.amazonaws.com`)
19
19
  * `bucketRegionalDomainName` - the regional URL of the bucket (i.e.
20
- `bucket_name.s3.eu-west-1.amazonaws.com`)
20
+ `amzn-s3-demo-bucket.s3.eu-west-1.amazonaws.com`)
21
21
  * `arnForObjects(pattern)` - the ARN of an object or objects within the bucket (i.e.
22
- `arn:aws:s3:::bucket_name/exampleobject.png` or
23
- `arn:aws:s3:::bucket_name/Development/*`)
22
+ `arn:aws:s3:::amzn-s3-demo-bucket/exampleobject.png` or
23
+ `arn:aws:s3:::amzn-s3-demo-bucket/Development/*`)
24
24
  * `urlForObject(key)` - the HTTP URL of an object within the bucket (i.e.
25
25
  `https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey`)
26
26
  * `virtualHostedUrlForObject(key)` - the virtual-hosted style HTTP URL of an object
@@ -101,7 +101,7 @@ If you try to add a policy statement to an existing bucket, this method will
101
101
  not do anything:
102
102
 
103
103
  ```python
104
- bucket = s3.Bucket.from_bucket_name(self, "existingBucket", "bucket-name")
104
+ bucket = s3.Bucket.from_bucket_name(self, "existingBucket", "amzn-s3-demo-bucket")
105
105
 
106
106
  # No policy statement will be added to the resource
107
107
  result = bucket.add_to_resource_policy(
@@ -220,7 +220,7 @@ are not allowed in the bucket name.
220
220
  # my_lambda: lambda.Function
221
221
 
222
222
  bucket = s3.Bucket.from_bucket_attributes(self, "ImportedBucket",
223
- bucket_arn="arn:aws:s3:::my-bucket"
223
+ bucket_arn="arn:aws:s3:::amzn-s3-demo-bucket"
224
224
  )
225
225
 
226
226
  # now you can just call methods on the bucket
@@ -234,8 +234,8 @@ Alternatively, short-hand factories are available as `Bucket.fromBucketName` and
234
234
  name or ARN respectively:
235
235
 
236
236
  ```python
237
- by_name = s3.Bucket.from_bucket_name(self, "BucketByName", "my-bucket")
238
- by_arn = s3.Bucket.from_bucket_arn(self, "BucketByArn", "arn:aws:s3:::my-bucket")
237
+ by_name = s3.Bucket.from_bucket_name(self, "BucketByName", "amzn-s3-demo-bucket")
238
+ by_arn = s3.Bucket.from_bucket_arn(self, "BucketByArn", "arn:aws:s3:::amzn-s3-demo-bucket")
239
239
  ```
240
240
 
241
241
  The bucket's region defaults to the current stack's region, but can also be explicitly set in cases where one of the bucket's
@@ -243,7 +243,7 @@ regional properties needs to contain the correct values.
243
243
 
244
244
  ```python
245
245
  my_cross_region_bucket = s3.Bucket.from_bucket_attributes(self, "CrossRegionImport",
246
- bucket_arn="arn:aws:s3:::my-bucket",
246
+ bucket_arn="arn:aws:s3:::amzn-s3-demo-bucket",
247
247
  region="us-east-1"
248
248
  )
249
249
  ```
@@ -291,7 +291,7 @@ Adding notifications on existing buckets:
291
291
  # topic: sns.Topic
292
292
 
293
293
  bucket = s3.Bucket.from_bucket_attributes(self, "ImportedBucket",
294
- bucket_arn="arn:aws:s3:::my-bucket"
294
+ bucket_arn="arn:aws:s3:::amzn-s3-demo-bucket"
295
295
  )
296
296
  bucket.add_event_notification(s3.EventType.OBJECT_CREATED, s3n.SnsDestination(topic))
297
297
  ```
@@ -486,7 +486,7 @@ policy resource using the L1 Construct. Although the mixing of L1 and L2 Constru
486
486
  recommended, there are no mechanisms in place to prevent users from doing this at the moment.
487
487
 
488
488
  ```python
489
- bucket_name = "my-favorite-bucket-name"
489
+ bucket_name = "amzn-s3-demo-bucket"
490
490
  access_logs_bucket = s3.Bucket(self, "AccessLogsBucket",
491
491
  object_ownership=s3.ObjectOwnership.BUCKET_OWNER_ENFORCED,
492
492
  bucket_name=bucket_name
@@ -548,7 +548,7 @@ Alternatively, users can use the L2 Bucket Policy Construct
548
548
  `BucketPolicy.fromCfnBucketPolicy` to wrap around `CfnBucketPolicy` Construct. This will allow the subsequent bucket policy generated by `serverAccessLogsBucket` usage to append to the existing bucket policy instead of overwriting.
549
549
 
550
550
  ```python
551
- bucket_name = "my-favorite-bucket-name"
551
+ bucket_name = "amzn-s3-demo-bucket"
552
552
  access_logs_bucket = s3.Bucket(self, "AccessLogsBucket",
553
553
  object_ownership=s3.ObjectOwnership.BUCKET_OWNER_ENFORCED,
554
554
  bucket_name=bucket_name
@@ -622,7 +622,7 @@ However, if you use an imported bucket (i.e `Bucket.fromXXX()`), you'll have to
622
622
  "Effect": "Allow",
623
623
  "Principal": { "Service": "s3.amazonaws.com" },
624
624
  "Action": "s3:PutObject",
625
- "Resource": ["arn:aws:s3:::destinationBucket/*"]
625
+ "Resource": ["arn:aws:s3:::amzn-s3-demo-destination-bucket/*"]
626
626
  }
627
627
  ]
628
628
  }
@@ -1252,7 +1252,7 @@ class BucketAttributes:
1252
1252
  # my_lambda: lambda.Function
1253
1253
 
1254
1254
  bucket = s3.Bucket.from_bucket_attributes(self, "ImportedBucket",
1255
- bucket_arn="arn:aws:s3:::my-bucket"
1255
+ bucket_arn="arn:aws:s3:::amzn-s3-demo-bucket"
1256
1256
  )
1257
1257
 
1258
1258
  # now you can just call methods on the bucket
@@ -1697,7 +1697,7 @@ class BucketPolicy(
1697
1697
 
1698
1698
  Example::
1699
1699
 
1700
- bucket_name = "my-favorite-bucket-name"
1700
+ bucket_name = "amzn-s3-demo-bucket"
1701
1701
  access_logs_bucket = s3.Bucket(self, "AccessLogsBucket",
1702
1702
  object_ownership=s3.ObjectOwnership.BUCKET_OWNER_ENFORCED,
1703
1703
  bucket_name=bucket_name
@@ -6217,19 +6217,24 @@ class CfnBucket(
6217
6217
  @jsii.data_type(
6218
6218
  jsii_type="aws-cdk-lib.aws_s3.CfnBucket.LifecycleConfigurationProperty",
6219
6219
  jsii_struct_bases=[],
6220
- name_mapping={"rules": "rules"},
6220
+ name_mapping={
6221
+ "rules": "rules",
6222
+ "transition_default_minimum_object_size": "transitionDefaultMinimumObjectSize",
6223
+ },
6221
6224
  )
6222
6225
  class LifecycleConfigurationProperty:
6223
6226
  def __init__(
6224
6227
  self,
6225
6228
  *,
6226
6229
  rules: typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnBucket.RuleProperty", typing.Dict[builtins.str, typing.Any]]]]],
6230
+ transition_default_minimum_object_size: typing.Optional[builtins.str] = None,
6227
6231
  ) -> None:
6228
6232
  '''Specifies the lifecycle configuration for objects in an Amazon S3 bucket.
6229
6233
 
6230
6234
  For more information, see `Object Lifecycle Management <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html>`_ in the *Amazon S3 User Guide* .
6231
6235
 
6232
- :param rules: A lifecycle rule for individual objects in an Amazon S3 bucket.
6236
+ :param rules: Specifies lifecycle configuration rules for an Amazon S3 bucket.
6237
+ :param transition_default_minimum_object_size:
6233
6238
 
6234
6239
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfiguration.html
6235
6240
  :exampleMetadata: fixture=_generated
@@ -6294,21 +6299,27 @@ class CfnBucket(
6294
6299
  transition_date=Date(),
6295
6300
  transition_in_days=123
6296
6301
  )]
6297
- )]
6302
+ )],
6303
+
6304
+ # the properties below are optional
6305
+ transition_default_minimum_object_size="transitionDefaultMinimumObjectSize"
6298
6306
  )
6299
6307
  '''
6300
6308
  if __debug__:
6301
6309
  type_hints = typing.get_type_hints(_typecheckingstub__bb73b1c4965a7446144bcba270b5482c0e24a5df0e523cbebe9ad6c11a035f7e)
6302
6310
  check_type(argname="argument rules", value=rules, expected_type=type_hints["rules"])
6311
+ check_type(argname="argument transition_default_minimum_object_size", value=transition_default_minimum_object_size, expected_type=type_hints["transition_default_minimum_object_size"])
6303
6312
  self._values: typing.Dict[builtins.str, typing.Any] = {
6304
6313
  "rules": rules,
6305
6314
  }
6315
+ if transition_default_minimum_object_size is not None:
6316
+ self._values["transition_default_minimum_object_size"] = transition_default_minimum_object_size
6306
6317
 
6307
6318
  @builtins.property
6308
6319
  def rules(
6309
6320
  self,
6310
6321
  ) -> typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnBucket.RuleProperty"]]]:
6311
- '''A lifecycle rule for individual objects in an Amazon S3 bucket.
6322
+ '''Specifies lifecycle configuration rules for an Amazon S3 bucket.
6312
6323
 
6313
6324
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfiguration.html#cfn-s3-bucket-lifecycleconfiguration-rules
6314
6325
  '''
@@ -6316,6 +6327,16 @@ class CfnBucket(
6316
6327
  assert result is not None, "Required property 'rules' is missing"
6317
6328
  return typing.cast(typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnBucket.RuleProperty"]]], result)
6318
6329
 
6330
+ @builtins.property
6331
+ def transition_default_minimum_object_size(
6332
+ self,
6333
+ ) -> typing.Optional[builtins.str]:
6334
+ '''
6335
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfiguration.html#cfn-s3-bucket-lifecycleconfiguration-transitiondefaultminimumobjectsize
6336
+ '''
6337
+ result = self._values.get("transition_default_minimum_object_size")
6338
+ return typing.cast(typing.Optional[builtins.str], result)
6339
+
6319
6340
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
6320
6341
  return isinstance(rhs, self.__class__) and rhs._values == self._values
6321
6342
 
@@ -10448,7 +10469,7 @@ class CfnBucketPolicy(
10448
10469
 
10449
10470
  Example::
10450
10471
 
10451
- bucket_name = "my-favorite-bucket-name"
10472
+ bucket_name = "amzn-s3-demo-bucket"
10452
10473
  access_logs_bucket = s3.Bucket(self, "AccessLogsBucket",
10453
10474
  object_ownership=s3.ObjectOwnership.BUCKET_OWNER_ENFORCED,
10454
10475
  bucket_name=bucket_name
@@ -10581,7 +10602,7 @@ class CfnBucketPolicyProps:
10581
10602
 
10582
10603
  Example::
10583
10604
 
10584
- bucket_name = "my-favorite-bucket-name"
10605
+ bucket_name = "amzn-s3-demo-bucket"
10585
10606
  access_logs_bucket = s3.Bucket(self, "AccessLogsBucket",
10586
10607
  object_ownership=s3.ObjectOwnership.BUCKET_OWNER_ENFORCED,
10587
10608
  bucket_name=bucket_name
@@ -20794,6 +20815,7 @@ def _typecheckingstub__599ef02853407bceb720424e9874eda7b5e2324f3be8a787939e9d5f9
20794
20815
  def _typecheckingstub__bb73b1c4965a7446144bcba270b5482c0e24a5df0e523cbebe9ad6c11a035f7e(
20795
20816
  *,
20796
20817
  rules: typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union[CfnBucket.RuleProperty, typing.Dict[builtins.str, typing.Any]]]]],
20818
+ transition_default_minimum_object_size: typing.Optional[builtins.str] = None,
20797
20819
  ) -> None:
20798
20820
  """Type checking stubs"""
20799
20821
  pass
@@ -34,8 +34,8 @@ asset = assets.Asset(self, "SampleAsset",
34
34
 
35
35
  * `s3BucketName` - the name of the assets S3 bucket.
36
36
  * `s3ObjectKey` - the S3 object key of the asset file (whether it's a file or a zip archive)
37
- * `s3ObjectUrl` - the S3 object URL of the asset (i.e. s3://mybucket/mykey.zip)
38
- * `httpUrl` - the S3 HTTP URL of the asset (i.e. https://s3.us-east-1.amazonaws.com/mybucket/mykey.zip)
37
+ * `s3ObjectUrl` - the S3 object URL of the asset (i.e. s3://amzn-s3-demo-bucket/mykey.zip)
38
+ * `httpUrl` - the S3 HTTP URL of the asset (i.e. https://s3.us-east-1.amazonaws.com/amzn-s3-demo-bucket/mykey.zip)
39
39
 
40
40
  In the following example, the various asset attributes are exported as stack outputs:
41
41
 
@@ -105,7 +105,7 @@ class LambdaDestination(
105
105
  # my_lambda: lambda.Function
106
106
 
107
107
  bucket = s3.Bucket.from_bucket_attributes(self, "ImportedBucket",
108
- bucket_arn="arn:aws:s3:::my-bucket"
108
+ bucket_arn="arn:aws:s3:::amzn-s3-demo-bucket"
109
109
  )
110
110
 
111
111
  # now you can just call methods on the bucket
@@ -192,7 +192,7 @@ class LambdaProduct(servicecatalog.ProductStack):
192
192
  )
193
193
 
194
194
  user_defined_bucket = Bucket(self, "UserDefinedBucket",
195
- bucket_name="user-defined-bucket-for-product-stack-assets"
195
+ bucket_name="amzn-s3-demo-bucket"
196
196
  )
197
197
 
198
198
  product = servicecatalog.CloudFormationProduct(self, "Product",
@@ -9005,7 +9005,7 @@ class ProductStackProps:
9005
9005
  )
9006
9006
 
9007
9007
  user_defined_bucket = Bucket(self, "UserDefinedBucket",
9008
- bucket_name="user-defined-bucket-for-product-stack-assets"
9008
+ bucket_name="amzn-s3-demo-bucket"
9009
9009
  )
9010
9010
 
9011
9011
  product = servicecatalog.CloudFormationProduct(self, "Product",
@@ -34,7 +34,7 @@ service1 = namespace.create_service("NonIpService",
34
34
  )
35
35
 
36
36
  service1.register_non_ip_instance("NonIpInstance",
37
- custom_attributes={"arn": "arn:aws:s3:::mybucket"}
37
+ custom_attributes={"arn": "arn:aws:s3:::amzn-s3-demo-bucket"}
38
38
  )
39
39
 
40
40
  service2 = namespace.create_service("IpService",
@@ -404,7 +404,7 @@ class BaseServiceProps:
404
404
  )
405
405
 
406
406
  service1.register_non_ip_instance("NonIpInstance",
407
- custom_attributes={"arn": "arn:aws:s3:::mybucket"}
407
+ custom_attributes={"arn": "arn:aws:s3:::amzn-s3-demo-bucket"}
408
408
  )
409
409
 
410
410
  service2 = namespace.create_service("IpService",
@@ -3565,7 +3565,7 @@ class HealthCheckConfig:
3565
3565
  )
3566
3566
 
3567
3567
  service1.register_non_ip_instance("NonIpInstance",
3568
- custom_attributes={"arn": "arn:aws:s3:::mybucket"}
3568
+ custom_attributes={"arn": "arn:aws:s3:::amzn-s3-demo-bucket"}
3569
3569
  )
3570
3570
 
3571
3571
  service2 = namespace.create_service("IpService",
@@ -3715,7 +3715,7 @@ class HealthCheckType(enum.Enum):
3715
3715
  )
3716
3716
 
3717
3717
  service1.register_non_ip_instance("NonIpInstance",
3718
- custom_attributes={"arn": "arn:aws:s3:::mybucket"}
3718
+ custom_attributes={"arn": "arn:aws:s3:::amzn-s3-demo-bucket"}
3719
3719
  )
3720
3720
 
3721
3721
  service2 = namespace.create_service("IpService",
@@ -3868,7 +3868,7 @@ class HttpNamespaceProps(BaseNamespaceProps):
3868
3868
  )
3869
3869
 
3870
3870
  service1.register_non_ip_instance("NonIpInstance",
3871
- custom_attributes={"arn": "arn:aws:s3:::mybucket"}
3871
+ custom_attributes={"arn": "arn:aws:s3:::amzn-s3-demo-bucket"}
3872
3872
  )
3873
3873
 
3874
3874
  service2 = namespace.create_service("IpService",
@@ -4411,7 +4411,7 @@ class IpInstanceBaseProps(BaseInstanceProps):
4411
4411
  )
4412
4412
 
4413
4413
  service1.register_non_ip_instance("NonIpInstance",
4414
- custom_attributes={"arn": "arn:aws:s3:::mybucket"}
4414
+ custom_attributes={"arn": "arn:aws:s3:::amzn-s3-demo-bucket"}
4415
4415
  )
4416
4416
 
4417
4417
  service2 = namespace.create_service("IpService",
@@ -4779,7 +4779,7 @@ class NonIpInstanceBaseProps(BaseInstanceProps):
4779
4779
  )
4780
4780
 
4781
4781
  service1.register_non_ip_instance("NonIpInstance",
4782
- custom_attributes={"arn": "arn:aws:s3:::mybucket"}
4782
+ custom_attributes={"arn": "arn:aws:s3:::amzn-s3-demo-bucket"}
4783
4783
  )
4784
4784
 
4785
4785
  service2 = namespace.create_service("IpService",
@@ -6601,7 +6601,7 @@ class HttpNamespace(
6601
6601
  )
6602
6602
 
6603
6603
  service1.register_non_ip_instance("NonIpInstance",
6604
- custom_attributes={"arn": "arn:aws:s3:::mybucket"}
6604
+ custom_attributes={"arn": "arn:aws:s3:::amzn-s3-demo-bucket"}
6605
6605
  )
6606
6606
 
6607
6607
  service2 = namespace.create_service("IpService",
@@ -3829,20 +3829,22 @@ class Queue(QueueBase, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_sqs.Q
3829
3829
 
3830
3830
  Example::
3831
3831
 
3832
- # source_queue: sqs.Queue
3833
- # target_queue: sqs.Queue
3832
+ import aws_cdk.aws_redshiftserverless as redshiftserverless
3834
3833
 
3834
+ # workgroup: redshiftserverless.CfnWorkgroup
3835
3835
 
3836
- pipe_target = targets.SqsTarget(target_queue,
3837
- input_transformation=pipes.InputTransformation.from_object({
3838
- "SomeKey": pipes.DynamicInput.from_event_path("$.body")
3839
- })
3840
- )
3841
3836
 
3842
- pipe = pipes.Pipe(self, "Pipe",
3843
- source=SomeSource(source_queue),
3844
- target=pipe_target
3837
+ rule = events.Rule(self, "Rule",
3838
+ schedule=events.Schedule.rate(cdk.Duration.hours(1))
3845
3839
  )
3840
+
3841
+ dlq = sqs.Queue(self, "DeadLetterQueue")
3842
+
3843
+ rule.add_target(targets.RedshiftQuery(workgroup.attr_workgroup_workgroup_arn,
3844
+ database="dev",
3845
+ dead_letter_queue=dlq,
3846
+ sql=["SELECT * FROM foo", "SELECT * FROM baz"]
3847
+ ))
3846
3848
  '''
3847
3849
 
3848
3850
  def __init__(
@@ -262,7 +262,7 @@ detect_labels = tasks.CallAwsService(self, "DetectLabels",
262
262
  additional_iam_statements=[
263
263
  iam.PolicyStatement(
264
264
  actions=["s3:getObject"],
265
- resources=["arn:aws:s3:::my-bucket/*"]
265
+ resources=["arn:aws:s3:::amzn-s3-demo-bucket/*"]
266
266
  )
267
267
  ]
268
268
  )
@@ -308,7 +308,7 @@ start_query_execution_job = tasks.AthenaStartQueryExecution(self, "Start Athena
308
308
  encryption_option=tasks.EncryptionOption.S3_MANAGED
309
309
  ),
310
310
  output_location=s3.Location(
311
- bucket_name="query-results-bucket",
311
+ bucket_name="amzn-s3-demo-bucket",
312
312
  object_key="folder"
313
313
  )
314
314
  ),
@@ -1602,7 +1602,7 @@ tasks.SageMakerCreateTrainingJob(self, "TrainSagemaker",
1602
1602
  )
1603
1603
  )],
1604
1604
  output_data_config=tasks.OutputDataConfig(
1605
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
1605
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
1606
1606
  ),
1607
1607
  resource_config=tasks.ResourceConfig(
1608
1608
  instance_count=1,
@@ -2159,7 +2159,7 @@ class AlgorithmSpecification:
2159
2159
  )
2160
2160
  )],
2161
2161
  output_data_config=tasks.OutputDataConfig(
2162
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
2162
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
2163
2163
  ),
2164
2164
  resource_config=tasks.ResourceConfig(
2165
2165
  instance_count=1,
@@ -3152,7 +3152,7 @@ class AthenaStartQueryExecution(
3152
3152
  encryption_option=tasks.EncryptionOption.S3_MANAGED
3153
3153
  ),
3154
3154
  output_location=s3.Location(
3155
- bucket_name="query-results-bucket",
3155
+ bucket_name="amzn-s3-demo-bucket",
3156
3156
  object_key="folder"
3157
3157
  )
3158
3158
  ),
@@ -3332,7 +3332,7 @@ class AthenaStartQueryExecutionProps(_TaskStateBaseProps_3a62b6d0):
3332
3332
  encryption_option=tasks.EncryptionOption.S3_MANAGED
3333
3333
  ),
3334
3334
  output_location=s3.Location(
3335
- bucket_name="query-results-bucket",
3335
+ bucket_name="amzn-s3-demo-bucket",
3336
3336
  object_key="folder"
3337
3337
  )
3338
3338
  ),
@@ -9842,7 +9842,7 @@ class DataSource:
9842
9842
  )
9843
9843
  )],
9844
9844
  output_data_config=tasks.OutputDataConfig(
9845
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
9845
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
9846
9846
  ),
9847
9847
  resource_config=tasks.ResourceConfig(
9848
9848
  instance_count=1,
@@ -22248,7 +22248,7 @@ class EncryptionConfiguration:
22248
22248
  encryption_option=tasks.EncryptionOption.S3_MANAGED
22249
22249
  ),
22250
22250
  output_location=s3.Location(
22251
- bucket_name="query-results-bucket",
22251
+ bucket_name="amzn-s3-demo-bucket",
22252
22252
  object_key="folder"
22253
22253
  )
22254
22254
  ),
@@ -22315,7 +22315,7 @@ class EncryptionOption(enum.Enum):
22315
22315
  encryption_option=tasks.EncryptionOption.S3_MANAGED
22316
22316
  ),
22317
22317
  output_location=s3.Location(
22318
- bucket_name="query-results-bucket",
22318
+ bucket_name="amzn-s3-demo-bucket",
22319
22319
  object_key="folder"
22320
22320
  )
22321
22321
  ),
@@ -25369,7 +25369,7 @@ class InputMode(enum.Enum):
25369
25369
  )
25370
25370
  )],
25371
25371
  output_data_config=tasks.OutputDataConfig(
25372
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
25372
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
25373
25373
  ),
25374
25374
  resource_config=tasks.ResourceConfig(
25375
25375
  instance_count=1,
@@ -27117,7 +27117,7 @@ class OutputDataConfig:
27117
27117
  )
27118
27118
  )],
27119
27119
  output_data_config=tasks.OutputDataConfig(
27120
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
27120
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
27121
27121
  ),
27122
27122
  resource_config=tasks.ResourceConfig(
27123
27123
  instance_count=1,
@@ -27338,7 +27338,7 @@ class QueryExecutionContext:
27338
27338
  encryption_option=tasks.EncryptionOption.S3_MANAGED
27339
27339
  ),
27340
27340
  output_location=s3.Location(
27341
- bucket_name="query-results-bucket",
27341
+ bucket_name="amzn-s3-demo-bucket",
27342
27342
  object_key="folder"
27343
27343
  )
27344
27344
  ),
@@ -27518,7 +27518,7 @@ class ResourceConfig:
27518
27518
  )
27519
27519
  )],
27520
27520
  output_data_config=tasks.OutputDataConfig(
27521
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
27521
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
27522
27522
  ),
27523
27523
  resource_config=tasks.ResourceConfig(
27524
27524
  instance_count=1,
@@ -27637,7 +27637,7 @@ class ResultConfiguration:
27637
27637
  encryption_option=tasks.EncryptionOption.S3_MANAGED
27638
27638
  ),
27639
27639
  output_location=s3.Location(
27640
- bucket_name="query-results-bucket",
27640
+ bucket_name="amzn-s3-demo-bucket",
27641
27641
  object_key="folder"
27642
27642
  )
27643
27643
  ),
@@ -27747,7 +27747,7 @@ class S3DataSource:
27747
27747
  )
27748
27748
  )],
27749
27749
  output_data_config=tasks.OutputDataConfig(
27750
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
27750
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
27751
27751
  ),
27752
27752
  resource_config=tasks.ResourceConfig(
27753
27753
  instance_count=1,
@@ -27845,7 +27845,7 @@ class S3DataType(enum.Enum):
27845
27845
  )
27846
27846
  )],
27847
27847
  output_data_config=tasks.OutputDataConfig(
27848
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
27848
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
27849
27849
  ),
27850
27850
  resource_config=tasks.ResourceConfig(
27851
27851
  instance_count=1,
@@ -27892,7 +27892,7 @@ class S3Location(
27892
27892
  )
27893
27893
  )],
27894
27894
  output_data_config=tasks.OutputDataConfig(
27895
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
27895
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
27896
27896
  ),
27897
27897
  resource_config=tasks.ResourceConfig(
27898
27898
  instance_count=1,
@@ -29505,7 +29505,7 @@ class SageMakerCreateTrainingJob(
29505
29505
  )
29506
29506
  )],
29507
29507
  output_data_config=tasks.OutputDataConfig(
29508
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
29508
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
29509
29509
  ),
29510
29510
  resource_config=tasks.ResourceConfig(
29511
29511
  instance_count=1,
@@ -29758,7 +29758,7 @@ class SageMakerCreateTrainingJobProps(_TaskStateBaseProps_3a62b6d0):
29758
29758
  )
29759
29759
  )],
29760
29760
  output_data_config=tasks.OutputDataConfig(
29761
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
29761
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
29762
29762
  ),
29763
29763
  resource_config=tasks.ResourceConfig(
29764
29764
  instance_count=1,
@@ -33226,7 +33226,7 @@ class StoppingCondition:
33226
33226
  )
33227
33227
  )],
33228
33228
  output_data_config=tasks.OutputDataConfig(
33229
- s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "mybucket"), "myoutputpath")
33229
+ s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
33230
33230
  ),
33231
33231
  resource_config=tasks.ResourceConfig(
33232
33232
  instance_count=1,
@@ -17,7 +17,7 @@ It could be in JSON format, in a file `my-template.json`:
17
17
  "Bucket": {
18
18
  "Type": "AWS::S3::Bucket",
19
19
  "Properties": {
20
- "BucketName": "some-bucket-name"
20
+ "BucketName": "amzn-s3-demo-bucket"
21
21
  }
22
22
  }
23
23
  }
@@ -31,7 +31,7 @@ Resources:
31
31
  Bucket:
32
32
  Type: AWS::S3::Bucket
33
33
  Properties:
34
- BucketName: some-bucket-name
34
+ BucketName: amzn-s3-demo-bucket
35
35
  ```
36
36
 
37
37
  It can be included in a CDK application with the following code:
@@ -85,7 +85,7 @@ for example, the name of the bucket can be changed:
85
85
  # cfn_template: cfn_inc.CfnInclude
86
86
 
87
87
  cfn_bucket = cfn_template.get_resource("Bucket")
88
- cfn_bucket.bucket_name = "my-bucket-name"
88
+ cfn_bucket.bucket_name = "amzn-s3-demo-bucket"
89
89
  ```
90
90
 
91
91
  You can also refer to the resource when defining other constructs,
@@ -414,7 +414,7 @@ and modify them like any other included template:
414
414
 
415
415
 
416
416
  cfn_bucket = child_template.get_resource("MyBucket")
417
- cfn_bucket.bucket_name = "my-new-bucket-name"
417
+ cfn_bucket.bucket_name = "amzn-s3-demo-bucket1"
418
418
 
419
419
  role = iam.Role(self, "MyRole",
420
420
  assumed_by=iam.AccountRootPrincipal()
@@ -642,7 +642,7 @@ cr.AwsCustomResource(self, "ListObjects",
642
642
  service="s3",
643
643
  action="ListObjectsV2",
644
644
  parameters={
645
- "Bucket": "my-bucket"
645
+ "Bucket": "amzn-s3-demo-bucket"
646
646
  },
647
647
  physical_resource_id=cr.PhysicalResourceId.of("id"),
648
648
  output_paths=["Contents.0.Key", "Contents.1.Key"]
@@ -373,7 +373,7 @@ You can use a zip file in S3 as the source of the pipeline. The pipeline will be
373
373
  triggered every time the file in S3 is changed:
374
374
 
375
375
  ```python
376
- bucket = s3.Bucket.from_bucket_name(self, "Bucket", "my-bucket")
376
+ bucket = s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket")
377
377
  pipelines.CodePipelineSource.s3(bucket, "my/source.zip")
378
378
  ```
379
379
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws-cdk-lib
3
- Version: 2.161.1
3
+ Version: 2.162.0
4
4
  Summary: Version 2 of the AWS Cloud Development Kit library
5
5
  Home-page: https://github.com/aws/aws-cdk
6
6
  Author: Amazon Web Services
@@ -178,7 +178,7 @@ a stack with a synthesizer, pass it as one of its properties:
178
178
  ```python
179
179
  MyStack(app, "MyStack",
180
180
  synthesizer=DefaultStackSynthesizer(
181
- file_assets_bucket_name="my-orgs-asset-bucket"
181
+ file_assets_bucket_name="amzn-s3-demo-bucket"
182
182
  )
183
183
  )
184
184
  ```
@@ -1161,7 +1161,7 @@ The `CfnResource` class allows emitting arbitrary entries in the
1161
1161
  CfnResource(self, "ResourceId",
1162
1162
  type="AWS::S3::Bucket",
1163
1163
  properties={
1164
- "BucketName": "bucket-name"
1164
+ "BucketName": "amzn-s3-demo-bucket"
1165
1165
  }
1166
1166
  )
1167
1167
  ```
@@ -1183,7 +1183,7 @@ CfnInclude(self, "ID",
1183
1183
  "Bucket": {
1184
1184
  "Type": "AWS::S3::Bucket",
1185
1185
  "Properties": {
1186
- "BucketName": "my-shiny-bucket"
1186
+ "BucketName": "amzn-s3-demo-bucket"
1187
1187
  }
1188
1188
  }
1189
1189
  }