aws-cdk-lib 2.73.0__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.

Files changed (111) hide show
  1. aws_cdk/__init__.py +245 -259
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.73.0.jsii.tgz → aws-cdk-lib@2.76.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amplifyuibuilder/__init__.py +182 -214
  5. aws_cdk/aws_apigateway/__init__.py +95 -148
  6. aws_cdk/aws_appconfig/__init__.py +8 -4
  7. aws_cdk/aws_appflow/__init__.py +27 -52
  8. aws_cdk/aws_appmesh/__init__.py +91 -200
  9. aws_cdk/aws_apprunner/__init__.py +4 -16
  10. aws_cdk/aws_appstream/__init__.py +18 -82
  11. aws_cdk/aws_athena/__init__.py +18 -32
  12. aws_cdk/aws_backup/__init__.py +48 -86
  13. aws_cdk/aws_batch/__init__.py +9 -2
  14. aws_cdk/aws_billingconductor/__init__.py +12 -7
  15. aws_cdk/aws_budgets/__init__.py +8 -17
  16. aws_cdk/aws_certificatemanager/__init__.py +7 -4
  17. aws_cdk/aws_cloudfront/__init__.py +14 -11
  18. aws_cdk/aws_cloudfront_origins/__init__.py +18 -8
  19. aws_cdk/aws_cloudtrail/__init__.py +7 -14
  20. aws_cdk/aws_cloudwatch/__init__.py +63 -35
  21. aws_cdk/aws_codebuild/__init__.py +10 -13
  22. aws_cdk/aws_codecommit/__init__.py +0 -1
  23. aws_cdk/aws_codedeploy/__init__.py +165 -162
  24. aws_cdk/aws_codegurureviewer/__init__.py +4 -4
  25. aws_cdk/aws_codepipeline/__init__.py +0 -4
  26. aws_cdk/aws_codepipeline_actions/__init__.py +16 -164
  27. aws_cdk/aws_cognito/__init__.py +195 -100
  28. aws_cdk/aws_config/__init__.py +28 -51
  29. aws_cdk/aws_connectcampaigns/__init__.py +5 -6
  30. aws_cdk/aws_databrew/__init__.py +5 -6
  31. aws_cdk/aws_dlm/__init__.py +33 -71
  32. aws_cdk/aws_docdb/__init__.py +20 -76
  33. aws_cdk/aws_dynamodb/__init__.py +29 -22
  34. aws_cdk/aws_ec2/__init__.py +2414 -603
  35. aws_cdk/aws_ecr/__init__.py +1 -2
  36. aws_cdk/aws_ecr_assets/__init__.py +27 -14
  37. aws_cdk/aws_ecs/__init__.py +458 -163
  38. aws_cdk/aws_ecs_patterns/__init__.py +13 -11
  39. aws_cdk/aws_eks/__init__.py +13 -8
  40. aws_cdk/aws_elasticloadbalancing/__init__.py +16 -9
  41. aws_cdk/aws_elasticloadbalancingv2/__init__.py +142 -82
  42. aws_cdk/aws_elasticloadbalancingv2_actions/__init__.py +126 -61
  43. aws_cdk/aws_elasticsearch/__init__.py +0 -7
  44. aws_cdk/aws_emr/__init__.py +7 -16
  45. aws_cdk/aws_emrserverless/__init__.py +14 -18
  46. aws_cdk/aws_events/__init__.py +33 -29
  47. aws_cdk/aws_events_targets/__init__.py +248 -89
  48. aws_cdk/aws_frauddetector/__init__.py +3 -4
  49. aws_cdk/aws_fsx/__init__.py +13 -7
  50. aws_cdk/aws_gamelift/__init__.py +11 -20
  51. aws_cdk/aws_grafana/__init__.py +4 -4
  52. aws_cdk/aws_iam/__init__.py +21 -25
  53. aws_cdk/aws_imagebuilder/__init__.py +58 -80
  54. aws_cdk/aws_internetmonitor/__init__.py +18 -10
  55. aws_cdk/aws_iot/__init__.py +16 -10
  56. aws_cdk/aws_iotcoredeviceadvisor/__init__.py +16 -26
  57. aws_cdk/aws_iotevents/__init__.py +6 -4
  58. aws_cdk/aws_iotfleetwise/__init__.py +27 -40
  59. aws_cdk/aws_iotsitewise/__init__.py +8 -5
  60. aws_cdk/aws_iotwireless/__init__.py +14 -9
  61. aws_cdk/aws_kinesisfirehose/__init__.py +21 -38
  62. aws_cdk/aws_lambda/__init__.py +76 -53
  63. aws_cdk/aws_lambda_event_sources/__init__.py +6 -21
  64. aws_cdk/aws_logs/__init__.py +5 -7
  65. aws_cdk/aws_macie/__init__.py +28 -23
  66. aws_cdk/aws_mediaconnect/__init__.py +5 -8
  67. aws_cdk/aws_mediaconvert/__init__.py +2 -2
  68. aws_cdk/aws_medialive/__init__.py +2 -4
  69. aws_cdk/aws_mediapackage/__init__.py +9 -18
  70. aws_cdk/aws_memorydb/__init__.py +5 -10
  71. aws_cdk/aws_mwaa/__init__.py +8 -4
  72. aws_cdk/aws_neptune/__init__.py +4 -4
  73. aws_cdk/aws_networkfirewall/__init__.py +8 -4
  74. aws_cdk/aws_networkmanager/__init__.py +4 -4
  75. aws_cdk/aws_nimblestudio/__init__.py +25 -45
  76. aws_cdk/aws_opensearchservice/__init__.py +0 -1
  77. aws_cdk/aws_panorama/__init__.py +11 -12
  78. aws_cdk/aws_personalize/__init__.py +46 -72
  79. aws_cdk/aws_pinpoint/__init__.py +36 -65
  80. aws_cdk/aws_quicksight/__init__.py +9972 -13374
  81. aws_cdk/aws_rds/__init__.py +53 -22
  82. aws_cdk/aws_route53/__init__.py +8 -16
  83. aws_cdk/aws_route53_targets/__init__.py +2 -4
  84. aws_cdk/aws_s3/__init__.py +41 -90
  85. aws_cdk/aws_s3_notifications/__init__.py +0 -3
  86. aws_cdk/aws_sagemaker/__init__.py +16 -10
  87. aws_cdk/aws_secretsmanager/__init__.py +17 -14
  88. aws_cdk/aws_servicecatalog/__init__.py +60 -83
  89. aws_cdk/aws_servicediscovery/__init__.py +4 -6
  90. aws_cdk/aws_ses/__init__.py +734 -28
  91. aws_cdk/aws_sns/__init__.py +4 -8
  92. aws_cdk/aws_ssm/__init__.py +19 -23
  93. aws_cdk/aws_ssmcontacts/__init__.py +10 -6
  94. aws_cdk/aws_ssmincidents/__init__.py +2 -1
  95. aws_cdk/aws_sso/__init__.py +4 -4
  96. aws_cdk/aws_stepfunctions/__init__.py +6 -15
  97. aws_cdk/aws_stepfunctions_tasks/__init__.py +51 -24
  98. aws_cdk/aws_timestream/__init__.py +22 -28
  99. aws_cdk/aws_transfer/__init__.py +188 -86
  100. aws_cdk/aws_wafv2/__init__.py +54 -38
  101. aws_cdk/aws_xray/__init__.py +15 -22
  102. aws_cdk/cloud_assembly_schema/__init__.py +14 -6
  103. aws_cdk/custom_resources/__init__.py +2 -3
  104. aws_cdk/pipelines/__init__.py +104 -134
  105. aws_cdk/triggers/__init__.py +46 -61
  106. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/METADATA +47 -92
  107. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/RECORD +111 -111
  108. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/LICENSE +0 -0
  109. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/NOTICE +0 -0
  110. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/WHEEL +0 -0
  111. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/top_level.txt +0 -0
