aws-cdk-lib 2.75.1__py3-none-any.whl → 2.76.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 +245 -259
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.75.1.jsii.tgz → aws-cdk-lib@2.76.0.jsii.tgz} +0 -0
- aws_cdk/aws_amplifyuibuilder/__init__.py +184 -216
- aws_cdk/aws_apigateway/__init__.py +95 -148
- aws_cdk/aws_appconfig/__init__.py +8 -4
- aws_cdk/aws_appflow/__init__.py +27 -52
- aws_cdk/aws_appmesh/__init__.py +91 -200
- aws_cdk/aws_apprunner/__init__.py +4 -16
- aws_cdk/aws_appstream/__init__.py +18 -82
- aws_cdk/aws_athena/__init__.py +18 -32
- aws_cdk/aws_backup/__init__.py +48 -86
- aws_cdk/aws_billingconductor/__init__.py +12 -7
- aws_cdk/aws_budgets/__init__.py +8 -17
- aws_cdk/aws_certificatemanager/__init__.py +7 -4
- aws_cdk/aws_cloudfront/__init__.py +14 -11
- aws_cdk/aws_cloudfront_origins/__init__.py +18 -8
- aws_cdk/aws_cloudtrail/__init__.py +7 -10
- aws_cdk/aws_cloudwatch/__init__.py +63 -35
- aws_cdk/aws_codebuild/__init__.py +10 -13
- aws_cdk/aws_codecommit/__init__.py +0 -1
- aws_cdk/aws_codedeploy/__init__.py +165 -162
- aws_cdk/aws_codepipeline/__init__.py +0 -4
- aws_cdk/aws_codepipeline_actions/__init__.py +16 -164
- aws_cdk/aws_cognito/__init__.py +195 -100
- aws_cdk/aws_config/__init__.py +28 -51
- aws_cdk/aws_connectcampaigns/__init__.py +5 -6
- aws_cdk/aws_databrew/__init__.py +5 -6
- aws_cdk/aws_dlm/__init__.py +33 -71
- aws_cdk/aws_docdb/__init__.py +20 -76
- aws_cdk/aws_dynamodb/__init__.py +7 -14
- aws_cdk/aws_ec2/__init__.py +1846 -421
- aws_cdk/aws_ecr/__init__.py +1 -2
- aws_cdk/aws_ecr_assets/__init__.py +27 -14
- aws_cdk/aws_ecs/__init__.py +241 -111
- aws_cdk/aws_ecs_patterns/__init__.py +13 -11
- aws_cdk/aws_eks/__init__.py +13 -8
- aws_cdk/aws_elasticloadbalancing/__init__.py +16 -9
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +142 -82
- aws_cdk/aws_elasticloadbalancingv2_actions/__init__.py +126 -61
- aws_cdk/aws_elasticsearch/__init__.py +0 -7
- aws_cdk/aws_emr/__init__.py +7 -16
- aws_cdk/aws_emrserverless/__init__.py +14 -18
- aws_cdk/aws_events/__init__.py +33 -29
- aws_cdk/aws_events_targets/__init__.py +248 -89
- aws_cdk/aws_frauddetector/__init__.py +3 -4
- aws_cdk/aws_fsx/__init__.py +13 -7
- aws_cdk/aws_gamelift/__init__.py +11 -20
- aws_cdk/aws_iam/__init__.py +21 -25
- aws_cdk/aws_imagebuilder/__init__.py +58 -80
- aws_cdk/aws_iot/__init__.py +16 -10
- aws_cdk/aws_iotcoredeviceadvisor/__init__.py +16 -26
- aws_cdk/aws_iotevents/__init__.py +6 -4
- aws_cdk/aws_iotfleetwise/__init__.py +27 -40
- aws_cdk/aws_iotsitewise/__init__.py +8 -5
- aws_cdk/aws_kinesisfirehose/__init__.py +21 -38
- aws_cdk/aws_lambda/__init__.py +59 -48
- aws_cdk/aws_lambda_event_sources/__init__.py +6 -21
- aws_cdk/aws_logs/__init__.py +5 -7
- aws_cdk/aws_macie/__init__.py +22 -15
- aws_cdk/aws_mediaconnect/__init__.py +5 -8
- aws_cdk/aws_medialive/__init__.py +2 -4
- aws_cdk/aws_mediapackage/__init__.py +9 -18
- aws_cdk/aws_memorydb/__init__.py +5 -10
- aws_cdk/aws_mwaa/__init__.py +8 -4
- aws_cdk/aws_nimblestudio/__init__.py +25 -45
- aws_cdk/aws_opensearchservice/__init__.py +0 -1
- aws_cdk/aws_panorama/__init__.py +11 -12
- aws_cdk/aws_personalize/__init__.py +46 -72
- aws_cdk/aws_pinpoint/__init__.py +36 -65
- aws_cdk/aws_quicksight/__init__.py +9972 -13374
- aws_cdk/aws_rds/__init__.py +23 -22
- aws_cdk/aws_route53/__init__.py +8 -16
- aws_cdk/aws_route53_targets/__init__.py +2 -4
- aws_cdk/aws_s3/__init__.py +25 -85
- aws_cdk/aws_s3_notifications/__init__.py +0 -3
- aws_cdk/aws_sagemaker/__init__.py +6 -2
- aws_cdk/aws_secretsmanager/__init__.py +17 -14
- aws_cdk/aws_servicecatalog/__init__.py +58 -82
- aws_cdk/aws_servicediscovery/__init__.py +4 -6
- aws_cdk/aws_ses/__init__.py +21 -34
- aws_cdk/aws_sns/__init__.py +4 -8
- aws_cdk/aws_ssm/__init__.py +19 -23
- aws_cdk/aws_ssmcontacts/__init__.py +10 -6
- aws_cdk/aws_stepfunctions/__init__.py +3 -12
- aws_cdk/aws_stepfunctions_tasks/__init__.py +7 -12
- aws_cdk/aws_timestream/__init__.py +22 -28
- aws_cdk/aws_xray/__init__.py +15 -22
- aws_cdk/cloud_assembly_schema/__init__.py +14 -6
- aws_cdk/custom_resources/__init__.py +2 -3
- aws_cdk/pipelines/__init__.py +84 -134
- aws_cdk/triggers/__init__.py +46 -61
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/METADATA +47 -92
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/RECORD +98 -98
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/top_level.txt +0 -0
|
@@ -1285,9 +1285,8 @@ class CfnDetector(
|
|
|
1285
1285
|
)
|
|
1286
1286
|
class ModelProperty:
|
|
1287
1287
|
def __init__(self, *, arn: typing.Optional[builtins.str] = None) -> None:
|
|
1288
|
-
'''
|
|
1289
|
-
|
|
1290
|
-
:param arn: The ARN of the model.
|
|
1288
|
+
'''
|
|
1289
|
+
:param arn: ``CfnDetector.ModelProperty.Arn``.
|
|
1291
1290
|
|
|
1292
1291
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-frauddetector-detector-model.html
|
|
1293
1292
|
:exampleMetadata: fixture=_generated
|
|
@@ -1311,7 +1310,7 @@ class CfnDetector(
|
|
|
1311
1310
|
|
|
1312
1311
|
@builtins.property
|
|
1313
1312
|
def arn(self) -> typing.Optional[builtins.str]:
|
|
1314
|
-
'''
|
|
1313
|
+
'''``CfnDetector.ModelProperty.Arn``.
|
|
1315
1314
|
|
|
1316
1315
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-frauddetector-detector-model.html#cfn-frauddetector-detector-model-arn
|
|
1317
1316
|
'''
|
aws_cdk/aws_fsx/__init__.py
CHANGED
|
@@ -112,7 +112,7 @@ inst.user_data.add_commands("set -eux", "yum update -y", "amazon-linux-extras in
|
|
|
112
112
|
|
|
113
113
|
### Importing an existing Lustre filesystem
|
|
114
114
|
|
|
115
|
-
An FSx for Lustre file system can be imported with `fromLustreFileSystemAttributes(
|
|
115
|
+
An FSx for Lustre file system can be imported with `fromLustreFileSystemAttributes(this, id, attributes)`. The
|
|
116
116
|
following example lays out how you could import the SecurityGroup a file system belongs to, use that to import the file
|
|
117
117
|
system, and then also import the VPC the file system is in and add an EC2 instance to it, giving it access to the file
|
|
118
118
|
system.
|
|
@@ -154,7 +154,8 @@ Note: CloudFormation does not currently support for `PERSISTENT_2` filesystems,
|
|
|
154
154
|
The following example illustrates setting up a DRA to an S3 bucket, including automated metadata import whenever a file is changed, created or deleted in the S3 bucket:
|
|
155
155
|
|
|
156
156
|
```python
|
|
157
|
-
|
|
157
|
+
from aws_cdk import aws_s3 as s3
|
|
158
|
+
|
|
158
159
|
# vpc: ec2.Vpc
|
|
159
160
|
# bucket: s3.Bucket
|
|
160
161
|
|
|
@@ -6220,7 +6221,8 @@ class LustreAutoImportPolicy(enum.Enum):
|
|
|
6220
6221
|
|
|
6221
6222
|
Example::
|
|
6222
6223
|
|
|
6223
|
-
|
|
6224
|
+
from aws_cdk import aws_s3 as s3
|
|
6225
|
+
|
|
6224
6226
|
# vpc: ec2.Vpc
|
|
6225
6227
|
# bucket: s3.Bucket
|
|
6226
6228
|
|
|
@@ -6305,7 +6307,8 @@ class LustreConfiguration:
|
|
|
6305
6307
|
|
|
6306
6308
|
Example::
|
|
6307
6309
|
|
|
6308
|
-
|
|
6310
|
+
from aws_cdk import aws_s3 as s3
|
|
6311
|
+
|
|
6309
6312
|
# vpc: ec2.Vpc
|
|
6310
6313
|
# bucket: s3.Bucket
|
|
6311
6314
|
|
|
@@ -6496,7 +6499,8 @@ class LustreDeploymentType(enum.Enum):
|
|
|
6496
6499
|
|
|
6497
6500
|
Example::
|
|
6498
6501
|
|
|
6499
|
-
|
|
6502
|
+
from aws_cdk import aws_s3 as s3
|
|
6503
|
+
|
|
6500
6504
|
# vpc: ec2.Vpc
|
|
6501
6505
|
# bucket: s3.Bucket
|
|
6502
6506
|
|
|
@@ -6581,7 +6585,8 @@ class LustreFileSystemProps(FileSystemProps):
|
|
|
6581
6585
|
|
|
6582
6586
|
Example::
|
|
6583
6587
|
|
|
6584
|
-
|
|
6588
|
+
from aws_cdk import aws_s3 as s3
|
|
6589
|
+
|
|
6585
6590
|
# vpc: ec2.Vpc
|
|
6586
6591
|
# bucket: s3.Bucket
|
|
6587
6592
|
|
|
@@ -6968,7 +6973,8 @@ class LustreFileSystem(
|
|
|
6968
6973
|
|
|
6969
6974
|
Example::
|
|
6970
6975
|
|
|
6971
|
-
|
|
6976
|
+
from aws_cdk import aws_s3 as s3
|
|
6977
|
+
|
|
6972
6978
|
# vpc: ec2.Vpc
|
|
6973
6979
|
# bucket: s3.Bucket
|
|
6974
6980
|
|
aws_cdk/aws_gamelift/__init__.py
CHANGED
|
@@ -954,7 +954,7 @@ class CfnFleet(
|
|
|
954
954
|
:param anywhere_configuration: ``AWS::GameLift::Fleet.AnywhereConfiguration``.
|
|
955
955
|
:param build_id: A unique identifier for a build to be deployed on the new fleet. If you are deploying the fleet with a custom game build, you must specify this property. The build must have been successfully uploaded to Amazon GameLift and be in a ``READY`` status. This fleet setting cannot be changed once the fleet is created.
|
|
956
956
|
:param certificate_configuration: Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet. Amazon GameLift uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift. By default, the ``CertificateConfiguration`` is ``DISABLED`` . You can't change this property after you create the fleet. AWS Certificate Manager (ACM) certificates expire after 13 months. Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet. We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition. .. epigraph:: ACM isn't available in all AWS regions. A fleet creation request with certificate generation enabled in an unsupported Region, fails with a 4xx error. For more information about the supported Regions, see `Supported Regions <https://docs.aws.amazon.com/acm/latest/userguide/acm-regions.html>`_ in the *AWS Certificate Manager User Guide* .
|
|
957
|
-
:param compute_type:
|
|
957
|
+
:param compute_type: ``AWS::GameLift::Fleet.ComputeType``.
|
|
958
958
|
:param description: A description for the fleet.
|
|
959
959
|
:param desired_ec2_instances: The number of EC2 instances that you want this fleet to host. When creating a new fleet, GameLift automatically sets this value to "1" and initiates a single instance. Once the fleet is active, update this value to trigger GameLift to add or remove instances from the fleet.
|
|
960
960
|
:param ec2_inbound_permissions: The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. If the fleet is hosting a custom game build, this property must be set before players can connect to game sessions. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges.
|
|
@@ -1134,9 +1134,7 @@ class CfnFleet(
|
|
|
1134
1134
|
@builtins.property
|
|
1135
1135
|
@jsii.member(jsii_name="computeType")
|
|
1136
1136
|
def compute_type(self) -> typing.Optional[builtins.str]:
|
|
1137
|
-
'''
|
|
1138
|
-
|
|
1139
|
-
You can use your own compute resources with Amazon GameLift Anywhere or use Amazon EC2 instances with managed Amazon GameLift.
|
|
1137
|
+
'''``AWS::GameLift::Fleet.ComputeType``.
|
|
1140
1138
|
|
|
1141
1139
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-fleet.html#cfn-gamelift-fleet-computetype
|
|
1142
1140
|
'''
|
|
@@ -1474,9 +1472,8 @@ class CfnFleet(
|
|
|
1474
1472
|
)
|
|
1475
1473
|
class AnywhereConfigurationProperty:
|
|
1476
1474
|
def __init__(self, *, cost: builtins.str) -> None:
|
|
1477
|
-
'''
|
|
1478
|
-
|
|
1479
|
-
:param cost: The cost to run your fleet per hour. Amazon GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see `Setting up queues <https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html>`_ in the *Amazon GameLift Developer Guide* .
|
|
1475
|
+
'''
|
|
1476
|
+
:param cost: ``CfnFleet.AnywhereConfigurationProperty.Cost``.
|
|
1480
1477
|
|
|
1481
1478
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-anywhereconfiguration.html
|
|
1482
1479
|
:exampleMetadata: fixture=_generated
|
|
@@ -1500,9 +1497,7 @@ class CfnFleet(
|
|
|
1500
1497
|
|
|
1501
1498
|
@builtins.property
|
|
1502
1499
|
def cost(self) -> builtins.str:
|
|
1503
|
-
'''
|
|
1504
|
-
|
|
1505
|
-
Amazon GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see `Setting up queues <https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html>`_ in the *Amazon GameLift Developer Guide* .
|
|
1500
|
+
'''``CfnFleet.AnywhereConfigurationProperty.Cost``.
|
|
1506
1501
|
|
|
1507
1502
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-anywhereconfiguration.html#cfn-gamelift-fleet-anywhereconfiguration-cost
|
|
1508
1503
|
'''
|
|
@@ -2236,7 +2231,7 @@ class CfnFleetProps:
|
|
|
2236
2231
|
:param anywhere_configuration: ``AWS::GameLift::Fleet.AnywhereConfiguration``.
|
|
2237
2232
|
:param build_id: A unique identifier for a build to be deployed on the new fleet. If you are deploying the fleet with a custom game build, you must specify this property. The build must have been successfully uploaded to Amazon GameLift and be in a ``READY`` status. This fleet setting cannot be changed once the fleet is created.
|
|
2238
2233
|
:param certificate_configuration: Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet. Amazon GameLift uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift. By default, the ``CertificateConfiguration`` is ``DISABLED`` . You can't change this property after you create the fleet. AWS Certificate Manager (ACM) certificates expire after 13 months. Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet. We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition. .. epigraph:: ACM isn't available in all AWS regions. A fleet creation request with certificate generation enabled in an unsupported Region, fails with a 4xx error. For more information about the supported Regions, see `Supported Regions <https://docs.aws.amazon.com/acm/latest/userguide/acm-regions.html>`_ in the *AWS Certificate Manager User Guide* .
|
|
2239
|
-
:param compute_type:
|
|
2234
|
+
:param compute_type: ``AWS::GameLift::Fleet.ComputeType``.
|
|
2240
2235
|
:param description: A description for the fleet.
|
|
2241
2236
|
:param desired_ec2_instances: The number of EC2 instances that you want this fleet to host. When creating a new fleet, GameLift automatically sets this value to "1" and initiates a single instance. Once the fleet is active, update this value to trigger GameLift to add or remove instances from the fleet.
|
|
2242
2237
|
:param ec2_inbound_permissions: The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. If the fleet is hosting a custom game build, this property must be set before players can connect to game sessions. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges.
|
|
@@ -2441,9 +2436,7 @@ class CfnFleetProps:
|
|
|
2441
2436
|
|
|
2442
2437
|
@builtins.property
|
|
2443
2438
|
def compute_type(self) -> typing.Optional[builtins.str]:
|
|
2444
|
-
'''
|
|
2445
|
-
|
|
2446
|
-
You can use your own compute resources with Amazon GameLift Anywhere or use Amazon EC2 instances with managed Amazon GameLift.
|
|
2439
|
+
'''``AWS::GameLift::Fleet.ComputeType``.
|
|
2447
2440
|
|
|
2448
2441
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-fleet.html#cfn-gamelift-fleet-computetype
|
|
2449
2442
|
'''
|
|
@@ -4519,8 +4512,6 @@ class CfnLocation(
|
|
|
4519
4512
|
):
|
|
4520
4513
|
'''A CloudFormation ``AWS::GameLift::Location``.
|
|
4521
4514
|
|
|
4522
|
-
Creates a custom location for use in an Anywhere fleet.
|
|
4523
|
-
|
|
4524
4515
|
:cloudformationResource: AWS::GameLift::Location
|
|
4525
4516
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html
|
|
4526
4517
|
:exampleMetadata: fixture=_generated
|
|
@@ -4554,7 +4545,7 @@ class CfnLocation(
|
|
|
4554
4545
|
|
|
4555
4546
|
:param scope: - scope in which this resource is defined.
|
|
4556
4547
|
:param id: - scoped id of the resource.
|
|
4557
|
-
:param location_name:
|
|
4548
|
+
:param location_name: ``AWS::GameLift::Location.LocationName``.
|
|
4558
4549
|
:param tags: ``AWS::GameLift::Location.Tags``.
|
|
4559
4550
|
'''
|
|
4560
4551
|
if __debug__:
|
|
@@ -4620,7 +4611,7 @@ class CfnLocation(
|
|
|
4620
4611
|
@builtins.property
|
|
4621
4612
|
@jsii.member(jsii_name="locationName")
|
|
4622
4613
|
def location_name(self) -> builtins.str:
|
|
4623
|
-
'''
|
|
4614
|
+
'''``AWS::GameLift::Location.LocationName``.
|
|
4624
4615
|
|
|
4625
4616
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html#cfn-gamelift-location-locationname
|
|
4626
4617
|
'''
|
|
@@ -4648,7 +4639,7 @@ class CfnLocationProps:
|
|
|
4648
4639
|
) -> None:
|
|
4649
4640
|
'''Properties for defining a ``CfnLocation``.
|
|
4650
4641
|
|
|
4651
|
-
:param location_name:
|
|
4642
|
+
:param location_name: ``AWS::GameLift::Location.LocationName``.
|
|
4652
4643
|
:param tags: ``AWS::GameLift::Location.Tags``.
|
|
4653
4644
|
|
|
4654
4645
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html
|
|
@@ -4682,7 +4673,7 @@ class CfnLocationProps:
|
|
|
4682
4673
|
|
|
4683
4674
|
@builtins.property
|
|
4684
4675
|
def location_name(self) -> builtins.str:
|
|
4685
|
-
'''
|
|
4676
|
+
'''``AWS::GameLift::Location.LocationName``.
|
|
4686
4677
|
|
|
4687
4678
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html#cfn-gamelift-location-locationname
|
|
4688
4679
|
'''
|
aws_cdk/aws_iam/__init__.py
CHANGED
|
@@ -173,13 +173,13 @@ property, like shown below:
|
|
|
173
173
|
# app: App
|
|
174
174
|
|
|
175
175
|
stack = Stack(app, "MyStack")
|
|
176
|
-
iam.Role.customize_roles(
|
|
176
|
+
iam.Role.customize_roles(self,
|
|
177
177
|
use_precreated_roles={
|
|
178
178
|
"MyStack/MyRole": "my-precreated-role-name"
|
|
179
179
|
}
|
|
180
180
|
)
|
|
181
181
|
|
|
182
|
-
iam.Role(
|
|
182
|
+
iam.Role(self, "MyRole",
|
|
183
183
|
assumed_by=iam.ServicePrincipal("sns.amazonaws.com")
|
|
184
184
|
)
|
|
185
185
|
```
|
|
@@ -194,13 +194,13 @@ following CDK code:
|
|
|
194
194
|
stack = Stack(app, "MyStack")
|
|
195
195
|
iam.Role.customize_roles(stack)
|
|
196
196
|
|
|
197
|
-
fn = lambda_.Function(
|
|
197
|
+
fn = lambda_.Function(self, "MyLambda",
|
|
198
198
|
code=lambda_.InlineCode("foo"),
|
|
199
199
|
handler="index.handler",
|
|
200
200
|
runtime=lambda_.Runtime.NODEJS_14_X
|
|
201
201
|
)
|
|
202
202
|
|
|
203
|
-
bucket = s3.Bucket(
|
|
203
|
+
bucket = s3.Bucket(self, "Bucket")
|
|
204
204
|
bucket.grant_read(fn)
|
|
205
205
|
```
|
|
206
206
|
|
|
@@ -252,7 +252,7 @@ come back and update the `customizeRoles` with the role name.
|
|
|
252
252
|
# app: App
|
|
253
253
|
|
|
254
254
|
stack = Stack(app, "MyStack")
|
|
255
|
-
iam.Role.customize_roles(
|
|
255
|
+
iam.Role.customize_roles(self,
|
|
256
256
|
use_precreated_roles={
|
|
257
257
|
"MyStack/MyLambda/ServiceRole": "my-role-name"
|
|
258
258
|
}
|
|
@@ -269,7 +269,7 @@ It is also possible to generate the report *without* preventing the role/policy
|
|
|
269
269
|
```python
|
|
270
270
|
# stack: Stack
|
|
271
271
|
|
|
272
|
-
iam.Role.customize_roles(
|
|
272
|
+
iam.Role.customize_roles(self,
|
|
273
273
|
prevent_synthesis=False
|
|
274
274
|
)
|
|
275
275
|
```
|
|
@@ -741,8 +741,8 @@ group = iam.Group.from_group_name(self, "MyImportedGroupByName", "group-name")
|
|
|
741
741
|
To add a user to a group (both for a new and imported user/group):
|
|
742
742
|
|
|
743
743
|
```python
|
|
744
|
-
user = iam.User(self, "MyUser") # or User.fromUserName(
|
|
745
|
-
group = iam.Group(self, "MyGroup") # or Group.fromGroupArn(
|
|
744
|
+
user = iam.User(self, "MyUser") # or User.fromUserName(this, 'User', 'johnsmith');
|
|
745
|
+
group = iam.Group(self, "MyGroup") # or Group.fromGroupArn(this, 'Group', 'arn:aws:iam::account-id:group/group-name');
|
|
746
746
|
|
|
747
747
|
user.add_to_group(group)
|
|
748
748
|
# or
|
|
@@ -995,7 +995,6 @@ class AddToResourcePolicyResult:
|
|
|
995
995
|
|
|
996
996
|
Example::
|
|
997
997
|
|
|
998
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
999
998
|
bucket = s3.Bucket.from_bucket_name(self, "existingBucket", "bucket-name")
|
|
1000
999
|
|
|
1001
1000
|
# No policy statement will be added to the resource
|
|
@@ -6107,7 +6106,7 @@ class CustomizeRolesOptions:
|
|
|
6107
6106
|
'''Options for customizing IAM role creation.
|
|
6108
6107
|
|
|
6109
6108
|
:param prevent_synthesis: Whether or not to synthesize the resource into the CFN template. Set this to ``false`` if you still want to create the resources *and* you also want to create the policy report. Default: true
|
|
6110
|
-
:param use_precreated_roles: A list of precreated IAM roles to substitute for roles that CDK is creating. The constructPath can be either a relative or absolute path from the scope that ``customizeRoles`` is used on to the role being created.
|
|
6109
|
+
:param use_precreated_roles: A list of precreated IAM roles to substitute for roles that CDK is creating. The constructPath can be either a relative or absolute path from the scope that ``customizeRoles`` is used on to the role being created. Default: - there are no precreated roles. Synthesis will fail if ``preventSynthesis=true``
|
|
6111
6110
|
|
|
6112
6111
|
:exampleMetadata: infused
|
|
6113
6112
|
|
|
@@ -6116,7 +6115,7 @@ class CustomizeRolesOptions:
|
|
|
6116
6115
|
# app: App
|
|
6117
6116
|
|
|
6118
6117
|
stack = Stack(app, "MyStack")
|
|
6119
|
-
iam.Role.customize_roles(
|
|
6118
|
+
iam.Role.customize_roles(self,
|
|
6120
6119
|
use_precreated_roles={
|
|
6121
6120
|
"MyStack/MyLambda/ServiceRole": "my-role-name"
|
|
6122
6121
|
}
|
|
@@ -6153,17 +6152,19 @@ class CustomizeRolesOptions:
|
|
|
6153
6152
|
The constructPath can be either a relative or absolute path
|
|
6154
6153
|
from the scope that ``customizeRoles`` is used on to the role being created.
|
|
6155
6154
|
|
|
6156
|
-
For example, if you were creating a role
|
|
6157
|
-
|
|
6158
6155
|
:default: - there are no precreated roles. Synthesis will fail if ``preventSynthesis=true``
|
|
6159
6156
|
|
|
6160
6157
|
Example::
|
|
6161
6158
|
|
|
6162
|
-
#
|
|
6159
|
+
# app: App
|
|
6160
|
+
|
|
6161
|
+
|
|
6163
6162
|
stack = Stack(app, "MyStack")
|
|
6164
|
-
Role(stack, "MyRole"
|
|
6163
|
+
iam.Role(stack, "MyRole",
|
|
6164
|
+
assumed_by=iam.AccountPrincipal("1111111111")
|
|
6165
|
+
)
|
|
6165
6166
|
|
|
6166
|
-
Role.customize_roles(stack,
|
|
6167
|
+
iam.Role.customize_roles(stack,
|
|
6167
6168
|
use_precreated_roles={
|
|
6168
6169
|
# absolute path
|
|
6169
6170
|
"MyStack/MyRole": "my-precreated-role-name",
|
|
@@ -6437,7 +6438,6 @@ class Grant(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_iam.Grant"):
|
|
|
6437
6438
|
|
|
6438
6439
|
Example::
|
|
6439
6440
|
|
|
6440
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
6441
6441
|
# instance: ec2.Instance
|
|
6442
6442
|
# volume: ec2.Volume
|
|
6443
6443
|
|
|
@@ -11533,7 +11533,6 @@ class PrincipalBase(
|
|
|
11533
11533
|
|
|
11534
11534
|
Example::
|
|
11535
11535
|
|
|
11536
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
11537
11536
|
tag_param = CfnParameter(self, "TagName")
|
|
11538
11537
|
|
|
11539
11538
|
string_equals = CfnJson(self, "ConditionJson",
|
|
@@ -11943,14 +11942,13 @@ class Role(
|
|
|
11943
11942
|
|
|
11944
11943
|
:param scope: construct scope to customize role creation.
|
|
11945
11944
|
:param prevent_synthesis: Whether or not to synthesize the resource into the CFN template. Set this to ``false`` if you still want to create the resources *and* you also want to create the policy report. Default: true
|
|
11946
|
-
:param use_precreated_roles: A list of precreated IAM roles to substitute for roles that CDK is creating. The constructPath can be either a relative or absolute path from the scope that ``customizeRoles`` is used on to the role being created.
|
|
11945
|
+
:param use_precreated_roles: A list of precreated IAM roles to substitute for roles that CDK is creating. The constructPath can be either a relative or absolute path from the scope that ``customizeRoles`` is used on to the role being created. Default: - there are no precreated roles. Synthesis will fail if ``preventSynthesis=true``
|
|
11947
11946
|
|
|
11948
11947
|
Example::
|
|
11949
11948
|
|
|
11950
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
11951
11949
|
# app: App
|
|
11952
11950
|
|
|
11953
|
-
Role.customize_roles(app,
|
|
11951
|
+
iam.Role.customize_roles(app,
|
|
11954
11952
|
use_precreated_roles={
|
|
11955
11953
|
"ConstructPath/To/Role": "my-precreated-role-name"
|
|
11956
11954
|
}
|
|
@@ -12738,7 +12736,6 @@ class ArnPrincipal(
|
|
|
12738
12736
|
|
|
12739
12737
|
Example::
|
|
12740
12738
|
|
|
12741
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
12742
12739
|
# network_load_balancer1: elbv2.NetworkLoadBalancer
|
|
12743
12740
|
# network_load_balancer2: elbv2.NetworkLoadBalancer
|
|
12744
12741
|
|
|
@@ -13295,7 +13292,6 @@ class AccountRootPrincipal(
|
|
|
13295
13292
|
|
|
13296
13293
|
Example::
|
|
13297
13294
|
|
|
13298
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
13299
13295
|
bucket = s3.Bucket(self, "MyBucket")
|
|
13300
13296
|
result = bucket.add_to_resource_policy(
|
|
13301
13297
|
iam.PolicyStatement(
|
|
@@ -13366,8 +13362,8 @@ class Group(
|
|
|
13366
13362
|
|
|
13367
13363
|
Example::
|
|
13368
13364
|
|
|
13369
|
-
user = iam.User(self, "MyUser") # or User.fromUserName(
|
|
13370
|
-
group = iam.Group(self, "MyGroup") # or Group.fromGroupArn(
|
|
13365
|
+
user = iam.User(self, "MyUser") # or User.fromUserName(this, 'User', 'johnsmith');
|
|
13366
|
+
group = iam.Group(self, "MyGroup") # or Group.fromGroupArn(this, 'Group', 'arn:aws:iam::account-id:group/group-name');
|
|
13371
13367
|
|
|
13372
13368
|
user.add_to_group(group)
|
|
13373
13369
|
# or
|