aws-cdk-lib 2.141.0__py3-none-any.whl → 2.142.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/__init__.py +9 -1
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.141.0.jsii.tgz → aws-cdk-lib@2.142.0.jsii.tgz} +0 -0
- aws_cdk/aws_appsync/__init__.py +224 -94
- aws_cdk/aws_autoscaling/__init__.py +109 -25
- aws_cdk/aws_cloudfront/__init__.py +34 -78
- aws_cdk/aws_codepipeline/__init__.py +364 -27
- aws_cdk/aws_docdb/__init__.py +181 -4
- aws_cdk/aws_ec2/__init__.py +1 -2
- aws_cdk/aws_ecs/__init__.py +65 -18
- aws_cdk/aws_eks/__init__.py +36 -3
- aws_cdk/aws_events/__init__.py +46 -25
- aws_cdk/aws_events_targets/__init__.py +341 -0
- aws_cdk/aws_iam/__init__.py +13 -8
- aws_cdk/aws_lambda_nodejs/__init__.py +3 -0
- aws_cdk/aws_logs/__init__.py +6 -6
- aws_cdk/aws_rds/__init__.py +42 -8
- aws_cdk/aws_s3/__init__.py +9 -2
- aws_cdk/aws_servicecatalog/__init__.py +27 -4
- aws_cdk/aws_stepfunctions_tasks/__init__.py +7 -6
- {aws_cdk_lib-2.141.0.dist-info → aws_cdk_lib-2.142.0.dist-info}/METADATA +10 -2
- {aws_cdk_lib-2.141.0.dist-info → aws_cdk_lib-2.142.0.dist-info}/RECORD +26 -26
- {aws_cdk_lib-2.141.0.dist-info → aws_cdk_lib-2.142.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.141.0.dist-info → aws_cdk_lib-2.142.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.141.0.dist-info → aws_cdk_lib-2.142.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.141.0.dist-info → aws_cdk_lib-2.142.0.dist-info}/top_level.txt +0 -0
|
@@ -576,12 +576,17 @@ rule = pipeline.notify_on_execution_state_change("NotifyOnExecutionStateChange",
|
|
|
576
576
|
|
|
577
577
|
## Trigger
|
|
578
578
|
|
|
579
|
-
To trigger a pipeline with Git tags, specify the `triggers` property.
|
|
580
|
-
your pipeline starts. You can filter with glob patterns. The `tagsExcludes` takes priority over
|
|
581
|
-
the `tagsIncludes`.
|
|
582
|
-
|
|
579
|
+
To trigger a pipeline with Git tags or branches, specify the `triggers` property.
|
|
583
580
|
The triggers can only be used with pipeline type V2.
|
|
584
581
|
|
|
582
|
+
### Push filter
|
|
583
|
+
|
|
584
|
+
Pipelines can be started based on push events. You can specify the `pushFilter` property to
|
|
585
|
+
filter the push events. The `pushFilter` can specify Git tags.
|
|
586
|
+
|
|
587
|
+
In the case of Git tags, your pipeline starts when a Git tag is pushed.
|
|
588
|
+
You can filter with glob patterns. The `tagsExcludes` takes priority over the `tagsIncludes`.
|
|
589
|
+
|
|
585
590
|
```python
|
|
586
591
|
# source_action: codepipeline_actions.CodeStarConnectionsSourceAction
|
|
587
592
|
# build_action: codepipeline_actions.CodeBuildAction
|
|
@@ -610,7 +615,110 @@ codepipeline.Pipeline(self, "Pipeline",
|
|
|
610
615
|
)
|
|
611
616
|
```
|
|
612
617
|
|
|
613
|
-
|
|
618
|
+
### Pull request filter
|
|
619
|
+
|
|
620
|
+
Pipelines can be started based on pull request events. You can specify the `pullRequestFilter` property to
|
|
621
|
+
filter the pull request events. The `pullRequestFilter` can specify branches, file paths, and event types.
|
|
622
|
+
|
|
623
|
+
In the case of branches, your pipeline starts when a pull request event occurs on the specified branches.
|
|
624
|
+
You can filter with glob patterns. The `branchesExcludes` takes priority over the `branchesIncludes`.
|
|
625
|
+
|
|
626
|
+
```python
|
|
627
|
+
# source_action: codepipeline_actions.CodeStarConnectionsSourceAction
|
|
628
|
+
# build_action: codepipeline_actions.CodeBuildAction
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
codepipeline.Pipeline(self, "Pipeline",
|
|
632
|
+
pipeline_type=codepipeline.PipelineType.V2,
|
|
633
|
+
stages=[codepipeline.StageProps(
|
|
634
|
+
stage_name="Source",
|
|
635
|
+
actions=[source_action]
|
|
636
|
+
), codepipeline.StageProps(
|
|
637
|
+
stage_name="Build",
|
|
638
|
+
actions=[build_action]
|
|
639
|
+
)
|
|
640
|
+
],
|
|
641
|
+
triggers=[codepipeline.TriggerProps(
|
|
642
|
+
provider_type=codepipeline.ProviderType.CODE_STAR_SOURCE_CONNECTION,
|
|
643
|
+
git_configuration=codepipeline.GitConfiguration(
|
|
644
|
+
source_action=source_action,
|
|
645
|
+
pull_request_filter=[codepipeline.GitPullRequestFilter(
|
|
646
|
+
branches_excludes=["exclude1", "exclude2"],
|
|
647
|
+
branches_includes=["include*"]
|
|
648
|
+
)]
|
|
649
|
+
)
|
|
650
|
+
)]
|
|
651
|
+
)
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
File paths can also be specified along with the branches to start the pipeline.
|
|
655
|
+
You can filter with glob patterns. The `filePathsExcludes` takes priority over the `filePathsIncludes`.
|
|
656
|
+
|
|
657
|
+
```python
|
|
658
|
+
# source_action: codepipeline_actions.CodeStarConnectionsSourceAction
|
|
659
|
+
# build_action: codepipeline_actions.CodeBuildAction
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
codepipeline.Pipeline(self, "Pipeline",
|
|
663
|
+
pipeline_type=codepipeline.PipelineType.V2,
|
|
664
|
+
stages=[codepipeline.StageProps(
|
|
665
|
+
stage_name="Source",
|
|
666
|
+
actions=[source_action]
|
|
667
|
+
), codepipeline.StageProps(
|
|
668
|
+
stage_name="Build",
|
|
669
|
+
actions=[build_action]
|
|
670
|
+
)
|
|
671
|
+
],
|
|
672
|
+
triggers=[codepipeline.TriggerProps(
|
|
673
|
+
provider_type=codepipeline.ProviderType.CODE_STAR_SOURCE_CONNECTION,
|
|
674
|
+
git_configuration=codepipeline.GitConfiguration(
|
|
675
|
+
source_action=source_action,
|
|
676
|
+
pull_request_filter=[codepipeline.GitPullRequestFilter(
|
|
677
|
+
branches_excludes=["exclude1", "exclude2"],
|
|
678
|
+
branches_includes=["include1", "include2"],
|
|
679
|
+
file_paths_excludes=["/path/to/exclude1", "/path/to/exclude2"],
|
|
680
|
+
file_paths_includes=["/path/to/include1", "/path/to/include1"]
|
|
681
|
+
)]
|
|
682
|
+
)
|
|
683
|
+
)]
|
|
684
|
+
)
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
To filter types of pull request events for triggers, you can specify the `events` property.
|
|
688
|
+
|
|
689
|
+
```python
|
|
690
|
+
# source_action: codepipeline_actions.CodeStarConnectionsSourceAction
|
|
691
|
+
# build_action: codepipeline_actions.CodeBuildAction
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
codepipeline.Pipeline(self, "Pipeline",
|
|
695
|
+
pipeline_type=codepipeline.PipelineType.V2,
|
|
696
|
+
stages=[codepipeline.StageProps(
|
|
697
|
+
stage_name="Source",
|
|
698
|
+
actions=[source_action]
|
|
699
|
+
), codepipeline.StageProps(
|
|
700
|
+
stage_name="Build",
|
|
701
|
+
actions=[build_action]
|
|
702
|
+
)
|
|
703
|
+
],
|
|
704
|
+
triggers=[codepipeline.TriggerProps(
|
|
705
|
+
provider_type=codepipeline.ProviderType.CODE_STAR_SOURCE_CONNECTION,
|
|
706
|
+
git_configuration=codepipeline.GitConfiguration(
|
|
707
|
+
source_action=source_action,
|
|
708
|
+
pull_request_filter=[codepipeline.GitPullRequestFilter(
|
|
709
|
+
branches_excludes=["exclude1", "exclude2"],
|
|
710
|
+
branches_includes=["include1", "include2"],
|
|
711
|
+
events=[codepipeline.GitPullRequestEvent.OPEN, codepipeline.GitPullRequestEvent.CLOSED
|
|
712
|
+
]
|
|
713
|
+
)]
|
|
714
|
+
)
|
|
715
|
+
)]
|
|
716
|
+
)
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
### Append a trigger to an existing pipeline
|
|
720
|
+
|
|
721
|
+
You can append a trigger to an existing pipeline:
|
|
614
722
|
|
|
615
723
|
```python
|
|
616
724
|
# pipeline: codepipeline.Pipeline
|
|
@@ -6253,18 +6361,24 @@ class ExecutionMode(enum.Enum):
|
|
|
6253
6361
|
@jsii.data_type(
|
|
6254
6362
|
jsii_type="aws-cdk-lib.aws_codepipeline.GitConfiguration",
|
|
6255
6363
|
jsii_struct_bases=[],
|
|
6256
|
-
name_mapping={
|
|
6364
|
+
name_mapping={
|
|
6365
|
+
"source_action": "sourceAction",
|
|
6366
|
+
"pull_request_filter": "pullRequestFilter",
|
|
6367
|
+
"push_filter": "pushFilter",
|
|
6368
|
+
},
|
|
6257
6369
|
)
|
|
6258
6370
|
class GitConfiguration:
|
|
6259
6371
|
def __init__(
|
|
6260
6372
|
self,
|
|
6261
6373
|
*,
|
|
6262
6374
|
source_action: "IAction",
|
|
6375
|
+
pull_request_filter: typing.Optional[typing.Sequence[typing.Union["GitPullRequestFilter", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
6263
6376
|
push_filter: typing.Optional[typing.Sequence[typing.Union["GitPushFilter", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
6264
6377
|
) -> None:
|
|
6265
6378
|
'''Git configuration for trigger.
|
|
6266
6379
|
|
|
6267
6380
|
:param source_action: The pipeline source action where the trigger configuration, such as Git tags. The trigger configuration will start the pipeline upon the specified change only. You can only specify one trigger configuration per source action. Since the provider for ``sourceAction`` must be ``CodeStarSourceConnection``, you can use ``CodeStarConnectionsSourceAction`` construct in ``aws-codepipeline-actions`` module.
|
|
6381
|
+
:param pull_request_filter: The field where the repository event that will start the pipeline is specified as pull requests. The length must be less than or equal to 3. Default: - no filter.
|
|
6268
6382
|
:param push_filter: The field where the repository event that will start the pipeline, such as pushing Git tags, is specified with details. Git tags is the only supported event type. The length must be less than or equal to 3. Default: - no filter.
|
|
6269
6383
|
|
|
6270
6384
|
:exampleMetadata: infused
|
|
@@ -6300,10 +6414,13 @@ class GitConfiguration:
|
|
|
6300
6414
|
if __debug__:
|
|
6301
6415
|
type_hints = typing.get_type_hints(_typecheckingstub__9bf0379bb3fa72f7dc00a45de6a383d19d18294c73d73dabcbdb7240e76832bf)
|
|
6302
6416
|
check_type(argname="argument source_action", value=source_action, expected_type=type_hints["source_action"])
|
|
6417
|
+
check_type(argname="argument pull_request_filter", value=pull_request_filter, expected_type=type_hints["pull_request_filter"])
|
|
6303
6418
|
check_type(argname="argument push_filter", value=push_filter, expected_type=type_hints["push_filter"])
|
|
6304
6419
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
6305
6420
|
"source_action": source_action,
|
|
6306
6421
|
}
|
|
6422
|
+
if pull_request_filter is not None:
|
|
6423
|
+
self._values["pull_request_filter"] = pull_request_filter
|
|
6307
6424
|
if push_filter is not None:
|
|
6308
6425
|
self._values["push_filter"] = push_filter
|
|
6309
6426
|
|
|
@@ -6321,6 +6438,19 @@ class GitConfiguration:
|
|
|
6321
6438
|
assert result is not None, "Required property 'source_action' is missing"
|
|
6322
6439
|
return typing.cast("IAction", result)
|
|
6323
6440
|
|
|
6441
|
+
@builtins.property
|
|
6442
|
+
def pull_request_filter(
|
|
6443
|
+
self,
|
|
6444
|
+
) -> typing.Optional[typing.List["GitPullRequestFilter"]]:
|
|
6445
|
+
'''The field where the repository event that will start the pipeline is specified as pull requests.
|
|
6446
|
+
|
|
6447
|
+
The length must be less than or equal to 3.
|
|
6448
|
+
|
|
6449
|
+
:default: - no filter.
|
|
6450
|
+
'''
|
|
6451
|
+
result = self._values.get("pull_request_filter")
|
|
6452
|
+
return typing.cast(typing.Optional[typing.List["GitPullRequestFilter"]], result)
|
|
6453
|
+
|
|
6324
6454
|
@builtins.property
|
|
6325
6455
|
def push_filter(self) -> typing.Optional[typing.List["GitPushFilter"]]:
|
|
6326
6456
|
'''The field where the repository event that will start the pipeline, such as pushing Git tags, is specified with details.
|
|
@@ -6346,6 +6476,192 @@ class GitConfiguration:
|
|
|
6346
6476
|
)
|
|
6347
6477
|
|
|
6348
6478
|
|
|
6479
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_codepipeline.GitPullRequestEvent")
|
|
6480
|
+
class GitPullRequestEvent(enum.Enum):
|
|
6481
|
+
'''Event for trigger with pull request filter.
|
|
6482
|
+
|
|
6483
|
+
:exampleMetadata: infused
|
|
6484
|
+
|
|
6485
|
+
Example::
|
|
6486
|
+
|
|
6487
|
+
# source_action: codepipeline_actions.CodeStarConnectionsSourceAction
|
|
6488
|
+
# build_action: codepipeline_actions.CodeBuildAction
|
|
6489
|
+
|
|
6490
|
+
|
|
6491
|
+
codepipeline.Pipeline(self, "Pipeline",
|
|
6492
|
+
pipeline_type=codepipeline.PipelineType.V2,
|
|
6493
|
+
stages=[codepipeline.StageProps(
|
|
6494
|
+
stage_name="Source",
|
|
6495
|
+
actions=[source_action]
|
|
6496
|
+
), codepipeline.StageProps(
|
|
6497
|
+
stage_name="Build",
|
|
6498
|
+
actions=[build_action]
|
|
6499
|
+
)
|
|
6500
|
+
],
|
|
6501
|
+
triggers=[codepipeline.TriggerProps(
|
|
6502
|
+
provider_type=codepipeline.ProviderType.CODE_STAR_SOURCE_CONNECTION,
|
|
6503
|
+
git_configuration=codepipeline.GitConfiguration(
|
|
6504
|
+
source_action=source_action,
|
|
6505
|
+
pull_request_filter=[codepipeline.GitPullRequestFilter(
|
|
6506
|
+
branches_excludes=["exclude1", "exclude2"],
|
|
6507
|
+
branches_includes=["include1", "include2"],
|
|
6508
|
+
events=[codepipeline.GitPullRequestEvent.OPEN, codepipeline.GitPullRequestEvent.CLOSED
|
|
6509
|
+
]
|
|
6510
|
+
)]
|
|
6511
|
+
)
|
|
6512
|
+
)]
|
|
6513
|
+
)
|
|
6514
|
+
'''
|
|
6515
|
+
|
|
6516
|
+
OPEN = "OPEN"
|
|
6517
|
+
'''OPEN.'''
|
|
6518
|
+
UPDATED = "UPDATED"
|
|
6519
|
+
'''UPDATED.'''
|
|
6520
|
+
CLOSED = "CLOSED"
|
|
6521
|
+
'''CLOSED.'''
|
|
6522
|
+
|
|
6523
|
+
|
|
6524
|
+
@jsii.data_type(
|
|
6525
|
+
jsii_type="aws-cdk-lib.aws_codepipeline.GitPullRequestFilter",
|
|
6526
|
+
jsii_struct_bases=[],
|
|
6527
|
+
name_mapping={
|
|
6528
|
+
"branches_excludes": "branchesExcludes",
|
|
6529
|
+
"branches_includes": "branchesIncludes",
|
|
6530
|
+
"events": "events",
|
|
6531
|
+
"file_paths_excludes": "filePathsExcludes",
|
|
6532
|
+
"file_paths_includes": "filePathsIncludes",
|
|
6533
|
+
},
|
|
6534
|
+
)
|
|
6535
|
+
class GitPullRequestFilter:
|
|
6536
|
+
def __init__(
|
|
6537
|
+
self,
|
|
6538
|
+
*,
|
|
6539
|
+
branches_excludes: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
6540
|
+
branches_includes: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
6541
|
+
events: typing.Optional[typing.Sequence[GitPullRequestEvent]] = None,
|
|
6542
|
+
file_paths_excludes: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
6543
|
+
file_paths_includes: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
6544
|
+
) -> None:
|
|
6545
|
+
'''Git pull request filter for trigger.
|
|
6546
|
+
|
|
6547
|
+
:param branches_excludes: The list of patterns of Git branches that, when pull request events occurs, are to be excluded from starting the pipeline. You can filter with glob patterns. The ``branchesExcludes`` takes priority over the ``branchesIncludes``. Maximum length of this array is 8. Default: - no branches.
|
|
6548
|
+
:param branches_includes: The list of patterns of Git branches that, when pull request events occurs, are to be included as criteria that starts the pipeline. You can filter with glob patterns. The ``branchesExcludes`` takes priority over the ``branchesIncludes``. Maximum length of this array is 8. Default: - no branches.
|
|
6549
|
+
:param events: The field that specifies which pull request events to filter on (opened, updated, closed) for the trigger configuration. Default: - all events.
|
|
6550
|
+
:param file_paths_excludes: The list of patterns of Git repository file paths that, when pull request events occurs, are to be excluded from starting the pipeline. You can filter with glob patterns. The ``filePathsExcludes`` takes priority over the ``filePathsIncludes``. Maximum length of this array is 8. Default: - no filePaths.
|
|
6551
|
+
:param file_paths_includes: The list of patterns of Git repository file paths that, when pull request events occurs, are to be included as criteria that starts the pipeline. You can filter with glob patterns. The ``filePathsExcludes`` takes priority over the ``filePathsIncludes``. Maximum length of this array is 8. Default: - no filePaths.
|
|
6552
|
+
|
|
6553
|
+
:exampleMetadata: fixture=_generated
|
|
6554
|
+
|
|
6555
|
+
Example::
|
|
6556
|
+
|
|
6557
|
+
# The code below shows an example of how to instantiate this type.
|
|
6558
|
+
# The values are placeholders you should change.
|
|
6559
|
+
from aws_cdk import aws_codepipeline as codepipeline
|
|
6560
|
+
|
|
6561
|
+
git_pull_request_filter = codepipeline.GitPullRequestFilter(
|
|
6562
|
+
branches_excludes=["branchesExcludes"],
|
|
6563
|
+
branches_includes=["branchesIncludes"],
|
|
6564
|
+
events=[codepipeline.GitPullRequestEvent.OPEN],
|
|
6565
|
+
file_paths_excludes=["filePathsExcludes"],
|
|
6566
|
+
file_paths_includes=["filePathsIncludes"]
|
|
6567
|
+
)
|
|
6568
|
+
'''
|
|
6569
|
+
if __debug__:
|
|
6570
|
+
type_hints = typing.get_type_hints(_typecheckingstub__cd84a4c10c68eec597c7c17a163a758ee28d398b585c996c44eba7fd956ee279)
|
|
6571
|
+
check_type(argname="argument branches_excludes", value=branches_excludes, expected_type=type_hints["branches_excludes"])
|
|
6572
|
+
check_type(argname="argument branches_includes", value=branches_includes, expected_type=type_hints["branches_includes"])
|
|
6573
|
+
check_type(argname="argument events", value=events, expected_type=type_hints["events"])
|
|
6574
|
+
check_type(argname="argument file_paths_excludes", value=file_paths_excludes, expected_type=type_hints["file_paths_excludes"])
|
|
6575
|
+
check_type(argname="argument file_paths_includes", value=file_paths_includes, expected_type=type_hints["file_paths_includes"])
|
|
6576
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
6577
|
+
if branches_excludes is not None:
|
|
6578
|
+
self._values["branches_excludes"] = branches_excludes
|
|
6579
|
+
if branches_includes is not None:
|
|
6580
|
+
self._values["branches_includes"] = branches_includes
|
|
6581
|
+
if events is not None:
|
|
6582
|
+
self._values["events"] = events
|
|
6583
|
+
if file_paths_excludes is not None:
|
|
6584
|
+
self._values["file_paths_excludes"] = file_paths_excludes
|
|
6585
|
+
if file_paths_includes is not None:
|
|
6586
|
+
self._values["file_paths_includes"] = file_paths_includes
|
|
6587
|
+
|
|
6588
|
+
@builtins.property
|
|
6589
|
+
def branches_excludes(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
6590
|
+
'''The list of patterns of Git branches that, when pull request events occurs, are to be excluded from starting the pipeline.
|
|
6591
|
+
|
|
6592
|
+
You can filter with glob patterns. The ``branchesExcludes`` takes priority
|
|
6593
|
+
over the ``branchesIncludes``.
|
|
6594
|
+
|
|
6595
|
+
Maximum length of this array is 8.
|
|
6596
|
+
|
|
6597
|
+
:default: - no branches.
|
|
6598
|
+
'''
|
|
6599
|
+
result = self._values.get("branches_excludes")
|
|
6600
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
6601
|
+
|
|
6602
|
+
@builtins.property
|
|
6603
|
+
def branches_includes(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
6604
|
+
'''The list of patterns of Git branches that, when pull request events occurs, are to be included as criteria that starts the pipeline.
|
|
6605
|
+
|
|
6606
|
+
You can filter with glob patterns. The ``branchesExcludes`` takes priority
|
|
6607
|
+
over the ``branchesIncludes``.
|
|
6608
|
+
|
|
6609
|
+
Maximum length of this array is 8.
|
|
6610
|
+
|
|
6611
|
+
:default: - no branches.
|
|
6612
|
+
'''
|
|
6613
|
+
result = self._values.get("branches_includes")
|
|
6614
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
6615
|
+
|
|
6616
|
+
@builtins.property
|
|
6617
|
+
def events(self) -> typing.Optional[typing.List[GitPullRequestEvent]]:
|
|
6618
|
+
'''The field that specifies which pull request events to filter on (opened, updated, closed) for the trigger configuration.
|
|
6619
|
+
|
|
6620
|
+
:default: - all events.
|
|
6621
|
+
'''
|
|
6622
|
+
result = self._values.get("events")
|
|
6623
|
+
return typing.cast(typing.Optional[typing.List[GitPullRequestEvent]], result)
|
|
6624
|
+
|
|
6625
|
+
@builtins.property
|
|
6626
|
+
def file_paths_excludes(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
6627
|
+
'''The list of patterns of Git repository file paths that, when pull request events occurs, are to be excluded from starting the pipeline.
|
|
6628
|
+
|
|
6629
|
+
You can filter with glob patterns. The ``filePathsExcludes`` takes priority
|
|
6630
|
+
over the ``filePathsIncludes``.
|
|
6631
|
+
|
|
6632
|
+
Maximum length of this array is 8.
|
|
6633
|
+
|
|
6634
|
+
:default: - no filePaths.
|
|
6635
|
+
'''
|
|
6636
|
+
result = self._values.get("file_paths_excludes")
|
|
6637
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
6638
|
+
|
|
6639
|
+
@builtins.property
|
|
6640
|
+
def file_paths_includes(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
6641
|
+
'''The list of patterns of Git repository file paths that, when pull request events occurs, are to be included as criteria that starts the pipeline.
|
|
6642
|
+
|
|
6643
|
+
You can filter with glob patterns. The ``filePathsExcludes`` takes priority
|
|
6644
|
+
over the ``filePathsIncludes``.
|
|
6645
|
+
|
|
6646
|
+
Maximum length of this array is 8.
|
|
6647
|
+
|
|
6648
|
+
:default: - no filePaths.
|
|
6649
|
+
'''
|
|
6650
|
+
result = self._values.get("file_paths_includes")
|
|
6651
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
6652
|
+
|
|
6653
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
6654
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
6655
|
+
|
|
6656
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
6657
|
+
return not (rhs == self)
|
|
6658
|
+
|
|
6659
|
+
def __repr__(self) -> str:
|
|
6660
|
+
return "GitPullRequestFilter(%s)" % ", ".join(
|
|
6661
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
6662
|
+
)
|
|
6663
|
+
|
|
6664
|
+
|
|
6349
6665
|
@jsii.data_type(
|
|
6350
6666
|
jsii_type="aws-cdk-lib.aws_codepipeline.GitPushFilter",
|
|
6351
6667
|
jsii_struct_bases=[],
|
|
@@ -7919,35 +8235,35 @@ class PipelineProps:
|
|
|
7919
8235
|
|
|
7920
8236
|
Example::
|
|
7921
8237
|
|
|
7922
|
-
#
|
|
8238
|
+
# source_action: codepipeline_actions.S3SourceAction
|
|
8239
|
+
# source_output: codepipeline.Artifact
|
|
8240
|
+
# deploy_bucket: s3.Bucket
|
|
7923
8241
|
|
|
7924
|
-
repository = codecommit.Repository(self, "MyRepository",
|
|
7925
|
-
repository_name="MyRepository"
|
|
7926
|
-
)
|
|
7927
|
-
project = codebuild.PipelineProject(self, "MyProject")
|
|
7928
8242
|
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
)
|
|
7935
|
-
build_action = codepipeline_actions.CodeBuildAction(
|
|
7936
|
-
action_name="CodeBuild",
|
|
7937
|
-
project=project,
|
|
7938
|
-
input=source_output,
|
|
7939
|
-
outputs=[codepipeline.Artifact()], # optional
|
|
7940
|
-
execute_batch_build=True, # optional, defaults to false
|
|
7941
|
-
combine_batch_build_artifacts=True
|
|
8243
|
+
# Pipeline-level variable
|
|
8244
|
+
variable = codepipeline.Variable(
|
|
8245
|
+
variable_name="bucket-var",
|
|
8246
|
+
description="description",
|
|
8247
|
+
default_value="sample"
|
|
7942
8248
|
)
|
|
7943
8249
|
|
|
7944
|
-
codepipeline.Pipeline(self, "
|
|
8250
|
+
codepipeline.Pipeline(self, "Pipeline",
|
|
8251
|
+
pipeline_type=codepipeline.PipelineType.V2,
|
|
8252
|
+
variables=[variable],
|
|
7945
8253
|
stages=[codepipeline.StageProps(
|
|
7946
8254
|
stage_name="Source",
|
|
7947
8255
|
actions=[source_action]
|
|
7948
8256
|
), codepipeline.StageProps(
|
|
7949
|
-
stage_name="
|
|
7950
|
-
actions=[
|
|
8257
|
+
stage_name="Deploy",
|
|
8258
|
+
actions=[
|
|
8259
|
+
codepipeline_actions.S3DeployAction(
|
|
8260
|
+
action_name="DeployAction",
|
|
8261
|
+
# can reference the variables
|
|
8262
|
+
object_key=f"{variable.reference()}.txt",
|
|
8263
|
+
input=source_output,
|
|
8264
|
+
bucket=deploy_bucket
|
|
8265
|
+
)
|
|
8266
|
+
]
|
|
7951
8267
|
)
|
|
7952
8268
|
]
|
|
7953
8269
|
)
|
|
@@ -8450,6 +8766,13 @@ class Trigger(
|
|
|
8450
8766
|
source_action=action,
|
|
8451
8767
|
|
|
8452
8768
|
# the properties below are optional
|
|
8769
|
+
pull_request_filter=[codepipeline.GitPullRequestFilter(
|
|
8770
|
+
branches_excludes=["branchesExcludes"],
|
|
8771
|
+
branches_includes=["branchesIncludes"],
|
|
8772
|
+
events=[codepipeline.GitPullRequestEvent.OPEN],
|
|
8773
|
+
file_paths_excludes=["filePathsExcludes"],
|
|
8774
|
+
file_paths_includes=["filePathsIncludes"]
|
|
8775
|
+
)],
|
|
8453
8776
|
push_filter=[codepipeline.GitPushFilter(
|
|
8454
8777
|
tags_excludes=["tagsExcludes"],
|
|
8455
8778
|
tags_includes=["tagsIncludes"]
|
|
@@ -9064,6 +9387,8 @@ __all__ = [
|
|
|
9064
9387
|
"CustomActionRegistrationProps",
|
|
9065
9388
|
"ExecutionMode",
|
|
9066
9389
|
"GitConfiguration",
|
|
9390
|
+
"GitPullRequestEvent",
|
|
9391
|
+
"GitPullRequestFilter",
|
|
9067
9392
|
"GitPushFilter",
|
|
9068
9393
|
"GlobalVariables",
|
|
9069
9394
|
"IAction",
|
|
@@ -9761,11 +10086,23 @@ def _typecheckingstub__65e227e2024e22ec4a8340ba1d5e7057772fcde85f4031d00361f79aa
|
|
|
9761
10086
|
def _typecheckingstub__9bf0379bb3fa72f7dc00a45de6a383d19d18294c73d73dabcbdb7240e76832bf(
|
|
9762
10087
|
*,
|
|
9763
10088
|
source_action: IAction,
|
|
10089
|
+
pull_request_filter: typing.Optional[typing.Sequence[typing.Union[GitPullRequestFilter, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
9764
10090
|
push_filter: typing.Optional[typing.Sequence[typing.Union[GitPushFilter, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
9765
10091
|
) -> None:
|
|
9766
10092
|
"""Type checking stubs"""
|
|
9767
10093
|
pass
|
|
9768
10094
|
|
|
10095
|
+
def _typecheckingstub__cd84a4c10c68eec597c7c17a163a758ee28d398b585c996c44eba7fd956ee279(
|
|
10096
|
+
*,
|
|
10097
|
+
branches_excludes: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
10098
|
+
branches_includes: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
10099
|
+
events: typing.Optional[typing.Sequence[GitPullRequestEvent]] = None,
|
|
10100
|
+
file_paths_excludes: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
10101
|
+
file_paths_includes: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
10102
|
+
) -> None:
|
|
10103
|
+
"""Type checking stubs"""
|
|
10104
|
+
pass
|
|
10105
|
+
|
|
9769
10106
|
def _typecheckingstub__d2e5e6ae139c810aa752b8a8c7cd3040d883f9f3a67c8d3693f9ab842351804e(
|
|
9770
10107
|
*,
|
|
9771
10108
|
tags_excludes: typing.Optional[typing.Sequence[builtins.str]] = None,
|