aws-cdk-lib 2.199.0__py3-none-any.whl → 2.200.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.
- aws_cdk/__init__.py +22 -24
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.199.0.jsii.tgz → aws-cdk-lib@2.200.0.jsii.tgz} +0 -0
- aws_cdk/aws_acmpca/__init__.py +1 -1
- aws_cdk/aws_apigateway/__init__.py +1 -1
- aws_cdk/aws_applicationautoscaling/__init__.py +4 -4
- aws_cdk/aws_aps/__init__.py +38 -30
- aws_cdk/aws_autoscaling/__init__.py +4 -4
- aws_cdk/aws_bedrock/__init__.py +73 -48
- aws_cdk/aws_cloudformation/__init__.py +17 -23
- aws_cdk/aws_cloudfront_origins/__init__.py +1 -1
- aws_cdk/aws_cloudtrail/__init__.py +4 -4
- aws_cdk/aws_cloudwatch/__init__.py +50 -1
- aws_cdk/aws_codebuild/__init__.py +116 -0
- aws_cdk/aws_datazone/__init__.py +699 -9
- aws_cdk/aws_deadline/__init__.py +38 -10
- aws_cdk/aws_ec2/__init__.py +78 -20
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +7 -7
- aws_cdk/aws_emr/__init__.py +36 -2
- aws_cdk/aws_fsx/__init__.py +122 -0
- aws_cdk/aws_glue/__init__.py +55 -26
- aws_cdk/aws_iam/__init__.py +376 -2
- aws_cdk/aws_iot/__init__.py +57 -5
- aws_cdk/aws_kinesisfirehose/__init__.py +5 -1
- aws_cdk/aws_lambda/__init__.py +65 -45
- aws_cdk/aws_lex/__init__.py +27 -13
- aws_cdk/aws_lightsail/__init__.py +452 -0
- aws_cdk/aws_medialive/__init__.py +699 -497
- aws_cdk/aws_msk/__init__.py +4 -4
- aws_cdk/aws_networkfirewall/__init__.py +9 -5
- aws_cdk/aws_nimblestudio/__init__.py +208 -400
- aws_cdk/aws_panorama/__init__.py +30 -3
- aws_cdk/aws_pcs/__init__.py +12 -5
- aws_cdk/aws_rds/__init__.py +22 -10
- aws_cdk/aws_s3/__init__.py +367 -6
- aws_cdk/aws_s3express/__init__.py +789 -0
- aws_cdk/aws_ses/__init__.py +300 -32
- aws_cdk/aws_sns_subscriptions/__init__.py +256 -1
- aws_cdk/aws_stepfunctions/__init__.py +55 -17
- aws_cdk/aws_synthetics/__init__.py +26 -16
- aws_cdk/aws_voiceid/__init__.py +13 -3
- aws_cdk/cloud_assembly_schema/__init__.py +137 -42
- aws_cdk/cx_api/__init__.py +7 -7
- {aws_cdk_lib-2.199.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/METADATA +2 -2
- {aws_cdk_lib-2.199.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/RECORD +49 -49
- {aws_cdk_lib-2.199.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.199.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.199.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.199.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_s3/__init__.py
CHANGED
|
@@ -904,12 +904,15 @@ To replicate objects to a destination bucket, you can specify the `replicationRu
|
|
|
904
904
|
# destination_bucket1: s3.IBucket
|
|
905
905
|
# destination_bucket2: s3.IBucket
|
|
906
906
|
# replication_role: iam.IRole
|
|
907
|
-
#
|
|
907
|
+
# encryption_key: kms.IKey
|
|
908
|
+
# destination_encryption_key: kms.IKey
|
|
908
909
|
|
|
909
910
|
|
|
910
911
|
source_bucket = s3.Bucket(self, "SourceBucket",
|
|
911
912
|
# Versioning must be enabled on both the source and destination bucket
|
|
912
913
|
versioned=True,
|
|
914
|
+
# Optional. Specify the KMS key to use for encrypts objects in the source bucket.
|
|
915
|
+
encryption_key=encryption_key,
|
|
913
916
|
# Optional. If not specified, a new role will be created.
|
|
914
917
|
replication_role=replication_role,
|
|
915
918
|
replication_rules=[s3.ReplicationRule(
|
|
@@ -932,7 +935,7 @@ source_bucket = s3.Bucket(self, "SourceBucket",
|
|
|
932
935
|
# If set, metrics will be output to indicate whether replication by S3 RTC took longer than the configured time.
|
|
933
936
|
metrics=s3.ReplicationTimeValue.FIFTEEN_MINUTES,
|
|
934
937
|
# The kms key to use for the destination bucket.
|
|
935
|
-
kms_key=
|
|
938
|
+
kms_key=destination_encryption_key,
|
|
936
939
|
# The storage class to use for the destination bucket.
|
|
937
940
|
storage_class=s3.StorageClass.INFREQUENT_ACCESS,
|
|
938
941
|
# Whether to replicate objects with SSE-KMS encryption.
|
|
@@ -958,6 +961,15 @@ source_bucket = s3.Bucket(self, "SourceBucket",
|
|
|
958
961
|
)
|
|
959
962
|
]
|
|
960
963
|
)
|
|
964
|
+
|
|
965
|
+
# Grant permissions to the replication role.
|
|
966
|
+
# This method is not required if you choose to use an auto-generated replication role or manually grant permissions.
|
|
967
|
+
source_bucket.grant_replication_permission(replication_role,
|
|
968
|
+
# Optional. Specify the KMS key to use for decrypting objects in the source bucket.
|
|
969
|
+
source_decryption_key=encryption_key,
|
|
970
|
+
destinations=[s3.GrantReplicationPermissionDestinationProps(bucket=destination_bucket1), s3.GrantReplicationPermissionDestinationProps(bucket=destination_bucket2, encryption_key=destination_encryption_key)
|
|
971
|
+
]
|
|
972
|
+
)
|
|
961
973
|
```
|
|
962
974
|
|
|
963
975
|
### Cross Account Replication
|
|
@@ -15811,12 +15823,15 @@ class Filter:
|
|
|
15811
15823
|
# destination_bucket1: s3.IBucket
|
|
15812
15824
|
# destination_bucket2: s3.IBucket
|
|
15813
15825
|
# replication_role: iam.IRole
|
|
15814
|
-
#
|
|
15826
|
+
# encryption_key: kms.IKey
|
|
15827
|
+
# destination_encryption_key: kms.IKey
|
|
15815
15828
|
|
|
15816
15829
|
|
|
15817
15830
|
source_bucket = s3.Bucket(self, "SourceBucket",
|
|
15818
15831
|
# Versioning must be enabled on both the source and destination bucket
|
|
15819
15832
|
versioned=True,
|
|
15833
|
+
# Optional. Specify the KMS key to use for encrypts objects in the source bucket.
|
|
15834
|
+
encryption_key=encryption_key,
|
|
15820
15835
|
# Optional. If not specified, a new role will be created.
|
|
15821
15836
|
replication_role=replication_role,
|
|
15822
15837
|
replication_rules=[s3.ReplicationRule(
|
|
@@ -15839,7 +15854,7 @@ class Filter:
|
|
|
15839
15854
|
# If set, metrics will be output to indicate whether replication by S3 RTC took longer than the configured time.
|
|
15840
15855
|
metrics=s3.ReplicationTimeValue.FIFTEEN_MINUTES,
|
|
15841
15856
|
# The kms key to use for the destination bucket.
|
|
15842
|
-
kms_key=
|
|
15857
|
+
kms_key=destination_encryption_key,
|
|
15843
15858
|
# The storage class to use for the destination bucket.
|
|
15844
15859
|
storage_class=s3.StorageClass.INFREQUENT_ACCESS,
|
|
15845
15860
|
# Whether to replicate objects with SSE-KMS encryption.
|
|
@@ -15865,6 +15880,15 @@ class Filter:
|
|
|
15865
15880
|
)
|
|
15866
15881
|
]
|
|
15867
15882
|
)
|
|
15883
|
+
|
|
15884
|
+
# Grant permissions to the replication role.
|
|
15885
|
+
# This method is not required if you choose to use an auto-generated replication role or manually grant permissions.
|
|
15886
|
+
source_bucket.grant_replication_permission(replication_role,
|
|
15887
|
+
# Optional. Specify the KMS key to use for decrypting objects in the source bucket.
|
|
15888
|
+
source_decryption_key=encryption_key,
|
|
15889
|
+
destinations=[s3.GrantReplicationPermissionDestinationProps(bucket=destination_bucket1), s3.GrantReplicationPermissionDestinationProps(bucket=destination_bucket2, encryption_key=destination_encryption_key)
|
|
15890
|
+
]
|
|
15891
|
+
)
|
|
15868
15892
|
'''
|
|
15869
15893
|
if __debug__:
|
|
15870
15894
|
type_hints = typing.get_type_hints(_typecheckingstub__ff4b8a813f6812ab1464fced92fa61b97e151767705973ce994c0970fde139df)
|
|
@@ -15908,6 +15932,220 @@ class Filter:
|
|
|
15908
15932
|
)
|
|
15909
15933
|
|
|
15910
15934
|
|
|
15935
|
+
@jsii.data_type(
|
|
15936
|
+
jsii_type="aws-cdk-lib.aws_s3.GrantReplicationPermissionDestinationProps",
|
|
15937
|
+
jsii_struct_bases=[],
|
|
15938
|
+
name_mapping={"bucket": "bucket", "encryption_key": "encryptionKey"},
|
|
15939
|
+
)
|
|
15940
|
+
class GrantReplicationPermissionDestinationProps:
|
|
15941
|
+
def __init__(
|
|
15942
|
+
self,
|
|
15943
|
+
*,
|
|
15944
|
+
bucket: "IBucket",
|
|
15945
|
+
encryption_key: typing.Optional[_IKey_5f11635f] = None,
|
|
15946
|
+
) -> None:
|
|
15947
|
+
'''The properties for the destination bucket for granting replication permission.
|
|
15948
|
+
|
|
15949
|
+
:param bucket: The destination bucket.
|
|
15950
|
+
:param encryption_key: The KMS key to use for encryption if a destination bucket needs to be encrypted with a customer-managed KMS key. Default: - no KMS key is used for replication.
|
|
15951
|
+
|
|
15952
|
+
:exampleMetadata: fixture=_generated
|
|
15953
|
+
|
|
15954
|
+
Example::
|
|
15955
|
+
|
|
15956
|
+
# The code below shows an example of how to instantiate this type.
|
|
15957
|
+
# The values are placeholders you should change.
|
|
15958
|
+
from aws_cdk import aws_kms as kms
|
|
15959
|
+
from aws_cdk import aws_s3 as s3
|
|
15960
|
+
|
|
15961
|
+
# bucket: s3.Bucket
|
|
15962
|
+
# key: kms.Key
|
|
15963
|
+
|
|
15964
|
+
grant_replication_permission_destination_props = s3.GrantReplicationPermissionDestinationProps(
|
|
15965
|
+
bucket=bucket,
|
|
15966
|
+
|
|
15967
|
+
# the properties below are optional
|
|
15968
|
+
encryption_key=key
|
|
15969
|
+
)
|
|
15970
|
+
'''
|
|
15971
|
+
if __debug__:
|
|
15972
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c28989eb119121ac7809e78ba2038558e14755021078bf7d97f894b34bc3311a)
|
|
15973
|
+
check_type(argname="argument bucket", value=bucket, expected_type=type_hints["bucket"])
|
|
15974
|
+
check_type(argname="argument encryption_key", value=encryption_key, expected_type=type_hints["encryption_key"])
|
|
15975
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
15976
|
+
"bucket": bucket,
|
|
15977
|
+
}
|
|
15978
|
+
if encryption_key is not None:
|
|
15979
|
+
self._values["encryption_key"] = encryption_key
|
|
15980
|
+
|
|
15981
|
+
@builtins.property
|
|
15982
|
+
def bucket(self) -> "IBucket":
|
|
15983
|
+
'''The destination bucket.'''
|
|
15984
|
+
result = self._values.get("bucket")
|
|
15985
|
+
assert result is not None, "Required property 'bucket' is missing"
|
|
15986
|
+
return typing.cast("IBucket", result)
|
|
15987
|
+
|
|
15988
|
+
@builtins.property
|
|
15989
|
+
def encryption_key(self) -> typing.Optional[_IKey_5f11635f]:
|
|
15990
|
+
'''The KMS key to use for encryption if a destination bucket needs to be encrypted with a customer-managed KMS key.
|
|
15991
|
+
|
|
15992
|
+
:default: - no KMS key is used for replication.
|
|
15993
|
+
'''
|
|
15994
|
+
result = self._values.get("encryption_key")
|
|
15995
|
+
return typing.cast(typing.Optional[_IKey_5f11635f], result)
|
|
15996
|
+
|
|
15997
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
15998
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
15999
|
+
|
|
16000
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
16001
|
+
return not (rhs == self)
|
|
16002
|
+
|
|
16003
|
+
def __repr__(self) -> str:
|
|
16004
|
+
return "GrantReplicationPermissionDestinationProps(%s)" % ", ".join(
|
|
16005
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
16006
|
+
)
|
|
16007
|
+
|
|
16008
|
+
|
|
16009
|
+
@jsii.data_type(
|
|
16010
|
+
jsii_type="aws-cdk-lib.aws_s3.GrantReplicationPermissionProps",
|
|
16011
|
+
jsii_struct_bases=[],
|
|
16012
|
+
name_mapping={
|
|
16013
|
+
"destinations": "destinations",
|
|
16014
|
+
"source_decryption_key": "sourceDecryptionKey",
|
|
16015
|
+
},
|
|
16016
|
+
)
|
|
16017
|
+
class GrantReplicationPermissionProps:
|
|
16018
|
+
def __init__(
|
|
16019
|
+
self,
|
|
16020
|
+
*,
|
|
16021
|
+
destinations: typing.Sequence[typing.Union[GrantReplicationPermissionDestinationProps, typing.Dict[builtins.str, typing.Any]]],
|
|
16022
|
+
source_decryption_key: typing.Optional[_IKey_5f11635f] = None,
|
|
16023
|
+
) -> None:
|
|
16024
|
+
'''The properties for the destination bucket for granting replication permission.
|
|
16025
|
+
|
|
16026
|
+
:param destinations: The destination buckets for replication. Specify the KMS key to use for encryption if a destination bucket needs to be encrypted with a customer-managed KMS key. One or more destination buckets are required if replication configuration is enabled (i.e., ``replicationRole`` is specified). Default: - empty array (valid only if the ``replicationRole`` property is NOT specified)
|
|
16027
|
+
:param source_decryption_key: The KMS key used to decrypt objects in the source bucket for replication. **Required if** the source bucket is encrypted with a customer-managed KMS key. Default: - it's assumed the source bucket is not encrypted with a customer-managed KMS key.
|
|
16028
|
+
|
|
16029
|
+
:exampleMetadata: infused
|
|
16030
|
+
|
|
16031
|
+
Example::
|
|
16032
|
+
|
|
16033
|
+
# destination_bucket1: s3.IBucket
|
|
16034
|
+
# destination_bucket2: s3.IBucket
|
|
16035
|
+
# replication_role: iam.IRole
|
|
16036
|
+
# encryption_key: kms.IKey
|
|
16037
|
+
# destination_encryption_key: kms.IKey
|
|
16038
|
+
|
|
16039
|
+
|
|
16040
|
+
source_bucket = s3.Bucket(self, "SourceBucket",
|
|
16041
|
+
# Versioning must be enabled on both the source and destination bucket
|
|
16042
|
+
versioned=True,
|
|
16043
|
+
# Optional. Specify the KMS key to use for encrypts objects in the source bucket.
|
|
16044
|
+
encryption_key=encryption_key,
|
|
16045
|
+
# Optional. If not specified, a new role will be created.
|
|
16046
|
+
replication_role=replication_role,
|
|
16047
|
+
replication_rules=[s3.ReplicationRule(
|
|
16048
|
+
# The destination bucket for the replication rule.
|
|
16049
|
+
destination=destination_bucket1,
|
|
16050
|
+
# The priority of the rule.
|
|
16051
|
+
# Amazon S3 will attempt to replicate objects according to all replication rules.
|
|
16052
|
+
# However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority.
|
|
16053
|
+
# The higher the number, the higher the priority.
|
|
16054
|
+
# It is essential to specify priority explicitly when the replication configuration has multiple rules.
|
|
16055
|
+
priority=1
|
|
16056
|
+
), s3.ReplicationRule(
|
|
16057
|
+
destination=destination_bucket2,
|
|
16058
|
+
priority=2,
|
|
16059
|
+
# Whether to specify S3 Replication Time Control (S3 RTC).
|
|
16060
|
+
# S3 RTC replicates most objects that you upload to Amazon S3 in seconds,
|
|
16061
|
+
# and 99.99 percent of those objects within specified time.
|
|
16062
|
+
replication_time_control=s3.ReplicationTimeValue.FIFTEEN_MINUTES,
|
|
16063
|
+
# Whether to enable replication metrics about S3 RTC.
|
|
16064
|
+
# If set, metrics will be output to indicate whether replication by S3 RTC took longer than the configured time.
|
|
16065
|
+
metrics=s3.ReplicationTimeValue.FIFTEEN_MINUTES,
|
|
16066
|
+
# The kms key to use for the destination bucket.
|
|
16067
|
+
kms_key=destination_encryption_key,
|
|
16068
|
+
# The storage class to use for the destination bucket.
|
|
16069
|
+
storage_class=s3.StorageClass.INFREQUENT_ACCESS,
|
|
16070
|
+
# Whether to replicate objects with SSE-KMS encryption.
|
|
16071
|
+
sse_kms_encrypted_objects=False,
|
|
16072
|
+
# Whether to replicate modifications on replicas.
|
|
16073
|
+
replica_modifications=True,
|
|
16074
|
+
# Whether to replicate delete markers.
|
|
16075
|
+
# This property cannot be enabled if the replication rule has a tag filter.
|
|
16076
|
+
delete_marker_replication=False,
|
|
16077
|
+
# The ID of the rule.
|
|
16078
|
+
id="full-settings-rule",
|
|
16079
|
+
# The object filter for the rule.
|
|
16080
|
+
filter=s3.Filter(
|
|
16081
|
+
# The prefix filter for the rule.
|
|
16082
|
+
prefix="prefix",
|
|
16083
|
+
# The tag filter for the rule.
|
|
16084
|
+
tags=[s3.Tag(
|
|
16085
|
+
key="tagKey",
|
|
16086
|
+
value="tagValue"
|
|
16087
|
+
)
|
|
16088
|
+
]
|
|
16089
|
+
)
|
|
16090
|
+
)
|
|
16091
|
+
]
|
|
16092
|
+
)
|
|
16093
|
+
|
|
16094
|
+
# Grant permissions to the replication role.
|
|
16095
|
+
# This method is not required if you choose to use an auto-generated replication role or manually grant permissions.
|
|
16096
|
+
source_bucket.grant_replication_permission(replication_role,
|
|
16097
|
+
# Optional. Specify the KMS key to use for decrypting objects in the source bucket.
|
|
16098
|
+
source_decryption_key=encryption_key,
|
|
16099
|
+
destinations=[s3.GrantReplicationPermissionDestinationProps(bucket=destination_bucket1), s3.GrantReplicationPermissionDestinationProps(bucket=destination_bucket2, encryption_key=destination_encryption_key)
|
|
16100
|
+
]
|
|
16101
|
+
)
|
|
16102
|
+
'''
|
|
16103
|
+
if __debug__:
|
|
16104
|
+
type_hints = typing.get_type_hints(_typecheckingstub__892523669f29c26ab296b743291f04387d44edf1630a2288ab68d906f972d8ff)
|
|
16105
|
+
check_type(argname="argument destinations", value=destinations, expected_type=type_hints["destinations"])
|
|
16106
|
+
check_type(argname="argument source_decryption_key", value=source_decryption_key, expected_type=type_hints["source_decryption_key"])
|
|
16107
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
16108
|
+
"destinations": destinations,
|
|
16109
|
+
}
|
|
16110
|
+
if source_decryption_key is not None:
|
|
16111
|
+
self._values["source_decryption_key"] = source_decryption_key
|
|
16112
|
+
|
|
16113
|
+
@builtins.property
|
|
16114
|
+
def destinations(self) -> typing.List[GrantReplicationPermissionDestinationProps]:
|
|
16115
|
+
'''The destination buckets for replication.
|
|
16116
|
+
|
|
16117
|
+
Specify the KMS key to use for encryption if a destination bucket needs to be encrypted with a customer-managed KMS key.
|
|
16118
|
+
One or more destination buckets are required if replication configuration is enabled (i.e., ``replicationRole`` is specified).
|
|
16119
|
+
|
|
16120
|
+
:default: - empty array (valid only if the ``replicationRole`` property is NOT specified)
|
|
16121
|
+
'''
|
|
16122
|
+
result = self._values.get("destinations")
|
|
16123
|
+
assert result is not None, "Required property 'destinations' is missing"
|
|
16124
|
+
return typing.cast(typing.List[GrantReplicationPermissionDestinationProps], result)
|
|
16125
|
+
|
|
16126
|
+
@builtins.property
|
|
16127
|
+
def source_decryption_key(self) -> typing.Optional[_IKey_5f11635f]:
|
|
16128
|
+
'''The KMS key used to decrypt objects in the source bucket for replication.
|
|
16129
|
+
|
|
16130
|
+
**Required if** the source bucket is encrypted with a customer-managed KMS key.
|
|
16131
|
+
|
|
16132
|
+
:default: - it's assumed the source bucket is not encrypted with a customer-managed KMS key.
|
|
16133
|
+
'''
|
|
16134
|
+
result = self._values.get("source_decryption_key")
|
|
16135
|
+
return typing.cast(typing.Optional[_IKey_5f11635f], result)
|
|
16136
|
+
|
|
16137
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
16138
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
16139
|
+
|
|
16140
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
16141
|
+
return not (rhs == self)
|
|
16142
|
+
|
|
16143
|
+
def __repr__(self) -> str:
|
|
16144
|
+
return "GrantReplicationPermissionProps(%s)" % ", ".join(
|
|
16145
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
16146
|
+
)
|
|
16147
|
+
|
|
16148
|
+
|
|
15911
16149
|
@jsii.enum(jsii_type="aws-cdk-lib.aws_s3.HttpMethods")
|
|
15912
16150
|
class HttpMethods(enum.Enum):
|
|
15913
16151
|
'''All http request methods.'''
|
|
@@ -16268,6 +16506,27 @@ class IBucket(_IResource_c80c4260, typing_extensions.Protocol):
|
|
|
16268
16506
|
'''
|
|
16269
16507
|
...
|
|
16270
16508
|
|
|
16509
|
+
@jsii.member(jsii_name="grantReplicationPermission")
|
|
16510
|
+
def grant_replication_permission(
|
|
16511
|
+
self,
|
|
16512
|
+
identity: _IGrantable_71c4f5de,
|
|
16513
|
+
*,
|
|
16514
|
+
destinations: typing.Sequence[typing.Union[GrantReplicationPermissionDestinationProps, typing.Dict[builtins.str, typing.Any]]],
|
|
16515
|
+
source_decryption_key: typing.Optional[_IKey_5f11635f] = None,
|
|
16516
|
+
) -> _Grant_a7ae64f8:
|
|
16517
|
+
'''Allows permissions for replication operation to bucket replication role.
|
|
16518
|
+
|
|
16519
|
+
If an encryption key is used, permission to use the key for
|
|
16520
|
+
encrypt/decrypt will also be granted.
|
|
16521
|
+
|
|
16522
|
+
:param identity: The principal.
|
|
16523
|
+
:param destinations: The destination buckets for replication. Specify the KMS key to use for encryption if a destination bucket needs to be encrypted with a customer-managed KMS key. One or more destination buckets are required if replication configuration is enabled (i.e., ``replicationRole`` is specified). Default: - empty array (valid only if the ``replicationRole`` property is NOT specified)
|
|
16524
|
+
:param source_decryption_key: The KMS key used to decrypt objects in the source bucket for replication. **Required if** the source bucket is encrypted with a customer-managed KMS key. Default: - it's assumed the source bucket is not encrypted with a customer-managed KMS key.
|
|
16525
|
+
|
|
16526
|
+
:return: The ``iam.Grant`` object, which represents the grant of permissions.
|
|
16527
|
+
'''
|
|
16528
|
+
...
|
|
16529
|
+
|
|
16271
16530
|
@jsii.member(jsii_name="grantWrite")
|
|
16272
16531
|
def grant_write(
|
|
16273
16532
|
self,
|
|
@@ -16863,6 +17122,34 @@ class _IBucketProxy(
|
|
|
16863
17122
|
check_type(argname="argument objects_key_pattern", value=objects_key_pattern, expected_type=type_hints["objects_key_pattern"])
|
|
16864
17123
|
return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantReadWrite", [identity, objects_key_pattern]))
|
|
16865
17124
|
|
|
17125
|
+
@jsii.member(jsii_name="grantReplicationPermission")
|
|
17126
|
+
def grant_replication_permission(
|
|
17127
|
+
self,
|
|
17128
|
+
identity: _IGrantable_71c4f5de,
|
|
17129
|
+
*,
|
|
17130
|
+
destinations: typing.Sequence[typing.Union[GrantReplicationPermissionDestinationProps, typing.Dict[builtins.str, typing.Any]]],
|
|
17131
|
+
source_decryption_key: typing.Optional[_IKey_5f11635f] = None,
|
|
17132
|
+
) -> _Grant_a7ae64f8:
|
|
17133
|
+
'''Allows permissions for replication operation to bucket replication role.
|
|
17134
|
+
|
|
17135
|
+
If an encryption key is used, permission to use the key for
|
|
17136
|
+
encrypt/decrypt will also be granted.
|
|
17137
|
+
|
|
17138
|
+
:param identity: The principal.
|
|
17139
|
+
:param destinations: The destination buckets for replication. Specify the KMS key to use for encryption if a destination bucket needs to be encrypted with a customer-managed KMS key. One or more destination buckets are required if replication configuration is enabled (i.e., ``replicationRole`` is specified). Default: - empty array (valid only if the ``replicationRole`` property is NOT specified)
|
|
17140
|
+
:param source_decryption_key: The KMS key used to decrypt objects in the source bucket for replication. **Required if** the source bucket is encrypted with a customer-managed KMS key. Default: - it's assumed the source bucket is not encrypted with a customer-managed KMS key.
|
|
17141
|
+
|
|
17142
|
+
:return: The ``iam.Grant`` object, which represents the grant of permissions.
|
|
17143
|
+
'''
|
|
17144
|
+
if __debug__:
|
|
17145
|
+
type_hints = typing.get_type_hints(_typecheckingstub__b2772da13be98dbf89b1d2aec491a21f6a48f84e8d96dacef9ad681c2a3c690a)
|
|
17146
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
17147
|
+
props = GrantReplicationPermissionProps(
|
|
17148
|
+
destinations=destinations, source_decryption_key=source_decryption_key
|
|
17149
|
+
)
|
|
17150
|
+
|
|
17151
|
+
return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantReplicationPermission", [identity, props]))
|
|
17152
|
+
|
|
16866
17153
|
@jsii.member(jsii_name="grantWrite")
|
|
16867
17154
|
def grant_write(
|
|
16868
17155
|
self,
|
|
@@ -19002,12 +19289,15 @@ class ReplicationTimeValue(
|
|
|
19002
19289
|
# destination_bucket1: s3.IBucket
|
|
19003
19290
|
# destination_bucket2: s3.IBucket
|
|
19004
19291
|
# replication_role: iam.IRole
|
|
19005
|
-
#
|
|
19292
|
+
# encryption_key: kms.IKey
|
|
19293
|
+
# destination_encryption_key: kms.IKey
|
|
19006
19294
|
|
|
19007
19295
|
|
|
19008
19296
|
source_bucket = s3.Bucket(self, "SourceBucket",
|
|
19009
19297
|
# Versioning must be enabled on both the source and destination bucket
|
|
19010
19298
|
versioned=True,
|
|
19299
|
+
# Optional. Specify the KMS key to use for encrypts objects in the source bucket.
|
|
19300
|
+
encryption_key=encryption_key,
|
|
19011
19301
|
# Optional. If not specified, a new role will be created.
|
|
19012
19302
|
replication_role=replication_role,
|
|
19013
19303
|
replication_rules=[s3.ReplicationRule(
|
|
@@ -19030,7 +19320,7 @@ class ReplicationTimeValue(
|
|
|
19030
19320
|
# If set, metrics will be output to indicate whether replication by S3 RTC took longer than the configured time.
|
|
19031
19321
|
metrics=s3.ReplicationTimeValue.FIFTEEN_MINUTES,
|
|
19032
19322
|
# The kms key to use for the destination bucket.
|
|
19033
|
-
kms_key=
|
|
19323
|
+
kms_key=destination_encryption_key,
|
|
19034
19324
|
# The storage class to use for the destination bucket.
|
|
19035
19325
|
storage_class=s3.StorageClass.INFREQUENT_ACCESS,
|
|
19036
19326
|
# Whether to replicate objects with SSE-KMS encryption.
|
|
@@ -19056,6 +19346,15 @@ class ReplicationTimeValue(
|
|
|
19056
19346
|
)
|
|
19057
19347
|
]
|
|
19058
19348
|
)
|
|
19349
|
+
|
|
19350
|
+
# Grant permissions to the replication role.
|
|
19351
|
+
# This method is not required if you choose to use an auto-generated replication role or manually grant permissions.
|
|
19352
|
+
source_bucket.grant_replication_permission(replication_role,
|
|
19353
|
+
# Optional. Specify the KMS key to use for decrypting objects in the source bucket.
|
|
19354
|
+
source_decryption_key=encryption_key,
|
|
19355
|
+
destinations=[s3.GrantReplicationPermissionDestinationProps(bucket=destination_bucket1), s3.GrantReplicationPermissionDestinationProps(bucket=destination_bucket2, encryption_key=destination_encryption_key)
|
|
19356
|
+
]
|
|
19357
|
+
)
|
|
19059
19358
|
'''
|
|
19060
19359
|
|
|
19061
19360
|
@jsii.python.classproperty
|
|
@@ -20116,6 +20415,32 @@ class BucketBase(
|
|
|
20116
20415
|
check_type(argname="argument objects_key_pattern", value=objects_key_pattern, expected_type=type_hints["objects_key_pattern"])
|
|
20117
20416
|
return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantReadWrite", [identity, objects_key_pattern]))
|
|
20118
20417
|
|
|
20418
|
+
@jsii.member(jsii_name="grantReplicationPermission")
|
|
20419
|
+
def grant_replication_permission(
|
|
20420
|
+
self,
|
|
20421
|
+
identity: _IGrantable_71c4f5de,
|
|
20422
|
+
*,
|
|
20423
|
+
destinations: typing.Sequence[typing.Union[GrantReplicationPermissionDestinationProps, typing.Dict[builtins.str, typing.Any]]],
|
|
20424
|
+
source_decryption_key: typing.Optional[_IKey_5f11635f] = None,
|
|
20425
|
+
) -> _Grant_a7ae64f8:
|
|
20426
|
+
'''Grant replication permission to a principal. This method allows the principal to perform replication operations on this bucket.
|
|
20427
|
+
|
|
20428
|
+
Note that when calling this function for source or destination buckets that support KMS encryption,
|
|
20429
|
+
you need to specify the KMS key for encryption and the KMS key for decryption, respectively.
|
|
20430
|
+
|
|
20431
|
+
:param identity: The principal to grant replication permission to.
|
|
20432
|
+
:param destinations: The destination buckets for replication. Specify the KMS key to use for encryption if a destination bucket needs to be encrypted with a customer-managed KMS key. One or more destination buckets are required if replication configuration is enabled (i.e., ``replicationRole`` is specified). Default: - empty array (valid only if the ``replicationRole`` property is NOT specified)
|
|
20433
|
+
:param source_decryption_key: The KMS key used to decrypt objects in the source bucket for replication. **Required if** the source bucket is encrypted with a customer-managed KMS key. Default: - it's assumed the source bucket is not encrypted with a customer-managed KMS key.
|
|
20434
|
+
'''
|
|
20435
|
+
if __debug__:
|
|
20436
|
+
type_hints = typing.get_type_hints(_typecheckingstub__ae08375448013fd67c288fc732b4e3bd7135520a849542f49221c12f286f9554)
|
|
20437
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
20438
|
+
props = GrantReplicationPermissionProps(
|
|
20439
|
+
destinations=destinations, source_decryption_key=source_decryption_key
|
|
20440
|
+
)
|
|
20441
|
+
|
|
20442
|
+
return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantReplicationPermission", [identity, props]))
|
|
20443
|
+
|
|
20119
20444
|
@jsii.member(jsii_name="grantWrite")
|
|
20120
20445
|
def grant_write(
|
|
20121
20446
|
self,
|
|
@@ -21210,6 +21535,8 @@ __all__ = [
|
|
|
21210
21535
|
"CorsRule",
|
|
21211
21536
|
"EventType",
|
|
21212
21537
|
"Filter",
|
|
21538
|
+
"GrantReplicationPermissionDestinationProps",
|
|
21539
|
+
"GrantReplicationPermissionProps",
|
|
21213
21540
|
"HttpMethods",
|
|
21214
21541
|
"IBucket",
|
|
21215
21542
|
"IBucketNotificationDestination",
|
|
@@ -22865,6 +23192,22 @@ def _typecheckingstub__ff4b8a813f6812ab1464fced92fa61b97e151767705973ce994c0970f
|
|
|
22865
23192
|
"""Type checking stubs"""
|
|
22866
23193
|
pass
|
|
22867
23194
|
|
|
23195
|
+
def _typecheckingstub__c28989eb119121ac7809e78ba2038558e14755021078bf7d97f894b34bc3311a(
|
|
23196
|
+
*,
|
|
23197
|
+
bucket: IBucket,
|
|
23198
|
+
encryption_key: typing.Optional[_IKey_5f11635f] = None,
|
|
23199
|
+
) -> None:
|
|
23200
|
+
"""Type checking stubs"""
|
|
23201
|
+
pass
|
|
23202
|
+
|
|
23203
|
+
def _typecheckingstub__892523669f29c26ab296b743291f04387d44edf1630a2288ab68d906f972d8ff(
|
|
23204
|
+
*,
|
|
23205
|
+
destinations: typing.Sequence[typing.Union[GrantReplicationPermissionDestinationProps, typing.Dict[builtins.str, typing.Any]]],
|
|
23206
|
+
source_decryption_key: typing.Optional[_IKey_5f11635f] = None,
|
|
23207
|
+
) -> None:
|
|
23208
|
+
"""Type checking stubs"""
|
|
23209
|
+
pass
|
|
23210
|
+
|
|
22868
23211
|
def _typecheckingstub__eee382ff86c17d46379012dcccee86976ea92e15cb6d63c3e3f4e853c058ac53(
|
|
22869
23212
|
value: typing.Optional[BucketPolicy],
|
|
22870
23213
|
) -> None:
|
|
@@ -22961,6 +23304,15 @@ def _typecheckingstub__96c877c118f5e8a1b2d7e8d8a3a593f12688f174eaf15ecd7c8198344
|
|
|
22961
23304
|
"""Type checking stubs"""
|
|
22962
23305
|
pass
|
|
22963
23306
|
|
|
23307
|
+
def _typecheckingstub__b2772da13be98dbf89b1d2aec491a21f6a48f84e8d96dacef9ad681c2a3c690a(
|
|
23308
|
+
identity: _IGrantable_71c4f5de,
|
|
23309
|
+
*,
|
|
23310
|
+
destinations: typing.Sequence[typing.Union[GrantReplicationPermissionDestinationProps, typing.Dict[builtins.str, typing.Any]]],
|
|
23311
|
+
source_decryption_key: typing.Optional[_IKey_5f11635f] = None,
|
|
23312
|
+
) -> None:
|
|
23313
|
+
"""Type checking stubs"""
|
|
23314
|
+
pass
|
|
23315
|
+
|
|
22964
23316
|
def _typecheckingstub__d80dff4704f5345b5514fd2dfceb4cf2e1b6f5dbd368505a740522685f4b2404(
|
|
22965
23317
|
identity: _IGrantable_71c4f5de,
|
|
22966
23318
|
objects_key_pattern: typing.Any = None,
|
|
@@ -23343,6 +23695,15 @@ def _typecheckingstub__b4fefa6383b8da3c85e674cc7aa9017f54bbafd94b3f086c041a65129
|
|
|
23343
23695
|
"""Type checking stubs"""
|
|
23344
23696
|
pass
|
|
23345
23697
|
|
|
23698
|
+
def _typecheckingstub__ae08375448013fd67c288fc732b4e3bd7135520a849542f49221c12f286f9554(
|
|
23699
|
+
identity: _IGrantable_71c4f5de,
|
|
23700
|
+
*,
|
|
23701
|
+
destinations: typing.Sequence[typing.Union[GrantReplicationPermissionDestinationProps, typing.Dict[builtins.str, typing.Any]]],
|
|
23702
|
+
source_decryption_key: typing.Optional[_IKey_5f11635f] = None,
|
|
23703
|
+
) -> None:
|
|
23704
|
+
"""Type checking stubs"""
|
|
23705
|
+
pass
|
|
23706
|
+
|
|
23346
23707
|
def _typecheckingstub__857aef69f081fcbca7e312228a28a24530a67adbfdf13e38eca13f14153683be(
|
|
23347
23708
|
identity: _IGrantable_71c4f5de,
|
|
23348
23709
|
objects_key_pattern: typing.Any = None,
|