ShellScriptAction

class aws_cdk.pipelines.ShellScriptAction(*, action_name, commands, additional_artifacts=None, bash_options=None, environment=None, environment_variables=None, role_policy_statements=None, run_order=None, security_groups=None, subnet_selection=None, use_outputs=None, vpc=None)

Bases: object

(experimental) Validate a revision using shell commands.

Stability

experimental

Parameters
  • action_name (str) – (experimental) Name of the validation action in the pipeline.

  • commands (Sequence[str]) – (experimental) Commands to run.

  • additional_artifacts (Optional[Sequence[Artifact]]) – (experimental) Additional artifacts to use as input for the CodeBuild project. You can use these files to load more complex test sets into the shellscript build environment. The files artifact given here will be unpacked into the current working directory, the other ones will be unpacked into directories which are available through the environment variables $CODEBUILD_SRC_DIR_. The CodeBuild job must have at least one input artifact, so you must provide either at least one additional artifact here or one stack output using useOutput. Default: - No additional artifacts

  • bash_options (Optional[str]) – (experimental) Bash options to set at the start of the script. Default: ‘-eu’ (errexit and nounset)

  • environment (Optional[BuildEnvironment]) – (experimental) The CodeBuild environment where scripts are executed. Default: LinuxBuildImage.STANDARD_4_0

  • environment_variables (Optional[Mapping[str, BuildEnvironmentVariable]]) – (experimental) Environment variables to send into build. Default: - No additional environment variables

  • role_policy_statements (Optional[Sequence[PolicyStatement]]) – (experimental) Additional policy statements to add to the execution role. Default: - No policy statements

  • run_order (Union[int, float, None]) – (experimental) RunOrder for this action. Use this to sequence the shell script after the deployments. The default value is 100 so you don’t have to supply the value if you just want to run this after the application stacks have been deployed, and you don’t have more than 100 stacks. Default: 100

  • security_groups (Optional[Sequence[ISecurityGroup]]) – (experimental) Which security group to associate with the script’s project network interfaces. If no security group is identified, one will be created automatically. Only used if ‘vpc’ is supplied. Default: - Security group will be automatically created.

  • subnet_selection (Optional[SubnetSelection]) – (experimental) Which subnets to use. Only used if ‘vpc’ is supplied. Default: - All private subnets.

  • use_outputs (Optional[Mapping[str, StackOutput]]) – (experimental) Stack outputs to make available as environment variables. Default: - No outputs used

  • vpc (Optional[IVpc]) – (experimental) The VPC where to execute the specified script. Default: - No VPC

Stability

experimental

Methods

bind(scope, stage, *, bucket, role)

(experimental) Exists to implement IAction.

Parameters
Stability

experimental

Return type

ActionConfig

on_state_change(name, target=None, *, description=None, enabled=None, event_bus=None, event_pattern=None, rule_name=None, schedule=None, targets=None)

(experimental) Exists to implement IAction.

Parameters
  • name (str) –

  • target (Optional[IRuleTarget]) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description.

  • enabled (Optional[bool]) – Indicates whether the rule is enabled. Default: true

  • event_bus (Optional[IEventBus]) – The event bus to associate with this rule. Default: - The default event bus.

  • event_pattern (Optional[EventPattern]) – Describes which events EventBridge routes to the specified target. These routed events are matched events. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide. Default: - None.

  • rule_name (Optional[str]) – A name for the rule. Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the rule name. For more information, see Name Type.

  • schedule (Optional[Schedule]) – The schedule or rate (frequency) that determines when EventBridge runs the rule. For more information, see Schedule Expression Syntax for Rules in the Amazon EventBridge User Guide. Default: - None.

  • targets (Optional[Sequence[IRuleTarget]]) – Targets to invoke when this rule matches an event. Input will be the full matched event. If you wish to specify custom target input, use addTarget(target[, inputOptions]). Default: - No targets.

Stability

experimental

Return type

Rule

Attributes

action_properties

(experimental) Exists to implement IAction.

Stability

experimental

Return type

ActionProperties

grant_principal

(experimental) The CodeBuild Project’s principal.

Stability

experimental

Return type

IPrincipal

project

(experimental) Project generated to run the shell script in.

Stability

experimental

Return type

IProject