@@ -48,7 +48,6 @@ To use the CodePipeline engine, define a `CodePipeline` construct. The followin
48
48
  example creates a CodePipeline that deploys an application from GitHub:
49
49
 
50
50
  ```python
51
- # Example automatically generated from non-compiling source. May contain errors.
52
51
  # The stacks for our app are minimally defined here. The internals of these
53
52
  # stacks aren't important, except that DatabaseStack exposes an attribute
54
53
  # "table" for a database table it defines, and ComputeStack accepts a reference
@@ -166,7 +165,6 @@ To make the development more convenient, the self-mutation feature can be turned
166
165
  off temporarily, by passing `selfMutation: false` property, example:
167
166
 
168
167
  ```python
169
- # Example automatically generated from non-compiling source. May contain errors.
170
168
  # Modern API
171
169
  modern_pipeline = pipelines.CodePipeline(self, "Pipeline",
172
170
  self_mutation=False,
@@ -208,7 +206,6 @@ commands required will depend on the programming language you are using. For a
208
206
  typical NPM-based project, the synth will look like this:
209
207
 
210
208
  ```python
211
- # Example automatically generated from non-compiling source. May contain errors.
212
209
  # source: pipelines.IFileSetProducer
213
210
  # the repository source
214
211
 
@@ -227,7 +224,6 @@ CDK project lives in a subdirectory, be sure to adjust the
227
224
  `primaryOutputDirectory` to match:
228
225
 
229
226
  ```python
230
- # Example automatically generated from non-compiling source. May contain errors.
231
227
  # source: pipelines.IFileSetProducer
232
228
  # the repository source
233
229
 
@@ -257,7 +253,6 @@ look like in a number of different situations.
257
253
  For Yarn, the install commands are different:
258
254
 
259
255
  ```python
260
- # Example automatically generated from non-compiling source. May contain errors.
261
256
  # source: pipelines.IFileSetProducer
262
257
  # the repository source
263
258
 
@@ -274,7 +269,6 @@ For Python projects, remember to install the CDK CLI globally (as
274
269
  there is no `package.json` to automatically install it for you):
275
270
 
276
271
  ```python
277
- # Example automatically generated from non-compiling source. May contain errors.
278
272
  # source: pipelines.IFileSetProducer
279
273
  # the repository source
280
274
 
@@ -293,7 +287,6 @@ and the Maven compilation step is automatically executed for you
293
287
  as you run `cdk synth`:
294
288
 
295
289
  ```python
296
- # Example automatically generated from non-compiling source. May contain errors.
297
290
  # source: pipelines.IFileSetProducer
298
291
  # the repository source
299
292
 
@@ -325,7 +318,6 @@ To avoid this, put your build instructions in a separate script, for example
325
318
  `build.sh`, and call that script from the build `commands` array:
326
319
 
327
320
  ```python
328
- # Example automatically generated from non-compiling source. May contain errors.
329
321
  # source: pipelines.IFileSetProducer
330
322
 
331
323
 
@@ -355,7 +347,6 @@ You will first use the AWS Console to authenticate to the source control
355
347
  provider, and then use the connection ARN in your pipeline definition:
356
348
 
357
349
  ```python
358
- # Example automatically generated from non-compiling source. May contain errors.
359
350
  pipelines.CodePipelineSource.connection("org/repo", "branch",
360
351
  connection_arn="arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"
361
352
  )
@@ -370,7 +361,6 @@ you can change the name. The token should have the **repo** and **admin:repo_hoo
370
361
  scopes.
371
362
 
372
363
  ```python
373
- # Example automatically generated from non-compiling source. May contain errors.
374
364
  pipelines.CodePipelineSource.git_hub("org/repo", "branch",
375
365
  # This is optional
376
366
  authentication=cdk.SecretValue.secrets_manager("my-token")
@@ -384,7 +374,6 @@ that the CodeCommit repository and then use `CodePipelineSource.codeCommit`
384
374
  to reference it:
385
375
 
386
376
  ```python
387
- # Example automatically generated from non-compiling source. May contain errors.
388
377
  repository = codecommit.Repository.from_repository_name(self, "Repository", "my-repository")
389
378
  pipelines.CodePipelineSource.code_commit(repository, "main")
390
379
  ```
@@ -395,7 +384,6 @@ You can use a zip file in S3 as the source of the pipeline. The pipeline will be
395
384
  triggered every time the file in S3 is changed:
396
385
 
397
386
  ```python
398
- # Example automatically generated from non-compiling source. May contain errors.
399
387
  bucket = s3.Bucket.from_bucket_name(self, "Bucket", "my-bucket")
400
388
  pipelines.CodePipelineSource.s3(bucket, "my/source.zip")
401
389
  ```
@@ -406,7 +394,6 @@ You can use a Docker image in ECR as the source of the pipeline. The pipeline wi
406
394
  triggered every time an image is pushed to ECR:
407
395
 
408
396
  ```python
409
- # Example automatically generated from non-compiling source. May contain errors.
410
397
  repository = ecr.Repository(self, "Repository")
411
398
  pipelines.CodePipelineSource.ecr(repository)
412
399
  ```
@@ -419,7 +406,6 @@ output file set can be used as an input, such as a `CodePipelineSource`, but
419
406
  also other `ShellStep`:
420
407
 
421
408
  ```python
422
- # Example automatically generated from non-compiling source. May contain errors.
423
409
  prebuild = pipelines.ShellStep("Prebuild",
424
410
  input=pipelines.CodePipelineSource.git_hub("myorg/repo1", "main"),
425
411
  primary_output_directory="./build",
@@ -446,7 +432,6 @@ more CDK `Stages` which will be deployed to their target environments. To do
446
432
  so, call `pipeline.addStage()` on the Stage object:
447
433
 
448
434
  ```python
449
- # Example automatically generated from non-compiling source. May contain errors.
450
435
  # pipeline: pipelines.CodePipeline
451
436
 
452
437
  # Do this as many times as necessary with any account and region
@@ -481,7 +466,6 @@ deployed in sequence. For example, the following will deploy two copies of your
481
466
  application to `eu-west-1` and `eu-central-1` in parallel:
482
467
 
483
468
  ```python
484
- # Example automatically generated from non-compiling source. May contain errors.
485
469
  # pipeline: pipelines.CodePipeline
486
470
 
487
471
  europe_wave = pipeline.add_wave("Europe")
@@ -510,7 +494,6 @@ You may also wish to enable automatic key rotation for the created KMS key.
510
494
  Example:
511
495
 
512
496
  ```python
513
- # Example automatically generated from non-compiling source. May contain errors.
514
497
  pipeline = pipelines.CodePipeline(self, "Pipeline",
515
498
  # Encrypt artifacts, required for cross-account deployments
516
499
  cross_account_keys=True,
@@ -535,7 +518,6 @@ are not retryable and creation of the change set costs time.
535
518
  The creation of change sets can be switched off by setting `useChangeSets: false`:
536
519
 
537
520
  ```python
538
- # Example automatically generated from non-compiling source. May contain errors.
539
521
  # synth: pipelines.ShellStep
540
522
 
541
523
 
@@ -564,7 +546,6 @@ a manual approval in the form of a `ManualApprovalStep` added to the pipeline. B
564
546
  pass in order to promote from the `PreProd` to the `Prod` environment:
565
547
 
566
548
  ```python
567
- # Example automatically generated from non-compiling source. May contain errors.
568
549
  # pipeline: pipelines.CodePipeline
569
550
 
570
551
  preprod = MyApplicationStage(self, "PreProd")
@@ -587,7 +568,6 @@ pipeline.add_stage(prod,
587
568
  You can also specify steps to be executed at the stack level. To achieve this, you can specify the stack and step via the `stackSteps` property:
588
569
 
589
570
  ```python
590
- # Example automatically generated from non-compiling source. May contain errors.
591
571
  # pipeline: pipelines.CodePipeline
592
572
  class MyStacksStage(Stage):
593
573
 
@@ -614,7 +594,6 @@ If you specify multiple steps, they will execute in parallel by default. You can
614
594
  to if you wish to specify an order. To add a dependency, call `step.addStepDependency()`:
615
595
 
616
596
  ```python
617
- # Example automatically generated from non-compiling source. May contain errors.
618
597
  first_step = pipelines.ManualApprovalStep("A")
619
598
  second_step = pipelines.ManualApprovalStep("B")
620
599
  second_step.add_step_dependency(first_step)
@@ -624,7 +603,6 @@ For convenience, `Step.sequence()` will take an array of steps and dependencies
624
603
  so that the whole list executes in order:
625
604
 
626
605
  ```python
627
- # Example automatically generated from non-compiling source. May contain errors.
628
606
  # Step A will depend on step B and step B will depend on step C
629
607
  ordered_steps = pipelines.Step.sequence([
630
608
  pipelines.ManualApprovalStep("A"),
@@ -643,7 +621,6 @@ To use Stack Outputs, expose the `CfnOutput` object you're interested in, and
643
621
  pass it to `envFromCfnOutputs` of the `ShellStep`:
644
622
 
645
623
  ```python
646
- # Example automatically generated from non-compiling source. May contain errors.
647
624
  # pipeline: pipelines.CodePipeline
648
625
  class MyOutputStage(Stage):
649
626
 
@@ -678,7 +655,6 @@ Here's an example that captures an additional output directory in the synth
678
655
  step and runs tests from there:
679
656
 
680
657
  ```python
681
- # Example automatically generated from non-compiling source. May contain errors.
682
658
  # synth: pipelines.ShellStep
683
659
 
684
660
  stage = MyApplicationStage(self, "MyApplication")
@@ -704,7 +680,6 @@ generated, use a `CodeBuildStep` instead of a `ShellStep`. This class has a numb
704
680
  of properties that allow you to customize various aspects of the projects:
705
681
 
706
682
  ```python
707
- # Example automatically generated from non-compiling source. May contain errors.
708
683
  # vpc: ec2.Vpc
709
684
  # my_security_group: ec2.SecurityGroup
710
685
 
@@ -758,7 +733,6 @@ or just for the synth, asset publishing, and self-mutation projects by passing `
758
733
  `assetPublishingCodeBuildDefaults`, or `selfMutationCodeBuildDefaults`:
759
734
 
760
735
  ```python
761
- # Example automatically generated from non-compiling source. May contain errors.
762
736
  # vpc: ec2.Vpc
763
737
  # my_security_group: ec2.SecurityGroup
764
738
 
@@ -810,7 +784,6 @@ doesn't have a matching class yet, you can define your own step class that exten
810
784
  Here's an example that adds a Jenkins step:
811
785
 
812
786
  ```python
813
- # Example automatically generated from non-compiling source. May contain errors.
814
787
  @jsii.implements(pipelines.ICodePipelineActionFactory)
815
788
  class MyJenkinsStep(pipelines.Step):
816
789
  def __init__(self, provider, input):
@@ -847,25 +820,26 @@ class MyJenkinsStep(pipelines.Step):
847
820
  Another example, adding a lambda step referencing outputs from a stack:
848
821
 
849
822
  ```python
850
- # Example automatically generated from non-compiling source. May contain errors.
851
823
  @jsii.implements(pipelines.ICodePipelineActionFactory)
852
824
  class MyLambdaStep(pipelines.Step):
853
825
 
854
- def __init__(self):
855
- pass
856
- super().__init__("MyLambdaStep")
857
- self.stack_output_reference = pipelines.StackOutputReference.from_cfn_output(stack_output)produce_action(stage, codepipeline.IStage, options, pipelines.ProduceActionOptions)pipelines.CodePipelineActionFactoryResult
858
-
859
- stage.add_action(cpactions.LambdaInvokeAction(
860
- action_name=options.action_name,
861
- run_order=options.run_order,
862
- # Map the reference to the variable name the CDK has generated for you.
863
- user_parameters={"stack_output": options.stack_outputs_map.to_code_pipeline(self.stack_output_reference)},
864
- lambda_=self.function
865
- ))
866
-
867
- return {"run_orders_consumed": 1}getconsumed_stack_outputs()pipelines.StackOutputReference[]
868
- return [self.stack_output_reference]
826
+ def __init__(self, fn, stack_output):
827
+ super().__init__("MyLambdaStep")
828
+ self.stack_output_reference = pipelines.StackOutputReference.from_cfn_output(stack_output)
829
+
830
+ def produce_action(self, stage, *, scope, actionName, runOrder, variablesNamespace=None, artifacts, fallbackArtifact=None, pipeline, codeBuildDefaults=None, beforeSelfMutation=None, stackOutputsMap):
831
+
832
+ stage.add_action(cpactions.LambdaInvokeAction(
833
+ action_name=action_name,
834
+ run_order=run_order,
835
+ # Map the reference to the variable name the CDK has generated for you.
836
+ user_parameters={"stack_output": stack_outputs_map.to_code_pipeline(self.stack_output_reference)},
837
+ lambda_=self.fn
838
+ ))
839
+
840
+ return pipelines.CodePipelineActionFactoryResult(run_orders_consumed=1)public get consumedStackOutputs(): pipelines.StackOutputReference[] {
841
+ return [this.stackOutputReference];
842
+ }
869
843
  ```
870
844
 
871
845
  ### Using an existing AWS Codepipeline
@@ -881,7 +855,6 @@ Here's an example of passing in an existing pipeline and using a *source* that's
881
855
  in the pipeline:
882
856
 
883
857
  ```python
884
- # Example automatically generated from non-compiling source. May contain errors.
885
858
  # code_pipeline: codepipeline.Pipeline
886
859
 
887
860
 
@@ -900,7 +873,6 @@ If your existing pipeline already provides a synth step, pass the existing
900
873
  artifact in place of the `synth` step:
901
874
 
902
875
  ```python
903
- # Example automatically generated from non-compiling source. May contain errors.
904
876
  # code_pipeline: codepipeline.Pipeline
905
877
 
906
878
 
@@ -945,7 +917,6 @@ stacks the pipeline is deploying), for example by the use of `LinuxBuildImage.fr
945
917
  you need to pass `dockerEnabledForSelfMutation: true` to the pipeline. For example:
946
918
 
947
919
  ```python
948
- # Example automatically generated from non-compiling source. May contain errors.
949
920
  pipeline = pipelines.CodePipeline(self, "Pipeline",
950
921
  synth=pipelines.ShellStep("Synth",
951
922
  input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
@@ -985,7 +956,6 @@ if you add a construct like `@aws-cdk/aws-lambda-nodejs`), you need to pass
985
956
  `dockerEnabledForSynth: true` to the pipeline. For example:
986
957
 
987
958
  ```python
988
- # Example automatically generated from non-compiling source. May contain errors.
989
959
  pipeline = pipelines.CodePipeline(self, "Pipeline",
990
960
  synth=pipelines.ShellStep("Synth",
991
961
  input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
@@ -1011,7 +981,6 @@ any of the application stages — require authentication, either due to being in
1011
981
  different environment (e.g., ECR repo) or to avoid throttling (e.g., DockerHub).
1012
982
 
1013
983
  ```python
1014
- # Example automatically generated from non-compiling source. May contain errors.
1015
984
  docker_hub_secret = secretsmanager.Secret.from_secret_complete_arn(self, "DHSecret", "arn:aws:...")
1016
985
  custom_reg_secret = secretsmanager.Secret.from_secret_complete_arn(self, "CRSecret", "arn:aws:...")
1017
986
  repo1 = ecr.Repository.from_repository_arn(self, "Repo", "arn:aws:ecr:eu-west-1:0123456789012:repository/Repo1")
@@ -1045,7 +1014,6 @@ the **Synth**, **Self-Update**, and **Asset Publishing** actions within the
1045
1014
  *pipeline. The scope of the credentials can be limited via the `DockerCredentialUsage` option.
1046
1015
 
1047
1016
  ```python
1048
- # Example automatically generated from non-compiling source. May contain errors.
1049
1017
  docker_hub_secret = secretsmanager.Secret.from_secret_complete_arn(self, "DHSecret", "arn:aws:...")
1050
1018
  # Only the image asset publishing actions will be granted read access to the secret.
1051
1019
  creds = pipelines.DockerCredential.docker_hub(docker_hub_secret, usages=[pipelines.DockerCredentialUsage.ASSET_PUBLISHING])
@@ -1225,7 +1193,6 @@ give the synth CodeBuild execution role permissions to assume the bootstrapped
1225
1193
  lookup roles. As an example, doing so would look like this:
1226
1194
 
1227
1195
  ```python
1228
- # Example automatically generated from non-compiling source. May contain errors.
1229
1196
  pipelines.CodePipeline(self, "Pipeline",
1230
1197
  synth=pipelines.CodeBuildStep("Synth",
1231
1198
  input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
@@ -1308,7 +1275,6 @@ Pipeline
1308
1275
  You can insert the security check by using a `ConfirmPermissionsBroadening` step:
1309
1276
 
1310
1277
  ```python
1311
- # Example automatically generated from non-compiling source. May contain errors.
1312
1278
  # pipeline: pipelines.CodePipeline
1313
1279
 
1314
1280
  stage = MyApplicationStage(self, "MyApplication")
@@ -1324,7 +1290,6 @@ create an SNS Topic, subscribe your own email address, and pass it in as
1324
1290
  as the `notificationTopic` property:
1325
1291
 
1326
1292
  ```python
1327
- # Example automatically generated from non-compiling source. May contain errors.
1328
1293
  # pipeline: pipelines.CodePipeline
1329
1294
 
1330
1295
  topic = sns.Topic(self, "SecurityChangesTopic")
@@ -1450,7 +1415,6 @@ that bundles asset using tools run via Docker, like `aws-lambda-nodejs`, `aws-la
1450
1415
  Make sure you set the `privileged` environment variable to `true` in the synth definition:
1451
1416
 
1452
1417
  ```python
1453
- # Example automatically generated from non-compiling source. May contain errors.
1454
1418
  source_artifact = codepipeline.Artifact()
1455
1419
  cloud_assembly_artifact = codepipeline.Artifact()
1456
1420
  pipeline = pipelines.CdkPipeline(self, "MyPipeline",
@@ -1531,7 +1495,6 @@ build projects get out-of-sync with the generated templates. To fix this, make s
1531
1495
  `selfMutating` property is set to `true`:
1532
1496
 
1533
1497
  ```python
1534
- # Example automatically generated from non-compiling source. May contain errors.
1535
1498
  cloud_assembly_artifact = codepipeline.Artifact()
1536
1499
  pipeline = pipelines.CdkPipeline(self, "MyPipeline",
1537
1500
  self_mutating=True,
@@ -1569,7 +1532,6 @@ $ env CDK_NEW_BOOTSTRAP=1 npx cdk bootstrap \
1569
1532
  See https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html for more info.
1570
1533
 
1571
1534
  ```python
1572
- # Example automatically generated from non-compiling source. May contain errors.
1573
1535
  Stack(self, "MyStack",
1574
1536
  # Update this qualifier to match the one used above.
1575
1537
  synthesizer=cdk.DefaultStackSynthesizer(
@@ -1644,7 +1606,6 @@ your tooling and by adding the `CDK_DOCKER` environment variable to your
1644
1606
  build environment.
1645
1607
 
1646
1608
  ```python
1647
- # Example automatically generated from non-compiling source. May contain errors.
1648
1609
  # source: pipelines.IFileSetProducer # the repository source
1649
1610
  # synth_commands: List[str] # Commands to synthesize your app
1650
1611
  # install_commands: List[str]
@@ -1659,21 +1620,21 @@ pipeline = pipelines.CodePipeline(self, "Pipeline",
1659
1620
 
1660
1621
  # Configure CodeBuild to use a drop-in Docker replacement.
1661
1622
  code_build_defaults=pipelines.CodeBuildOptions(
1662
- build_environment=codebuild.BuildEnvironment(
1663
- partial_build_spec=Codebuild.BuildSpec.from_object(
1664
- phases={
1665
- "install": {
1666
- # Add the shell commands to install your drop-in Docker
1667
- # replacement to the CodeBuild enviromment.
1668
- "commands": install_commands
1669
- }
1623
+ partial_build_spec=codebuild.BuildSpec.from_object({
1624
+ "phases": {
1625
+ "install": {
1626
+ # Add the shell commands to install your drop-in Docker
1627
+ # replacement to the CodeBuild enviromment.
1628
+ "commands": install_commands
1670
1629
  }
1671
- ),
1630
+ }
1631
+ }),
1632
+ build_environment=codebuild.BuildEnvironment(
1672
1633
  environment_variables={
1673
1634
  # Instruct the AWS CDK to use `drop-in-replacement` instead of
1674
1635
  # `docker` when building / publishing docker images.
1675
1636
  # e.g., `drop-in-replacement build . -f path/to/Dockerfile`
1676
- "CDK_DOCKER": "drop-in-replacement"
1637
+ "CDK_DOCKER": codebuild.BuildEnvironmentVariable(value="drop-in-replacement")
1677
1638
  }
1678
1639
  )
1679
1640
  )
@@ -1688,7 +1649,6 @@ an `ENV` in your `Dockerfile` or by providing the environment variable in the
1688
1649
  pipeline as shown below.
1689
1650
 
1690
1651
  ```python
1691
- # Example automatically generated from non-compiling source. May contain errors.
1692
1652
  # source: pipelines.IFileSetProducer # the repository source
1693
1653
  # synth_commands: List[str]
1694
1654
  # Commands to synthesize your app
@@ -1710,7 +1670,7 @@ pipeline = pipelines.CodePipeline(self, "Pipeline",
1710
1670
  # If you haven't provided an `ENV` in your Dockerfile that overrides
1711
1671
  # `CDK_DOCKER`, then you must provide the name of the command that
1712
1672
  # the AWS CDK should run instead of `docker` here.
1713
- "CDK_DOCKER": "drop-in-replacement"
1673
+ "CDK_DOCKER": codebuild.BuildEnvironmentVariable(value="drop-in-replacement")
1714
1674
  }
1715
1675
  )
1716
1676
  )
@@ -1818,7 +1778,6 @@ class AddStageOpts:
1818
1778
 
1819
1779
  Example::
1820
1780
 
1821
- # Example automatically generated from non-compiling source. May contain errors.
1822
1781
  # pipeline: pipelines.CodePipeline
1823
1782
 
1824
1783
  preprod = MyApplicationStage(self, "PreProd")
@@ -1976,7 +1935,6 @@ class CodeBuildOptions:
1976
1935
 
1977
1936
  Example::
1978
1937
 
1979
- # Example automatically generated from non-compiling source. May contain errors.
1980
1938
  # source: pipelines.IFileSetProducer # the repository source
1981
1939
  # synth_commands: List[str] # Commands to synthesize your app
1982
1940
  # install_commands: List[str]
@@ -1991,21 +1949,21 @@ class CodeBuildOptions:
1991
1949
 
1992
1950
  # Configure CodeBuild to use a drop-in Docker replacement.
1993
1951
  code_build_defaults=pipelines.CodeBuildOptions(
1994
- build_environment=codebuild.BuildEnvironment(
1995
- partial_build_spec=Codebuild.BuildSpec.from_object(
1996
- phases={
1997
- "install": {
1998
- # Add the shell commands to install your drop-in Docker
1999
- # replacement to the CodeBuild enviromment.
2000
- "commands": install_commands
2001
- }
1952
+ partial_build_spec=codebuild.BuildSpec.from_object({
1953
+ "phases": {
1954
+ "install": {
1955
+ # Add the shell commands to install your drop-in Docker
1956
+ # replacement to the CodeBuild enviromment.
1957
+ "commands": install_commands
2002
1958
  }
2003
- ),
1959
+ }
1960
+ }),
1961
+ build_environment=codebuild.BuildEnvironment(
2004
1962
  environment_variables={
2005
1963
  # Instruct the AWS CDK to use `drop-in-replacement` instead of
2006
1964
  # `docker` when building / publishing docker images.
2007
1965
  # e.g., `drop-in-replacement build . -f path/to/Dockerfile`
2008
- "CDK_DOCKER": "drop-in-replacement"
1966
+ "CDK_DOCKER": codebuild.BuildEnvironmentVariable(value="drop-in-replacement")
2009
1967
  }
2010
1968
  )
2011
1969
  )
@@ -2354,6 +2312,7 @@ class CodePipelineActionFactoryResult:
2354
2312
  jsii_struct_bases=[],
2355
2313
  name_mapping={
2356
2314
  "synth": "synth",
2315
+ "artifact_bucket": "artifactBucket",
2357
2316
  "asset_publishing_code_build_defaults": "assetPublishingCodeBuildDefaults",
2358
2317
  "cli_version": "cliVersion",
2359
2318
  "code_build_defaults": "codeBuildDefaults",
@@ -2378,6 +2337,7 @@ class CodePipelineProps:
2378
2337
  self,
2379
2338
  *,
2380
2339
  synth: "IFileSetProducer",
2340
+ artifact_bucket: typing.Optional[_IBucket_42e086fd] = None,
2381
2341
  asset_publishing_code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2382
2342
  cli_version: typing.Optional[builtins.str] = None,
2383
2343
  code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -2399,6 +2359,7 @@ class CodePipelineProps:
2399
2359
  '''Properties for a ``CodePipeline``.
2400
2360
 
2401
2361
  :param synth: The build step that produces the CDK Cloud Assembly. The primary output of this step needs to be the ``cdk.out`` directory generated by the ``cdk synth`` command. If you use a ``ShellStep`` here and you don't configure an output directory, the output directory will automatically be assumed to be ``cdk.out``.
2362
+ :param artifact_bucket: An existing S3 Bucket to use for storing the pipeline's artifact. Default: - A new S3 bucket will be created.
2402
2363
  :param asset_publishing_code_build_defaults: Additional customizations to apply to the asset publishing CodeBuild projects. Default: - Only ``codeBuildDefaults`` are applied
2403
2364
  :param cli_version: CDK CLI version to use in self-mutation and asset publishing steps. If you want to lock the CDK CLI version used in the pipeline, by steps that are automatically generated for you, specify the version here. We recommend you do not specify this value, as not specifying it always uses the latest CLI version which is backwards compatible with old versions. If you do specify it, be aware that this version should always be equal to or higher than the version of the CDK framework used by the CDK app, when the CDK commands are run during your pipeline execution. When you change this version, the *next time* the ``SelfMutate`` step runs it will still be using the CLI of the the *previous* version that was in this property: it will only start using the new version after ``SelfMutate`` completes successfully. That means that if you want to update both framework and CLI version, you should update the CLI version first, commit, push and deploy, and only then update the framework version. Default: - Latest version
2404
2365
  :param code_build_defaults: Customize the CodeBuild projects created for this pipeline. Default: - All projects run non-privileged build, SMALL instance, LinuxBuildImage.STANDARD_6_0
@@ -2421,7 +2382,6 @@ class CodePipelineProps:
2421
2382
 
2422
2383
  Example::
2423
2384
 
2424
- # Example automatically generated from non-compiling source. May contain errors.
2425
2385
  # code_pipeline: codepipeline.Pipeline
2426
2386
 
2427
2387
 
@@ -2446,6 +2406,7 @@ class CodePipelineProps:
2446
2406
  if __debug__:
2447
2407
  type_hints = typing.get_type_hints(_typecheckingstub__c46bc21ca63efb27c935c31017ebbc8c85b3b93ae1798e54892dd3eae41d99aa)
2448
2408
  check_type(argname="argument synth", value=synth, expected_type=type_hints["synth"])
2409
+ check_type(argname="argument artifact_bucket", value=artifact_bucket, expected_type=type_hints["artifact_bucket"])
2449
2410
  check_type(argname="argument asset_publishing_code_build_defaults", value=asset_publishing_code_build_defaults, expected_type=type_hints["asset_publishing_code_build_defaults"])
2450
2411
  check_type(argname="argument cli_version", value=cli_version, expected_type=type_hints["cli_version"])
2451
2412
  check_type(argname="argument code_build_defaults", value=code_build_defaults, expected_type=type_hints["code_build_defaults"])
@@ -2466,6 +2427,8 @@ class CodePipelineProps:
2466
2427
  self._values: typing.Dict[builtins.str, typing.Any] = {
2467
2428
  "synth": synth,
2468
2429
  }
2430
+ if artifact_bucket is not None:
2431
+ self._values["artifact_bucket"] = artifact_bucket
2469
2432
  if asset_publishing_code_build_defaults is not None:
2470
2433
  self._values["asset_publishing_code_build_defaults"] = asset_publishing_code_build_defaults
2471
2434
  if cli_version is not None:
@@ -2515,6 +2478,15 @@ class CodePipelineProps:
2515
2478
  assert result is not None, "Required property 'synth' is missing"
2516
2479
  return typing.cast("IFileSetProducer", result)
2517
2480
 
2481
+ @builtins.property
2482
+ def artifact_bucket(self) -> typing.Optional[_IBucket_42e086fd]:
2483
+ '''An existing S3 Bucket to use for storing the pipeline's artifact.
2484
+
2485
+ :default: - A new S3 bucket will be created.
2486
+ '''
2487
+ result = self._values.get("artifact_bucket")
2488
+ return typing.cast(typing.Optional[_IBucket_42e086fd], result)
2489
+
2518
2490
  @builtins.property
2519
2491
  def asset_publishing_code_build_defaults(self) -> typing.Optional[CodeBuildOptions]:
2520
2492
  '''Additional customizations to apply to the asset publishing CodeBuild projects.
@@ -2785,7 +2757,6 @@ class ConnectionSourceOptions:
2785
2757
 
2786
2758
  Example::
2787
2759
 
2788
- # Example automatically generated from non-compiling source. May contain errors.
2789
2760
  pipeline = pipelines.CodePipeline(self, "Pipeline",
2790
2761
  synth=pipelines.ShellStep("Synth",
2791
2762
  input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
@@ -2837,7 +2808,6 @@ class ConnectionSourceOptions:
2837
2808
 
2838
2809
  Example::
2839
2810
 
2840
- # Example automatically generated from non-compiling source. May contain errors.
2841
2811
  "arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh"
2842
2812
  '''
2843
2813
  result = self._values.get("connection_arn")
@@ -2905,7 +2875,6 @@ class DockerCredential(
2905
2875
 
2906
2876
  Example::
2907
2877
 
2908
- # Example automatically generated from non-compiling source. May contain errors.
2909
2878
  docker_hub_secret = secretsmanager.Secret.from_secret_complete_arn(self, "DHSecret", "arn:aws:...")
2910
2879
  custom_reg_secret = secretsmanager.Secret.from_secret_complete_arn(self, "CRSecret", "arn:aws:...")
2911
2880
  repo1 = ecr.Repository.from_repository_arn(self, "Repo", "arn:aws:ecr:eu-west-1:0123456789012:repository/Repo1")
@@ -3087,7 +3056,6 @@ class DockerCredentialUsage(enum.Enum):
3087
3056
 
3088
3057
  Example::
3089
3058
 
3090
- # Example automatically generated from non-compiling source. May contain errors.
3091
3059
  docker_hub_secret = secretsmanager.Secret.from_secret_complete_arn(self, "DHSecret", "arn:aws:...")
3092
3060
  # Only the image asset publishing actions will be granted read access to the secret.
3093
3061
  creds = pipelines.DockerCredential.docker_hub(docker_hub_secret, usages=[pipelines.DockerCredentialUsage.ASSET_PUBLISHING])
@@ -3122,7 +3090,6 @@ class ECRSourceOptions:
3122
3090
 
3123
3091
  Example::
3124
3092
 
3125
- # Example automatically generated from non-compiling source. May contain errors.
3126
3093
  # repository: ecr.IRepository
3127
3094
 
3128
3095
  pipelines.CodePipelineSource.ecr(repository,
@@ -3272,7 +3239,6 @@ class ExternalDockerCredentialOptions:
3272
3239
 
3273
3240
  Example::
3274
3241
 
3275
- # Example automatically generated from non-compiling source. May contain errors.
3276
3242
  docker_hub_secret = secretsmanager.Secret.from_secret_complete_arn(self, "DHSecret", "arn:aws:...")
3277
3243
  # Only the image asset publishing actions will be granted read access to the secret.
3278
3244
  creds = pipelines.DockerCredential.docker_hub(docker_hub_secret, usages=[pipelines.DockerCredentialUsage.ASSET_PUBLISHING])
@@ -3430,7 +3396,6 @@ class GitHubSourceOptions:
3430
3396
 
3431
3397
  Example::
3432
3398
 
3433
- # Example automatically generated from non-compiling source. May contain errors.
3434
3399
  pipelines.CodePipelineSource.git_hub("org/repo", "branch",
3435
3400
  # This is optional
3436
3401
  authentication=cdk.SecretValue.secrets_manager("my-token")
@@ -3464,7 +3429,6 @@ class GitHubSourceOptions:
3464
3429
 
3465
3430
  It is recommended to use a Secrets Manager ``Secret`` to obtain the token::
3466
3431
 
3467
- # Example automatically generated from non-compiling source. May contain errors.
3468
3432
  oauth = cdk.SecretValue.secrets_manager("my-github-token")
3469
3433
 
3470
3434
  The GitHub Personal Access Token should have these scopes:
@@ -3729,7 +3693,6 @@ class PermissionsBroadeningCheckProps:
3729
3693
 
3730
3694
  Example::
3731
3695
 
3732
- # Example automatically generated from non-compiling source. May contain errors.
3733
3696
  # pipeline: pipelines.CodePipeline
3734
3697
 
3735
3698
  stage = MyApplicationStage(self, "MyApplication")
@@ -3873,7 +3836,6 @@ class PipelineBase(
3873
3836
 
3874
3837
  Example::
3875
3838
 
3876
- # Example automatically generated from non-compiling source. May contain errors.
3877
3839
  # pipeline: pipelines.CodePipeline
3878
3840
 
3879
3841
 
@@ -4391,7 +4353,6 @@ class ShellStepProps:
4391
4353
 
4392
4354
  Example::
4393
4355
 
4394
- # Example automatically generated from non-compiling source. May contain errors.
4395
4356
  # code_pipeline: codepipeline.Pipeline
4396
4357
 
4397
4358
 
@@ -4451,7 +4412,6 @@ class ShellStepProps:
4451
4412
  the main input and an additional input side-by-side with the
4452
4413
  following configuration::
4453
4414
 
4454
- # Example automatically generated from non-compiling source. May contain errors.
4455
4415
  script = pipelines.ShellStep("MainScript",
4456
4416
  commands=["npm ci", "npm run build", "npx cdk synth"],
4457
4417
  input=pipelines.CodePipelineSource.git_hub("org/source1", "main"),
@@ -5091,25 +5051,26 @@ class StackOutputReference(
5091
5051
 
5092
5052
  Example::
5093
5053
 
5094
- # Example automatically generated from non-compiling source. May contain errors.
5095
5054
  @jsii.implements(pipelines.ICodePipelineActionFactory)
5096
5055
  class MyLambdaStep(pipelines.Step):
5097
5056
 
5098
- def __init__(self):
5099
- pass
5100
- super().__init__("MyLambdaStep")
5101
- self.stack_output_reference = pipelines.StackOutputReference.from_cfn_output(stack_output)produce_action(stage, codepipeline.IStage, options, pipelines.ProduceActionOptions)pipelines.CodePipelineActionFactoryResult
5057
+ def __init__(self, fn, stack_output):
5058
+ super().__init__("MyLambdaStep")
5059
+ self.stack_output_reference = pipelines.StackOutputReference.from_cfn_output(stack_output)
5102
5060
 
5103
- stage.add_action(cpactions.LambdaInvokeAction(
5104
- action_name=options.action_name,
5105
- run_order=options.run_order,
5106
- # Map the reference to the variable name the CDK has generated for you.
5107
- user_parameters={"stack_output": options.stack_outputs_map.to_code_pipeline(self.stack_output_reference)},
5108
- lambda_=self.function
5109
- ))
5061
+ def produce_action(self, stage, *, scope, actionName, runOrder, variablesNamespace=None, artifacts, fallbackArtifact=None, pipeline, codeBuildDefaults=None, beforeSelfMutation=None, stackOutputsMap):
5110
5062
 
5111
- return {"run_orders_consumed": 1}getconsumed_stack_outputs()pipelines.StackOutputReference[]
5112
- return [self.stack_output_reference]
5063
+ stage.add_action(cpactions.LambdaInvokeAction(
5064
+ action_name=action_name,
5065
+ run_order=run_order,
5066
+ # Map the reference to the variable name the CDK has generated for you.
5067
+ user_parameters={"stack_output": stack_outputs_map.to_code_pipeline(self.stack_output_reference)},
5068
+ lambda_=self.fn
5069
+ ))
5070
+
5071
+ return pipelines.CodePipelineActionFactoryResult(run_orders_consumed=1)public get consumedStackOutputs(): pipelines.StackOutputReference[] {
5072
+ return [this.stackOutputReference];
5073
+ }
5113
5074
  '''
5114
5075
 
5115
5076
  @jsii.member(jsii_name="fromCfnOutput")
@@ -5554,13 +5515,37 @@ class Step(metaclass=jsii.JSIIAbstractClass, jsii_type="aws-cdk-lib.pipelines.St
5554
5515
 
5555
5516
  Example::
5556
5517
 
5557
- # Example automatically generated from non-compiling source. May contain errors.
5558
- # Step A will depend on step B and step B will depend on step C
5559
- ordered_steps = pipelines.Step.sequence([
5560
- pipelines.ManualApprovalStep("A"),
5561
- pipelines.ManualApprovalStep("B"),
5562
- pipelines.ManualApprovalStep("C")
5563
- ])
5518
+ @jsii.implements(pipelines.ICodePipelineActionFactory)
5519
+ class MyJenkinsStep(pipelines.Step):
5520
+ def __init__(self, provider, input):
5521
+ super().__init__("MyJenkinsStep")
5522
+
5523
+ # This is necessary if your step accepts parameters, like environment variables,
5524
+ # that may contain outputs from other steps. It doesn't matter what the
5525
+ # structure is, as long as it contains the values that may contain outputs.
5526
+ self.discover_referenced_outputs({
5527
+ "env": {}
5528
+ })
5529
+
5530
+ def produce_action(self, stage, *, scope, actionName, runOrder, variablesNamespace=None, artifacts, fallbackArtifact=None, pipeline, codeBuildDefaults=None, beforeSelfMutation=None, stackOutputsMap):
5531
+
5532
+ # This is where you control what type of Action gets added to the
5533
+ # CodePipeline
5534
+ stage.add_action(cpactions.JenkinsAction(
5535
+ # Copy 'actionName' and 'runOrder' from the options
5536
+ action_name=action_name,
5537
+ run_order=run_order,
5538
+
5539
+ # Jenkins-specific configuration
5540
+ type=cpactions.JenkinsActionType.TEST,
5541
+ jenkins_provider=self.provider,
5542
+ project_name="MyJenkinsProject",
5543
+
5544
+ # Translate the FileSet into a codepipeline.Artifact
5545
+ inputs=[artifacts.to_code_pipeline(self.input)]
5546
+ ))
5547
+
5548
+ return pipelines.CodePipelineActionFactoryResult(run_orders_consumed=1)
5564
5549
  '''
5565
5550
 
5566
5551
  def __init__(self, id: builtins.str) -> None:
@@ -5702,7 +5687,6 @@ class Wave(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.pipelines.Wave"):
5702
5687
 
5703
5688
  Example::
5704
5689
 
5705
- # Example automatically generated from non-compiling source. May contain errors.
5706
5690
  # pipeline: pipelines.CodePipeline
5707
5691
 
5708
5692
  europe_wave = pipeline.add_wave("Europe")
@@ -5827,7 +5811,6 @@ class WaveOptions:
5827
5811
 
5828
5812
  Example::
5829
5813
 
5830
- # Example automatically generated from non-compiling source. May contain errors.
5831
5814
  pipeline = pipelines.CodePipeline(self, "Pipeline",
5832
5815
  synth=pipelines.ShellStep("Synth",
5833
5816
  input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
@@ -6042,7 +6025,6 @@ class CodeBuildStepProps(ShellStepProps):
6042
6025
 
6043
6026
  Example::
6044
6027
 
6045
- # Example automatically generated from non-compiling source. May contain errors.
6046
6028
  pipeline = pipelines.CodePipeline(self, "Pipeline",
6047
6029
  synth=pipelines.ShellStep("Synth",
6048
6030
  input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
@@ -6156,7 +6138,6 @@ class CodeBuildStepProps(ShellStepProps):
6156
6138
  the main input and an additional input side-by-side with the
6157
6139
  following configuration::
6158
6140
 
6159
- # Example automatically generated from non-compiling source. May contain errors.
6160
6141
  script = pipelines.ShellStep("MainScript",
6161
6142
  commands=["npm ci", "npm run build", "npx cdk synth"],
6162
6143
  input=pipelines.CodePipelineSource.git_hub("org/source1", "main"),
@@ -6398,7 +6379,6 @@ class CodePipeline(
6398
6379
 
6399
6380
  Example::
6400
6381
 
6401
- # Example automatically generated from non-compiling source. May contain errors.
6402
6382
  # code_pipeline: codepipeline.Pipeline
6403
6383
 
6404
6384
 
@@ -6419,6 +6399,7 @@ class CodePipeline(
6419
6399
  id: builtins.str,
6420
6400
  *,
6421
6401
  synth: IFileSetProducer,
6402
+ artifact_bucket: typing.Optional[_IBucket_42e086fd] = None,
6422
6403
  asset_publishing_code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
6423
6404
  cli_version: typing.Optional[builtins.str] = None,
6424
6405
  code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -6441,6 +6422,7 @@ class CodePipeline(
6441
6422
  :param scope: -
6442
6423
  :param id: -
6443
6424
  :param synth: The build step that produces the CDK Cloud Assembly. The primary output of this step needs to be the ``cdk.out`` directory generated by the ``cdk synth`` command. If you use a ``ShellStep`` here and you don't configure an output directory, the output directory will automatically be assumed to be ``cdk.out``.
6425
+ :param artifact_bucket: An existing S3 Bucket to use for storing the pipeline's artifact. Default: - A new S3 bucket will be created.
6444
6426
  :param asset_publishing_code_build_defaults: Additional customizations to apply to the asset publishing CodeBuild projects. Default: - Only ``codeBuildDefaults`` are applied
6445
6427
  :param cli_version: CDK CLI version to use in self-mutation and asset publishing steps. If you want to lock the CDK CLI version used in the pipeline, by steps that are automatically generated for you, specify the version here. We recommend you do not specify this value, as not specifying it always uses the latest CLI version which is backwards compatible with old versions. If you do specify it, be aware that this version should always be equal to or higher than the version of the CDK framework used by the CDK app, when the CDK commands are run during your pipeline execution. When you change this version, the *next time* the ``SelfMutate`` step runs it will still be using the CLI of the the *previous* version that was in this property: it will only start using the new version after ``SelfMutate`` completes successfully. That means that if you want to update both framework and CLI version, you should update the CLI version first, commit, push and deploy, and only then update the framework version. Default: - Latest version
6446
6428
  :param code_build_defaults: Customize the CodeBuild projects created for this pipeline. Default: - All projects run non-privileged build, SMALL instance, LinuxBuildImage.STANDARD_6_0
@@ -6465,6 +6447,7 @@ class CodePipeline(
6465
6447
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
6466
6448
  props = CodePipelineProps(
6467
6449
  synth=synth,
6450
+ artifact_bucket=artifact_bucket,
6468
6451
  asset_publishing_code_build_defaults=asset_publishing_code_build_defaults,
6469
6452
  cli_version=cli_version,
6470
6453
  code_build_defaults=code_build_defaults,
@@ -6541,7 +6524,6 @@ class CodePipelineSource(
6541
6524
 
6542
6525
  Example::
6543
6526
 
6544
- # Example automatically generated from non-compiling source. May contain errors.
6545
6527
  # Access the CommitId of a GitHub source in the synth
6546
6528
  source = pipelines.CodePipelineSource.git_hub("owner/repo", "main")
6547
6529
 
@@ -6591,7 +6573,6 @@ class CodePipelineSource(
6591
6573
 
6592
6574
  Example::
6593
6575
 
6594
- # Example automatically generated from non-compiling source. May contain errors.
6595
6576
  # repository: codecommit.IRepository
6596
6577
 
6597
6578
  pipelines.CodePipelineSource.code_commit(repository, "main")
@@ -6634,7 +6615,6 @@ class CodePipelineSource(
6634
6615
 
6635
6616
  Example::
6636
6617
 
6637
- # Example automatically generated from non-compiling source. May contain errors.
6638
6618
  pipelines.CodePipelineSource.connection("owner/repo", "main",
6639
6619
  connection_arn="arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"
6640
6620
  )
@@ -6681,7 +6661,6 @@ class CodePipelineSource(
6681
6661
 
6682
6662
  Example::
6683
6663
 
6684
- # Example automatically generated from non-compiling source. May contain errors.
6685
6664
  # repository: ecr.IRepository
6686
6665
 
6687
6666
  pipelines.CodePipelineSource.ecr(repository,
@@ -6714,7 +6693,6 @@ class CodePipelineSource(
6714
6693
 
6715
6694
  Pass in the owner and repository in a single string, like this::
6716
6695
 
6717
- # Example automatically generated from non-compiling source. May contain errors.
6718
6696
  pipelines.CodePipelineSource.git_hub("owner/repo", "main")
6719
6697
 
6720
6698
  Authentication will be done by a secret called ``github-token`` in AWS
@@ -6768,7 +6746,6 @@ class CodePipelineSource(
6768
6746
 
6769
6747
  Example::
6770
6748
 
6771
- # Example automatically generated from non-compiling source. May contain errors.
6772
6749
  # bucket: s3.Bucket
6773
6750
 
6774
6751
  pipelines.CodePipelineSource.s3(bucket, "path/to/file.zip")
@@ -6862,7 +6839,6 @@ class CodePipelineSource(
6862
6839
 
6863
6840
  Example::
6864
6841
 
6865
- # Example automatically generated from non-compiling source. May contain errors.
6866
6842
  # Access the CommitId of a GitHub source in the synth
6867
6843
  source = pipelines.CodePipelineSource.git_hub("owner/repo", "main")
6868
6844
 
@@ -6935,7 +6911,6 @@ class ConfirmPermissionsBroadening(
6935
6911
 
6936
6912
  Example::
6937
6913
 
6938
- # Example automatically generated from non-compiling source. May contain errors.
6939
6914
  # pipeline: pipelines.CodePipeline
6940
6915
 
6941
6916
  stage = MyApplicationStage(self, "MyApplication")
@@ -7027,7 +7002,6 @@ class FileSet(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.pipelines.FileSet"
7027
7002
 
7028
7003
  Example::
7029
7004
 
7030
- # Example automatically generated from non-compiling source. May contain errors.
7031
7005
  @jsii.implements(pipelines.ICodePipelineActionFactory)
7032
7006
  class MyJenkinsStep(pipelines.Step):
7033
7007
  def __init__(self, provider, input):
@@ -7133,7 +7107,6 @@ class ManualApprovalStep(
7133
7107
 
7134
7108
  Example::
7135
7109
 
7136
- # Example automatically generated from non-compiling source. May contain errors.
7137
7110
  # pipeline: pipelines.CodePipeline
7138
7111
 
7139
7112
  preprod = MyApplicationStage(self, "PreProd")
@@ -7194,7 +7167,6 @@ class ShellStep(
7194
7167
 
7195
7168
  Example::
7196
7169
 
7197
- # Example automatically generated from non-compiling source. May contain errors.
7198
7170
  # code_pipeline: codepipeline.Pipeline
7199
7171
 
7200
7172
 
@@ -7357,7 +7329,6 @@ class CodeBuildStep(
7357
7329
  ``buildspec.yml`` in your repository, extract them to a script
7358
7330
  (say, ``build.sh``) and invoke that script as part of the build::
7359
7331
 
7360
- # Example automatically generated from non-compiling source. May contain errors.
7361
7332
  pipelines.CodeBuildStep("Synth",
7362
7333
  commands=["./build.sh"]
7363
7334
  )
@@ -7366,7 +7337,6 @@ class CodeBuildStep(
7366
7337
 
7367
7338
  Example::
7368
7339
 
7369
- # Example automatically generated from non-compiling source. May contain errors.
7370
7340
  pipeline = pipelines.CodePipeline(self, "Pipeline",
7371
7341
  synth=pipelines.ShellStep("Synth",
7372
7342
  input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
@@ -7479,7 +7449,6 @@ class CodeBuildStep(
7479
7449
 
7480
7450
  Example::
7481
7451
 
7482
- # Example automatically generated from non-compiling source. May contain errors.
7483
7452
  # Access the output of one CodeBuildStep in another CodeBuildStep
7484
7453
  # pipeline: pipelines.CodePipeline
7485
7454
 
@@ -7650,7 +7619,6 @@ class CodePipelineFileSet(
7650
7619
 
7651
7620
  Example::
7652
7621
 
7653
- # Example automatically generated from non-compiling source. May contain errors.
7654
7622
  # code_pipeline: codepipeline.Pipeline
7655
7623
 
7656
7624
 
@@ -7779,6 +7747,7 @@ def _typecheckingstub__9624d5022538eedc98a469f78de5916fac4ee13ff0d2f5f9a5e9d447c
7779
7747
  def _typecheckingstub__c46bc21ca63efb27c935c31017ebbc8c85b3b93ae1798e54892dd3eae41d99aa(
7780
7748
  *,
7781
7749
  synth: IFileSetProducer,
7750
+ artifact_bucket: typing.Optional[_IBucket_42e086fd] = None,
7782
7751
  asset_publishing_code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
7783
7752
  cli_version: typing.Optional[builtins.str] = None,
7784
7753
  code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -8238,6 +8207,7 @@ def _typecheckingstub__7b4b4a0bcbd5fab3e4b78aa07ff9504469ae96c16799604ca3345bcb9
8238
8207
  id: builtins.str,
8239
8208
  *,
8240
8209
  synth: IFileSetProducer,
8210
+ artifact_bucket: typing.Optional[_IBucket_42e086fd] = None,
8241
8211
  asset_publishing_code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
8242
8212
  cli_version: typing.Optional[builtins.str] = None,
8243
8213
  code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,