PublishAssetsAction

class aws_cdk.pipelines.PublishAssetsAction(scope, id, *, action_name, asset_type, cloud_assembly_input, cdk_cli_version=None, project_name=None, role=None, subnet_selection=None, vpc=None)

Bases: aws_cdk.core.Construct

(experimental) Action to publish an asset in the pipeline.

Creates a CodeBuild project which will use the CDK CLI to prepare and publish the asset.

You do not need to instantiate this action – it will automatically be added by the pipeline when you add stacks that use assets.

Stability

experimental

Parameters
  • scope (Construct) –

  • id (str) –

  • action_name (str) – (experimental) Name of publishing action.

  • asset_type (AssetType) – (experimental) AssetType we’re publishing.

  • cloud_assembly_input (Artifact) – (experimental) The CodePipeline artifact that holds the Cloud Assembly.

  • cdk_cli_version (Optional[str]) – (experimental) Version of CDK CLI to ‘npm install’. Default: - Latest version

  • project_name (Optional[str]) – (experimental) Name of the CodeBuild project. Default: - Automatically generated

  • role (Optional[IRole]) – (experimental) Role to use for CodePipeline and CodeBuild to build and publish the assets. Default: - Automatically generated

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

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

Stability

experimental

Methods

add_publish_command(relative_manifest_path, asset_selector)

(experimental) Add a single publishing command.

Manifest path should be relative to the root Cloud Assembly.

Parameters
  • relative_manifest_path (str) –

  • asset_selector (str) –

Stability

experimental

Return type

None

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

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

action_properties

(experimental) Exists to implement IAction.

Stability

experimental

Return type

ActionProperties

node

The construct tree node associated with this construct.

Return type

ConstructNode

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool