CustomActionRegistration

class aws_cdk.aws_codepipeline.CustomActionRegistration(scope, id, *, artifact_bounds, category, provider, action_properties=None, entity_url=None, execution_url=None, version=None)

Bases: Construct

The resource representing registering a custom Action with CodePipeline.

For the Action to be usable, it has to be registered for every region and every account it’s used in. In addition to this class, you should most likely also provide your clients a class representing your custom Action, extending the Action class, and taking the actionProperties as properly typed, construction properties.

ExampleMetadata:

infused

Example:

# Make a custom CodePipeline Action
codepipeline.CustomActionRegistration(self, "GenericGitSourceProviderResource",
    category=codepipeline.ActionCategory.SOURCE,
    artifact_bounds=codepipeline.ActionArtifactBounds(min_inputs=0, max_inputs=0, min_outputs=1, max_outputs=1),
    provider="GenericGitSource",
    version="1",
    entity_url="https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-create-custom-action.html",
    execution_url="https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-create-custom-action.html",
    action_properties=[codepipeline.CustomActionProperty(
        name="Branch",
        required=True,
        key=False,
        secret=False,
        queryable=False,
        description="Git branch to pull",
        type="String"
    ), codepipeline.CustomActionProperty(
        name="GitUrl",
        required=True,
        key=False,
        secret=False,
        queryable=False,
        description="SSH git clone URL",
        type="String"
    )
    ]
)
Parameters:
  • scope (Construct) –

  • id (str) –

  • artifact_bounds (Union[ActionArtifactBounds, Dict[str, Any]]) – The artifact bounds of the Action.

  • category (ActionCategory) – The category of the Action.

  • provider (str) – The provider of the Action. For example, 'MyCustomActionProvider'

  • action_properties (Optional[Sequence[Union[CustomActionProperty, Dict[str, Any]]]]) – The properties used for customizing the instance of your Action. Default: []

  • entity_url (Optional[str]) – The URL shown for the entire Action in the Pipeline UI. Default: none

  • execution_url (Optional[str]) – The URL shown for a particular execution of an Action in the Pipeline UI. Default: none

  • version (Optional[str]) – The version of your Action. Default: ‘1’

Methods

to_string()

Returns a string representation of this construct.

Return type:

str

Attributes

node

The tree node.

Static Methods

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.