aws-cdk-lib 2.178.1__py3-none-any.whl → 2.179.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 +69 -35
- aws_cdk/_jsii/__init__.py +1 -2
- aws_cdk/_jsii/{aws-cdk-lib@2.178.1.jsii.tgz → aws-cdk-lib@2.179.0.jsii.tgz} +0 -0
- aws_cdk/aws_apigateway/__init__.py +170 -29
- aws_cdk/aws_apigatewayv2/__init__.py +151 -32
- aws_cdk/aws_apigatewayv2_integrations/__init__.py +348 -0
- aws_cdk/aws_applicationautoscaling/__init__.py +8 -8
- aws_cdk/aws_appsync/__init__.py +6 -4
- aws_cdk/aws_cloudfront/__init__.py +5 -5
- aws_cdk/aws_codebuild/__init__.py +216 -0
- aws_cdk/aws_codepipeline/__init__.py +89 -28
- aws_cdk/aws_codepipeline_actions/__init__.py +526 -62
- aws_cdk/aws_cognito/__init__.py +676 -20
- aws_cdk/aws_ec2/__init__.py +25 -9
- aws_cdk/aws_ecs/__init__.py +8 -8
- aws_cdk/aws_eks/__init__.py +555 -179
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +99 -0
- aws_cdk/aws_events/__init__.py +9 -15
- aws_cdk/aws_events_targets/__init__.py +303 -16
- aws_cdk/aws_iam/__init__.py +3 -3
- aws_cdk/aws_ivs/__init__.py +241 -73
- aws_cdk/aws_logs/__init__.py +62 -13
- aws_cdk/aws_pinpoint/__init__.py +14 -9
- aws_cdk/aws_rds/__init__.py +168 -24
- aws_cdk/aws_s3/__init__.py +9 -9
- aws_cdk/aws_stepfunctions_tasks/__init__.py +127 -21
- aws_cdk/pipelines/__init__.py +2 -2
- {aws_cdk_lib-2.178.1.dist-info → aws_cdk_lib-2.179.0.dist-info}/METADATA +1 -2
- {aws_cdk_lib-2.178.1.dist-info → aws_cdk_lib-2.179.0.dist-info}/RECORD +33 -34
- aws_cdk/lambda_layer_kubectl/__init__.py +0 -107
- {aws_cdk_lib-2.178.1.dist-info → aws_cdk_lib-2.179.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.178.1.dist-info → aws_cdk_lib-2.179.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.178.1.dist-info → aws_cdk_lib-2.179.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.178.1.dist-info → aws_cdk_lib-2.179.0.dist-info}/top_level.txt +0 -0
|
@@ -1578,6 +1578,103 @@ pipeline.add_stage(
|
|
|
1578
1578
|
|
|
1579
1579
|
See [the AWS documentation](https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-StepFunctions.html)
|
|
1580
1580
|
for information on Action structure reference.
|
|
1581
|
+
|
|
1582
|
+
## Compute
|
|
1583
|
+
|
|
1584
|
+
### Commands
|
|
1585
|
+
|
|
1586
|
+
The Commands action allows you to run shell commands in a virtual compute instance. When you run the action, commands
|
|
1587
|
+
specified in the action configuration are run in a separate container. All artifacts that are specified as input
|
|
1588
|
+
artifacts to a CodeBuild action are available inside of the container running the commands. This action allows you
|
|
1589
|
+
to specify commands without first creating a CodeBuild project.
|
|
1590
|
+
|
|
1591
|
+
```python
|
|
1592
|
+
# Source action
|
|
1593
|
+
bucket = s3.Bucket(self, "SourceBucket",
|
|
1594
|
+
versioned=True
|
|
1595
|
+
)
|
|
1596
|
+
source_artifact = codepipeline.Artifact("SourceArtifact")
|
|
1597
|
+
source_action = codepipeline_actions.S3SourceAction(
|
|
1598
|
+
action_name="Source",
|
|
1599
|
+
output=source_artifact,
|
|
1600
|
+
bucket=bucket,
|
|
1601
|
+
bucket_key="my.zip"
|
|
1602
|
+
)
|
|
1603
|
+
|
|
1604
|
+
# Commands action
|
|
1605
|
+
output_artifact = codepipeline.Artifact("OutputArtifact")
|
|
1606
|
+
commands_action = codepipeline_actions.CommandsAction(
|
|
1607
|
+
action_name="Commands",
|
|
1608
|
+
commands=["echo \"some commands\""
|
|
1609
|
+
],
|
|
1610
|
+
input=source_artifact,
|
|
1611
|
+
output=output_artifact
|
|
1612
|
+
)
|
|
1613
|
+
|
|
1614
|
+
pipeline = codepipeline.Pipeline(self, "Pipeline",
|
|
1615
|
+
stages=[codepipeline.StageProps(
|
|
1616
|
+
stage_name="Source",
|
|
1617
|
+
actions=[source_action]
|
|
1618
|
+
), codepipeline.StageProps(
|
|
1619
|
+
stage_name="Commands",
|
|
1620
|
+
actions=[commands_action]
|
|
1621
|
+
)
|
|
1622
|
+
]
|
|
1623
|
+
)
|
|
1624
|
+
```
|
|
1625
|
+
|
|
1626
|
+
If you want to filter the files to be included in the output artifact, you can specify their paths as the second
|
|
1627
|
+
argument to `Artifact`.
|
|
1628
|
+
|
|
1629
|
+
```python
|
|
1630
|
+
# source_artifact: codepipeline.Artifact
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
# filter files to be included in the output artifact
|
|
1634
|
+
output_artifact = codepipeline.Artifact("OutputArtifact", ["my-dir/**/*"])
|
|
1635
|
+
commands_action = codepipeline_actions.CommandsAction(
|
|
1636
|
+
action_name="Commands",
|
|
1637
|
+
commands=["mkdir -p my-dir", "echo \"HelloWorld\" > my-dir/file.txt"
|
|
1638
|
+
],
|
|
1639
|
+
input=source_artifact,
|
|
1640
|
+
output=output_artifact
|
|
1641
|
+
)
|
|
1642
|
+
```
|
|
1643
|
+
|
|
1644
|
+
You can also specify the `outputVariables` property in the `CommandsAction` to emit environment variables that can be used
|
|
1645
|
+
in subsequent actions. The variables are those defined in your shell commands or exported as defaults by the CodeBuild service.
|
|
1646
|
+
For a reference of CodeBuild environment variables, see
|
|
1647
|
+
[Environment variables in build environments](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html)
|
|
1648
|
+
in the CodeBuild User Guide.
|
|
1649
|
+
|
|
1650
|
+
To use the output variables in a subsequent action, you can use the `variable` method on the action:
|
|
1651
|
+
|
|
1652
|
+
```python
|
|
1653
|
+
# source_artifact: codepipeline.Artifact
|
|
1654
|
+
# output_artifact: codepipeline.Artifact
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
commands_action = codepipeline_actions.CommandsAction(
|
|
1658
|
+
action_name="Commands",
|
|
1659
|
+
commands=["export MY_OUTPUT=my-key"
|
|
1660
|
+
],
|
|
1661
|
+
input=source_artifact,
|
|
1662
|
+
output=output_artifact,
|
|
1663
|
+
output_variables=["MY_OUTPUT", "CODEBUILD_BUILD_ID"]
|
|
1664
|
+
)
|
|
1665
|
+
|
|
1666
|
+
# Deploy action
|
|
1667
|
+
deploy_action = codepipeline_actions.S3DeployAction(
|
|
1668
|
+
action_name="DeployAction",
|
|
1669
|
+
extract=True,
|
|
1670
|
+
input=output_artifact,
|
|
1671
|
+
bucket=s3.Bucket(self, "DeployBucket"),
|
|
1672
|
+
object_key=commands_action.variable("MY_OUTPUT")
|
|
1673
|
+
)
|
|
1674
|
+
```
|
|
1675
|
+
|
|
1676
|
+
See [the AWS documentation](https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-Commands.html)
|
|
1677
|
+
for more details about using Commands action in CodePipeline.
|
|
1581
1678
|
'''
|
|
1582
1679
|
from pkgutil import extend_path
|
|
1583
1680
|
__path__ = extend_path(__path__, __name__)
|
|
@@ -1678,8 +1775,10 @@ class Action(
|
|
|
1678
1775
|
category: _ActionCategory_0e233e69,
|
|
1679
1776
|
provider: builtins.str,
|
|
1680
1777
|
account: typing.Optional[builtins.str] = None,
|
|
1778
|
+
commands: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
1681
1779
|
inputs: typing.Optional[typing.Sequence[_Artifact_0cb05964]] = None,
|
|
1682
1780
|
outputs: typing.Optional[typing.Sequence[_Artifact_0cb05964]] = None,
|
|
1781
|
+
output_variables: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
1683
1782
|
owner: typing.Optional[builtins.str] = None,
|
|
1684
1783
|
region: typing.Optional[builtins.str] = None,
|
|
1685
1784
|
resource: typing.Optional[_IResource_c80c4260] = None,
|
|
@@ -1694,8 +1793,10 @@ class Action(
|
|
|
1694
1793
|
:param category: The category of the action. The category defines which action type the owner (the entity that performs the action) performs.
|
|
1695
1794
|
:param provider: The service provider that the action calls.
|
|
1696
1795
|
:param account: The account the Action is supposed to live in. For Actions backed by resources, this is inferred from the Stack ``resource`` is part of. However, some Actions, like the CloudFormation ones, are not backed by any resource, and they still might want to be cross-account. In general, a concrete Action class should specify either ``resource``, or ``account`` - but not both.
|
|
1796
|
+
:param commands: Shell commands for the Commands action to run. Default: - no commands
|
|
1697
1797
|
:param inputs:
|
|
1698
1798
|
:param outputs:
|
|
1799
|
+
:param output_variables: The names of the variables in your environment that you want to export. Default: - no output variables
|
|
1699
1800
|
:param owner:
|
|
1700
1801
|
:param region: The AWS region the given Action resides in. Note that a cross-region Pipeline requires replication buckets to function correctly. You can provide their names with the ``PipelineProps#crossRegionReplicationBuckets`` property. If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need to ``cdk deploy`` before deploying the main, Pipeline-containing Stack. Default: the Action resides in the same region as the Pipeline
|
|
1701
1802
|
:param resource: The optional resource that is backing this Action. This is used for automatically handling Actions backed by resources from a different account and/or region.
|
|
@@ -1710,8 +1811,10 @@ class Action(
|
|
|
1710
1811
|
category=category,
|
|
1711
1812
|
provider=provider,
|
|
1712
1813
|
account=account,
|
|
1814
|
+
commands=commands,
|
|
1713
1815
|
inputs=inputs,
|
|
1714
1816
|
outputs=outputs,
|
|
1817
|
+
output_variables=output_variables,
|
|
1715
1818
|
owner=owner,
|
|
1716
1819
|
region=region,
|
|
1717
1820
|
resource=resource,
|
|
@@ -6720,6 +6823,332 @@ class CodeStarSourceVariables:
|
|
|
6720
6823
|
)
|
|
6721
6824
|
|
|
6722
6825
|
|
|
6826
|
+
class CommandsAction(
|
|
6827
|
+
Action,
|
|
6828
|
+
metaclass=jsii.JSIIMeta,
|
|
6829
|
+
jsii_type="aws-cdk-lib.aws_codepipeline_actions.CommandsAction",
|
|
6830
|
+
):
|
|
6831
|
+
'''CodePipeline compute action that uses AWS Commands.
|
|
6832
|
+
|
|
6833
|
+
:exampleMetadata: infused
|
|
6834
|
+
|
|
6835
|
+
Example::
|
|
6836
|
+
|
|
6837
|
+
# source_artifact: codepipeline.Artifact
|
|
6838
|
+
# output_artifact: codepipeline.Artifact
|
|
6839
|
+
|
|
6840
|
+
|
|
6841
|
+
commands_action = codepipeline_actions.CommandsAction(
|
|
6842
|
+
action_name="Commands",
|
|
6843
|
+
commands=["export MY_OUTPUT=my-key"
|
|
6844
|
+
],
|
|
6845
|
+
input=source_artifact,
|
|
6846
|
+
output=output_artifact,
|
|
6847
|
+
output_variables=["MY_OUTPUT", "CODEBUILD_BUILD_ID"]
|
|
6848
|
+
)
|
|
6849
|
+
|
|
6850
|
+
# Deploy action
|
|
6851
|
+
deploy_action = codepipeline_actions.S3DeployAction(
|
|
6852
|
+
action_name="DeployAction",
|
|
6853
|
+
extract=True,
|
|
6854
|
+
input=output_artifact,
|
|
6855
|
+
bucket=s3.Bucket(self, "DeployBucket"),
|
|
6856
|
+
object_key=commands_action.variable("MY_OUTPUT")
|
|
6857
|
+
)
|
|
6858
|
+
'''
|
|
6859
|
+
|
|
6860
|
+
def __init__(
|
|
6861
|
+
self,
|
|
6862
|
+
*,
|
|
6863
|
+
commands: typing.Sequence[builtins.str],
|
|
6864
|
+
input: _Artifact_0cb05964,
|
|
6865
|
+
extra_inputs: typing.Optional[typing.Sequence[_Artifact_0cb05964]] = None,
|
|
6866
|
+
output: typing.Optional[_Artifact_0cb05964] = None,
|
|
6867
|
+
output_variables: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
6868
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
6869
|
+
action_name: builtins.str,
|
|
6870
|
+
run_order: typing.Optional[jsii.Number] = None,
|
|
6871
|
+
variables_namespace: typing.Optional[builtins.str] = None,
|
|
6872
|
+
) -> None:
|
|
6873
|
+
'''
|
|
6874
|
+
:param commands: Shell commands for the Commands action to run. All formats are supported except multi-line formats. The length of the commands array must be between 1 and 50.
|
|
6875
|
+
:param input: The source to use as input for this action.
|
|
6876
|
+
:param extra_inputs: The list of additional input artifacts for this action. Default: - no extra inputs
|
|
6877
|
+
:param output: The output artifact for this action. You can filter files that you want to export as the output artifact for the action. Default: - no output artifact
|
|
6878
|
+
:param output_variables: The names of the variables in your environment that you want to export. These variables can be referenced in other actions by using the ``variable`` method of this class. Default: - No output variables are exported
|
|
6879
|
+
:param role: The Role in which context's this Action will be executing in. The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your ``IAction.bind`` method in the ``ActionBindOptions.role`` property. Default: a new Role will be generated
|
|
6880
|
+
:param action_name: The physical, human-readable name of the Action. Note that Action names must be unique within a single Stage.
|
|
6881
|
+
:param run_order: The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute. Default: 1
|
|
6882
|
+
:param variables_namespace: The name of the namespace to use for variables emitted by this action. Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set
|
|
6883
|
+
'''
|
|
6884
|
+
props = CommandsActionProps(
|
|
6885
|
+
commands=commands,
|
|
6886
|
+
input=input,
|
|
6887
|
+
extra_inputs=extra_inputs,
|
|
6888
|
+
output=output,
|
|
6889
|
+
output_variables=output_variables,
|
|
6890
|
+
role=role,
|
|
6891
|
+
action_name=action_name,
|
|
6892
|
+
run_order=run_order,
|
|
6893
|
+
variables_namespace=variables_namespace,
|
|
6894
|
+
)
|
|
6895
|
+
|
|
6896
|
+
jsii.create(self.__class__, self, [props])
|
|
6897
|
+
|
|
6898
|
+
@jsii.member(jsii_name="bound")
|
|
6899
|
+
def _bound(
|
|
6900
|
+
self,
|
|
6901
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
6902
|
+
stage: _IStage_415fc571,
|
|
6903
|
+
*,
|
|
6904
|
+
bucket: _IBucket_42e086fd,
|
|
6905
|
+
role: _IRole_235f5d8e,
|
|
6906
|
+
) -> _ActionConfig_846fc217:
|
|
6907
|
+
'''This is a renamed version of the ``IAction.bind`` method.
|
|
6908
|
+
|
|
6909
|
+
:param scope: -
|
|
6910
|
+
:param stage: -
|
|
6911
|
+
:param bucket:
|
|
6912
|
+
:param role:
|
|
6913
|
+
'''
|
|
6914
|
+
if __debug__:
|
|
6915
|
+
type_hints = typing.get_type_hints(_typecheckingstub__bbe79ee7c34315f68e6df88d72bfe72e659a27a9fec26929b6ecfa2c9489e62d)
|
|
6916
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
6917
|
+
check_type(argname="argument stage", value=stage, expected_type=type_hints["stage"])
|
|
6918
|
+
options = _ActionBindOptions_3a612254(bucket=bucket, role=role)
|
|
6919
|
+
|
|
6920
|
+
return typing.cast(_ActionConfig_846fc217, jsii.invoke(self, "bound", [scope, stage, options]))
|
|
6921
|
+
|
|
6922
|
+
@jsii.member(jsii_name="variable")
|
|
6923
|
+
def variable(self, variable_name: builtins.str) -> builtins.str:
|
|
6924
|
+
'''Reference a CodePipeline variable exported in the Commands action.
|
|
6925
|
+
|
|
6926
|
+
:param variable_name: the name of the variable exported by ``outputVariables``.
|
|
6927
|
+
|
|
6928
|
+
:see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html
|
|
6929
|
+
'''
|
|
6930
|
+
if __debug__:
|
|
6931
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f4edb851cf8ea72119d980b99b9e14e11af9c8f5ebca0f3de5a9d841fd93b27f)
|
|
6932
|
+
check_type(argname="argument variable_name", value=variable_name, expected_type=type_hints["variable_name"])
|
|
6933
|
+
return typing.cast(builtins.str, jsii.invoke(self, "variable", [variable_name]))
|
|
6934
|
+
|
|
6935
|
+
|
|
6936
|
+
@jsii.data_type(
|
|
6937
|
+
jsii_type="aws-cdk-lib.aws_codepipeline_actions.CommandsActionProps",
|
|
6938
|
+
jsii_struct_bases=[_CommonAwsActionProps_8b809bb6],
|
|
6939
|
+
name_mapping={
|
|
6940
|
+
"action_name": "actionName",
|
|
6941
|
+
"run_order": "runOrder",
|
|
6942
|
+
"variables_namespace": "variablesNamespace",
|
|
6943
|
+
"role": "role",
|
|
6944
|
+
"commands": "commands",
|
|
6945
|
+
"input": "input",
|
|
6946
|
+
"extra_inputs": "extraInputs",
|
|
6947
|
+
"output": "output",
|
|
6948
|
+
"output_variables": "outputVariables",
|
|
6949
|
+
},
|
|
6950
|
+
)
|
|
6951
|
+
class CommandsActionProps(_CommonAwsActionProps_8b809bb6):
|
|
6952
|
+
def __init__(
|
|
6953
|
+
self,
|
|
6954
|
+
*,
|
|
6955
|
+
action_name: builtins.str,
|
|
6956
|
+
run_order: typing.Optional[jsii.Number] = None,
|
|
6957
|
+
variables_namespace: typing.Optional[builtins.str] = None,
|
|
6958
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
6959
|
+
commands: typing.Sequence[builtins.str],
|
|
6960
|
+
input: _Artifact_0cb05964,
|
|
6961
|
+
extra_inputs: typing.Optional[typing.Sequence[_Artifact_0cb05964]] = None,
|
|
6962
|
+
output: typing.Optional[_Artifact_0cb05964] = None,
|
|
6963
|
+
output_variables: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
6964
|
+
) -> None:
|
|
6965
|
+
'''Construction properties of the ``CommandsAction``.
|
|
6966
|
+
|
|
6967
|
+
:param action_name: The physical, human-readable name of the Action. Note that Action names must be unique within a single Stage.
|
|
6968
|
+
:param run_order: The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute. Default: 1
|
|
6969
|
+
:param variables_namespace: The name of the namespace to use for variables emitted by this action. Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set
|
|
6970
|
+
:param role: The Role in which context's this Action will be executing in. The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your ``IAction.bind`` method in the ``ActionBindOptions.role`` property. Default: a new Role will be generated
|
|
6971
|
+
:param commands: Shell commands for the Commands action to run. All formats are supported except multi-line formats. The length of the commands array must be between 1 and 50.
|
|
6972
|
+
:param input: The source to use as input for this action.
|
|
6973
|
+
:param extra_inputs: The list of additional input artifacts for this action. Default: - no extra inputs
|
|
6974
|
+
:param output: The output artifact for this action. You can filter files that you want to export as the output artifact for the action. Default: - no output artifact
|
|
6975
|
+
:param output_variables: The names of the variables in your environment that you want to export. These variables can be referenced in other actions by using the ``variable`` method of this class. Default: - No output variables are exported
|
|
6976
|
+
|
|
6977
|
+
:exampleMetadata: infused
|
|
6978
|
+
|
|
6979
|
+
Example::
|
|
6980
|
+
|
|
6981
|
+
# source_artifact: codepipeline.Artifact
|
|
6982
|
+
# output_artifact: codepipeline.Artifact
|
|
6983
|
+
|
|
6984
|
+
|
|
6985
|
+
commands_action = codepipeline_actions.CommandsAction(
|
|
6986
|
+
action_name="Commands",
|
|
6987
|
+
commands=["export MY_OUTPUT=my-key"
|
|
6988
|
+
],
|
|
6989
|
+
input=source_artifact,
|
|
6990
|
+
output=output_artifact,
|
|
6991
|
+
output_variables=["MY_OUTPUT", "CODEBUILD_BUILD_ID"]
|
|
6992
|
+
)
|
|
6993
|
+
|
|
6994
|
+
# Deploy action
|
|
6995
|
+
deploy_action = codepipeline_actions.S3DeployAction(
|
|
6996
|
+
action_name="DeployAction",
|
|
6997
|
+
extract=True,
|
|
6998
|
+
input=output_artifact,
|
|
6999
|
+
bucket=s3.Bucket(self, "DeployBucket"),
|
|
7000
|
+
object_key=commands_action.variable("MY_OUTPUT")
|
|
7001
|
+
)
|
|
7002
|
+
'''
|
|
7003
|
+
if __debug__:
|
|
7004
|
+
type_hints = typing.get_type_hints(_typecheckingstub__21385ddbb3031b453940ecb11b8a645ed20dfca73333fe16ee187494d8459395)
|
|
7005
|
+
check_type(argname="argument action_name", value=action_name, expected_type=type_hints["action_name"])
|
|
7006
|
+
check_type(argname="argument run_order", value=run_order, expected_type=type_hints["run_order"])
|
|
7007
|
+
check_type(argname="argument variables_namespace", value=variables_namespace, expected_type=type_hints["variables_namespace"])
|
|
7008
|
+
check_type(argname="argument role", value=role, expected_type=type_hints["role"])
|
|
7009
|
+
check_type(argname="argument commands", value=commands, expected_type=type_hints["commands"])
|
|
7010
|
+
check_type(argname="argument input", value=input, expected_type=type_hints["input"])
|
|
7011
|
+
check_type(argname="argument extra_inputs", value=extra_inputs, expected_type=type_hints["extra_inputs"])
|
|
7012
|
+
check_type(argname="argument output", value=output, expected_type=type_hints["output"])
|
|
7013
|
+
check_type(argname="argument output_variables", value=output_variables, expected_type=type_hints["output_variables"])
|
|
7014
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
7015
|
+
"action_name": action_name,
|
|
7016
|
+
"commands": commands,
|
|
7017
|
+
"input": input,
|
|
7018
|
+
}
|
|
7019
|
+
if run_order is not None:
|
|
7020
|
+
self._values["run_order"] = run_order
|
|
7021
|
+
if variables_namespace is not None:
|
|
7022
|
+
self._values["variables_namespace"] = variables_namespace
|
|
7023
|
+
if role is not None:
|
|
7024
|
+
self._values["role"] = role
|
|
7025
|
+
if extra_inputs is not None:
|
|
7026
|
+
self._values["extra_inputs"] = extra_inputs
|
|
7027
|
+
if output is not None:
|
|
7028
|
+
self._values["output"] = output
|
|
7029
|
+
if output_variables is not None:
|
|
7030
|
+
self._values["output_variables"] = output_variables
|
|
7031
|
+
|
|
7032
|
+
@builtins.property
|
|
7033
|
+
def action_name(self) -> builtins.str:
|
|
7034
|
+
'''The physical, human-readable name of the Action.
|
|
7035
|
+
|
|
7036
|
+
Note that Action names must be unique within a single Stage.
|
|
7037
|
+
'''
|
|
7038
|
+
result = self._values.get("action_name")
|
|
7039
|
+
assert result is not None, "Required property 'action_name' is missing"
|
|
7040
|
+
return typing.cast(builtins.str, result)
|
|
7041
|
+
|
|
7042
|
+
@builtins.property
|
|
7043
|
+
def run_order(self) -> typing.Optional[jsii.Number]:
|
|
7044
|
+
'''The runOrder property for this Action.
|
|
7045
|
+
|
|
7046
|
+
RunOrder determines the relative order in which multiple Actions in the same Stage execute.
|
|
7047
|
+
|
|
7048
|
+
:default: 1
|
|
7049
|
+
|
|
7050
|
+
:see: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
|
|
7051
|
+
'''
|
|
7052
|
+
result = self._values.get("run_order")
|
|
7053
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
7054
|
+
|
|
7055
|
+
@builtins.property
|
|
7056
|
+
def variables_namespace(self) -> typing.Optional[builtins.str]:
|
|
7057
|
+
'''The name of the namespace to use for variables emitted by this action.
|
|
7058
|
+
|
|
7059
|
+
:default:
|
|
7060
|
+
|
|
7061
|
+
- a name will be generated, based on the stage and action names,
|
|
7062
|
+
if any of the action's variables were referenced - otherwise,
|
|
7063
|
+
no namespace will be set
|
|
7064
|
+
'''
|
|
7065
|
+
result = self._values.get("variables_namespace")
|
|
7066
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
7067
|
+
|
|
7068
|
+
@builtins.property
|
|
7069
|
+
def role(self) -> typing.Optional[_IRole_235f5d8e]:
|
|
7070
|
+
'''The Role in which context's this Action will be executing in.
|
|
7071
|
+
|
|
7072
|
+
The Pipeline's Role will assume this Role
|
|
7073
|
+
(the required permissions for that will be granted automatically)
|
|
7074
|
+
right before executing this Action.
|
|
7075
|
+
This Action will be passed into your ``IAction.bind``
|
|
7076
|
+
method in the ``ActionBindOptions.role`` property.
|
|
7077
|
+
|
|
7078
|
+
:default: a new Role will be generated
|
|
7079
|
+
'''
|
|
7080
|
+
result = self._values.get("role")
|
|
7081
|
+
return typing.cast(typing.Optional[_IRole_235f5d8e], result)
|
|
7082
|
+
|
|
7083
|
+
@builtins.property
|
|
7084
|
+
def commands(self) -> typing.List[builtins.str]:
|
|
7085
|
+
'''Shell commands for the Commands action to run.
|
|
7086
|
+
|
|
7087
|
+
All formats are supported except multi-line formats.
|
|
7088
|
+
|
|
7089
|
+
The length of the commands array must be between 1 and 50.
|
|
7090
|
+
'''
|
|
7091
|
+
result = self._values.get("commands")
|
|
7092
|
+
assert result is not None, "Required property 'commands' is missing"
|
|
7093
|
+
return typing.cast(typing.List[builtins.str], result)
|
|
7094
|
+
|
|
7095
|
+
@builtins.property
|
|
7096
|
+
def input(self) -> _Artifact_0cb05964:
|
|
7097
|
+
'''The source to use as input for this action.'''
|
|
7098
|
+
result = self._values.get("input")
|
|
7099
|
+
assert result is not None, "Required property 'input' is missing"
|
|
7100
|
+
return typing.cast(_Artifact_0cb05964, result)
|
|
7101
|
+
|
|
7102
|
+
@builtins.property
|
|
7103
|
+
def extra_inputs(self) -> typing.Optional[typing.List[_Artifact_0cb05964]]:
|
|
7104
|
+
'''The list of additional input artifacts for this action.
|
|
7105
|
+
|
|
7106
|
+
:default: - no extra inputs
|
|
7107
|
+
'''
|
|
7108
|
+
result = self._values.get("extra_inputs")
|
|
7109
|
+
return typing.cast(typing.Optional[typing.List[_Artifact_0cb05964]], result)
|
|
7110
|
+
|
|
7111
|
+
@builtins.property
|
|
7112
|
+
def output(self) -> typing.Optional[_Artifact_0cb05964]:
|
|
7113
|
+
'''The output artifact for this action.
|
|
7114
|
+
|
|
7115
|
+
You can filter files that you want to export as the output artifact for the action.
|
|
7116
|
+
|
|
7117
|
+
:default: - no output artifact
|
|
7118
|
+
|
|
7119
|
+
Example::
|
|
7120
|
+
|
|
7121
|
+
codepipeline.Artifact("CommandsArtifact", ["my-dir/**"])
|
|
7122
|
+
'''
|
|
7123
|
+
result = self._values.get("output")
|
|
7124
|
+
return typing.cast(typing.Optional[_Artifact_0cb05964], result)
|
|
7125
|
+
|
|
7126
|
+
@builtins.property
|
|
7127
|
+
def output_variables(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
7128
|
+
'''The names of the variables in your environment that you want to export.
|
|
7129
|
+
|
|
7130
|
+
These variables can be referenced in other actions by using the ``variable`` method
|
|
7131
|
+
of this class.
|
|
7132
|
+
|
|
7133
|
+
:default: - No output variables are exported
|
|
7134
|
+
|
|
7135
|
+
:see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html
|
|
7136
|
+
'''
|
|
7137
|
+
result = self._values.get("output_variables")
|
|
7138
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
7139
|
+
|
|
7140
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
7141
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
7142
|
+
|
|
7143
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
7144
|
+
return not (rhs == self)
|
|
7145
|
+
|
|
7146
|
+
def __repr__(self) -> str:
|
|
7147
|
+
return "CommandsActionProps(%s)" % ", ".join(
|
|
7148
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
7149
|
+
)
|
|
7150
|
+
|
|
7151
|
+
|
|
6723
7152
|
@jsii.data_type(
|
|
6724
7153
|
jsii_type="aws-cdk-lib.aws_codepipeline_actions.CommonCloudFormationStackSetOptions",
|
|
6725
7154
|
jsii_struct_bases=[],
|
|
@@ -9473,28 +9902,26 @@ class S3DeployAction(
|
|
|
9473
9902
|
|
|
9474
9903
|
Example::
|
|
9475
9904
|
|
|
9476
|
-
#
|
|
9477
|
-
#
|
|
9478
|
-
# deploy_bucket: s3.Bucket
|
|
9905
|
+
# source_artifact: codepipeline.Artifact
|
|
9906
|
+
# output_artifact: codepipeline.Artifact
|
|
9479
9907
|
|
|
9480
9908
|
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
|
|
9496
|
-
)
|
|
9497
|
-
]
|
|
9909
|
+
commands_action = codepipeline_actions.CommandsAction(
|
|
9910
|
+
action_name="Commands",
|
|
9911
|
+
commands=["export MY_OUTPUT=my-key"
|
|
9912
|
+
],
|
|
9913
|
+
input=source_artifact,
|
|
9914
|
+
output=output_artifact,
|
|
9915
|
+
output_variables=["MY_OUTPUT", "CODEBUILD_BUILD_ID"]
|
|
9916
|
+
)
|
|
9917
|
+
|
|
9918
|
+
# Deploy action
|
|
9919
|
+
deploy_action = codepipeline_actions.S3DeployAction(
|
|
9920
|
+
action_name="DeployAction",
|
|
9921
|
+
extract=True,
|
|
9922
|
+
input=output_artifact,
|
|
9923
|
+
bucket=s3.Bucket(self, "DeployBucket"),
|
|
9924
|
+
object_key=commands_action.variable("MY_OUTPUT")
|
|
9498
9925
|
)
|
|
9499
9926
|
'''
|
|
9500
9927
|
|
|
@@ -9618,28 +10045,26 @@ class S3DeployActionProps(_CommonAwsActionProps_8b809bb6):
|
|
|
9618
10045
|
|
|
9619
10046
|
Example::
|
|
9620
10047
|
|
|
9621
|
-
#
|
|
9622
|
-
#
|
|
9623
|
-
# deploy_bucket: s3.Bucket
|
|
10048
|
+
# source_artifact: codepipeline.Artifact
|
|
10049
|
+
# output_artifact: codepipeline.Artifact
|
|
9624
10050
|
|
|
9625
10051
|
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
)
|
|
9642
|
-
]
|
|
10052
|
+
commands_action = codepipeline_actions.CommandsAction(
|
|
10053
|
+
action_name="Commands",
|
|
10054
|
+
commands=["export MY_OUTPUT=my-key"
|
|
10055
|
+
],
|
|
10056
|
+
input=source_artifact,
|
|
10057
|
+
output=output_artifact,
|
|
10058
|
+
output_variables=["MY_OUTPUT", "CODEBUILD_BUILD_ID"]
|
|
10059
|
+
)
|
|
10060
|
+
|
|
10061
|
+
# Deploy action
|
|
10062
|
+
deploy_action = codepipeline_actions.S3DeployAction(
|
|
10063
|
+
action_name="DeployAction",
|
|
10064
|
+
extract=True,
|
|
10065
|
+
input=output_artifact,
|
|
10066
|
+
bucket=s3.Bucket(self, "DeployBucket"),
|
|
10067
|
+
object_key=commands_action.variable("MY_OUTPUT")
|
|
9643
10068
|
)
|
|
9644
10069
|
'''
|
|
9645
10070
|
if __debug__:
|
|
@@ -9820,25 +10245,28 @@ class S3SourceAction(
|
|
|
9820
10245
|
|
|
9821
10246
|
Example::
|
|
9822
10247
|
|
|
9823
|
-
import aws_cdk.aws_cloudtrail as cloudtrail
|
|
9824
|
-
|
|
9825
10248
|
# source_bucket: s3.Bucket
|
|
9826
10249
|
|
|
9827
|
-
|
|
10250
|
+
# later:
|
|
10251
|
+
# project: codebuild.PipelineProject
|
|
9828
10252
|
key = "some/key.zip"
|
|
9829
|
-
|
|
9830
|
-
trail.add_s3_event_selector([cloudtrail.S3EventSelector(
|
|
9831
|
-
bucket=source_bucket,
|
|
9832
|
-
object_prefix=key
|
|
9833
|
-
)],
|
|
9834
|
-
read_write_type=cloudtrail.ReadWriteType.WRITE_ONLY
|
|
9835
|
-
)
|
|
10253
|
+
source_output = codepipeline.Artifact()
|
|
9836
10254
|
source_action = codepipeline_actions.S3SourceAction(
|
|
9837
10255
|
action_name="S3Source",
|
|
9838
10256
|
bucket_key=key,
|
|
9839
10257
|
bucket=source_bucket,
|
|
9840
10258
|
output=source_output,
|
|
9841
|
-
|
|
10259
|
+
variables_namespace="MyNamespace"
|
|
10260
|
+
)
|
|
10261
|
+
codepipeline_actions.CodeBuildAction(
|
|
10262
|
+
action_name="CodeBuild",
|
|
10263
|
+
project=project,
|
|
10264
|
+
input=source_output,
|
|
10265
|
+
environment_variables={
|
|
10266
|
+
"VERSION_ID": codebuild.BuildEnvironmentVariable(
|
|
10267
|
+
value=source_action.variables.version_id
|
|
10268
|
+
)
|
|
10269
|
+
}
|
|
9842
10270
|
)
|
|
9843
10271
|
'''
|
|
9844
10272
|
|
|
@@ -9950,25 +10378,28 @@ class S3SourceActionProps(_CommonAwsActionProps_8b809bb6):
|
|
|
9950
10378
|
|
|
9951
10379
|
Example::
|
|
9952
10380
|
|
|
9953
|
-
import aws_cdk.aws_cloudtrail as cloudtrail
|
|
9954
|
-
|
|
9955
10381
|
# source_bucket: s3.Bucket
|
|
9956
10382
|
|
|
9957
|
-
|
|
10383
|
+
# later:
|
|
10384
|
+
# project: codebuild.PipelineProject
|
|
9958
10385
|
key = "some/key.zip"
|
|
9959
|
-
|
|
9960
|
-
trail.add_s3_event_selector([cloudtrail.S3EventSelector(
|
|
9961
|
-
bucket=source_bucket,
|
|
9962
|
-
object_prefix=key
|
|
9963
|
-
)],
|
|
9964
|
-
read_write_type=cloudtrail.ReadWriteType.WRITE_ONLY
|
|
9965
|
-
)
|
|
10386
|
+
source_output = codepipeline.Artifact()
|
|
9966
10387
|
source_action = codepipeline_actions.S3SourceAction(
|
|
9967
10388
|
action_name="S3Source",
|
|
9968
10389
|
bucket_key=key,
|
|
9969
10390
|
bucket=source_bucket,
|
|
9970
10391
|
output=source_output,
|
|
9971
|
-
|
|
10392
|
+
variables_namespace="MyNamespace"
|
|
10393
|
+
)
|
|
10394
|
+
codepipeline_actions.CodeBuildAction(
|
|
10395
|
+
action_name="CodeBuild",
|
|
10396
|
+
project=project,
|
|
10397
|
+
input=source_output,
|
|
10398
|
+
environment_variables={
|
|
10399
|
+
"VERSION_ID": codebuild.BuildEnvironmentVariable(
|
|
10400
|
+
value=source_action.variables.version_id
|
|
10401
|
+
)
|
|
10402
|
+
}
|
|
9972
10403
|
)
|
|
9973
10404
|
'''
|
|
9974
10405
|
if __debug__:
|
|
@@ -12145,6 +12576,8 @@ __all__ = [
|
|
|
12145
12576
|
"CodeStarConnectionsSourceAction",
|
|
12146
12577
|
"CodeStarConnectionsSourceActionProps",
|
|
12147
12578
|
"CodeStarSourceVariables",
|
|
12579
|
+
"CommandsAction",
|
|
12580
|
+
"CommandsActionProps",
|
|
12148
12581
|
"CommonCloudFormationStackSetOptions",
|
|
12149
12582
|
"EcrSourceAction",
|
|
12150
12583
|
"EcrSourceActionProps",
|
|
@@ -12582,6 +13015,37 @@ def _typecheckingstub__cafaad91c3e2208fbf7ad428836c6a672d42b11ef090e05536df65ea9
|
|
|
12582
13015
|
"""Type checking stubs"""
|
|
12583
13016
|
pass
|
|
12584
13017
|
|
|
13018
|
+
def _typecheckingstub__bbe79ee7c34315f68e6df88d72bfe72e659a27a9fec26929b6ecfa2c9489e62d(
|
|
13019
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
13020
|
+
stage: _IStage_415fc571,
|
|
13021
|
+
*,
|
|
13022
|
+
bucket: _IBucket_42e086fd,
|
|
13023
|
+
role: _IRole_235f5d8e,
|
|
13024
|
+
) -> None:
|
|
13025
|
+
"""Type checking stubs"""
|
|
13026
|
+
pass
|
|
13027
|
+
|
|
13028
|
+
def _typecheckingstub__f4edb851cf8ea72119d980b99b9e14e11af9c8f5ebca0f3de5a9d841fd93b27f(
|
|
13029
|
+
variable_name: builtins.str,
|
|
13030
|
+
) -> None:
|
|
13031
|
+
"""Type checking stubs"""
|
|
13032
|
+
pass
|
|
13033
|
+
|
|
13034
|
+
def _typecheckingstub__21385ddbb3031b453940ecb11b8a645ed20dfca73333fe16ee187494d8459395(
|
|
13035
|
+
*,
|
|
13036
|
+
action_name: builtins.str,
|
|
13037
|
+
run_order: typing.Optional[jsii.Number] = None,
|
|
13038
|
+
variables_namespace: typing.Optional[builtins.str] = None,
|
|
13039
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
13040
|
+
commands: typing.Sequence[builtins.str],
|
|
13041
|
+
input: _Artifact_0cb05964,
|
|
13042
|
+
extra_inputs: typing.Optional[typing.Sequence[_Artifact_0cb05964]] = None,
|
|
13043
|
+
output: typing.Optional[_Artifact_0cb05964] = None,
|
|
13044
|
+
output_variables: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
13045
|
+
) -> None:
|
|
13046
|
+
"""Type checking stubs"""
|
|
13047
|
+
pass
|
|
13048
|
+
|
|
12585
13049
|
def _typecheckingstub__2410584584bdbc5570942e28fb48b74fa12d17853f6fde7bdcddfd923102e537(
|
|
12586
13050
|
*,
|
|
12587
13051
|
failure_tolerance_percentage: typing.Optional[jsii.Number] = None,
|