Skip to content
v2.275.0

ActionProperties Struct ​

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_codepipeline as codepipeline } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const artifact: codepipeline.Artifact;
declare const resource: cdk.Resource;
declare const role: iam.Role;
const actionProperties: codepipeline.ActionProperties = {
  actionName: 'actionName',
  artifactBounds: {
    maxInputs: 123,
    maxOutputs: 123,
    minInputs: 123,
    minOutputs: 123,
  },
  category: codepipeline.ActionCategory.SOURCE,
  provider: 'provider',

  // the properties below are optional
  account: 'account',
  commands: ['commands'],
  inputs: [artifact],
  outputs: [artifact],
  outputVariables: ['outputVariables'],
  owner: 'owner',
  region: 'region',
  resource: resource,
  role: role,
  runOrder: 123,
  timeout: cdk.Duration.minutes(30),
  variablesNamespace: 'variablesNamespace',
  version: 'version',
};

Properties ​

accountoptionalstringaccountoptionalstraccountoptionalStringAccountoptionalstringAccountoptional*string#
The account the Action is supposed to live in.
notes

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.

actionNamestringaction_namestractionNameStringActionNamestringActionName*stringrequired#
artifactBoundsActionArtifactBoundsartifact_boundsActionArtifactBoundsartifactBoundsActionArtifactBoundsArtifactBoundsActionArtifactBoundsArtifactBoundsActionArtifactBoundsrequired#
categoryActionCategorycategoryActionCategorycategoryActionCategoryCategoryActionCategoryCategoryActionCategoryrequired#
The category of the action.

The category defines which action type the owner (the entity that performs the action) performs.

commandsoptionalstring[]commandsoptionaltyping.List[str]commandsoptionalList<String>Commandsoptionalstring[]Commandsoptional*[]*string#
Shell commands for the Commands action to run.

Default: no commands

inputsoptionalArtifact[]inputsoptionaltyping.List[Artifact]inputsoptionalList<Artifact>InputsoptionalArtifact[]Inputsoptional*[]Artifact#
outputsoptionalArtifact[]outputsoptionaltyping.List[Artifact]outputsoptionalList<Artifact>OutputsoptionalArtifact[]Outputsoptional*[]Artifact#
outputVariablesoptionalstring[]output_variablesoptionaltyping.List[str]outputVariablesoptionalList<String>OutputVariablesoptionalstring[]OutputVariablesoptional*[]*string#
The names of the variables in your environment that you want to export.

Default: no output variables

owneroptionalstringowneroptionalstrowneroptionalStringOwneroptionalstringOwneroptional*string#
providerstringproviderstrproviderStringProviderstringProvider*stringrequired#
The service provider that the action calls.
regionoptionalstringregionoptionalstrregionoptionalStringRegionoptionalstringRegionoptional*string#
The AWS region the given Action resides in.

Default: the Action resides in the same region as the Pipeline

notes

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.

resourceoptionalIResourceresourceoptionalIResourceresourceoptionalIResourceResourceoptionalIResourceResourceoptionalIResource#
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.

roleoptionalIRoleroleoptionalIRoleroleoptionalIRoleRoleoptionalIRoleRoleoptionalIRole#
runOrderoptionalnumberrun_orderoptionalint | floatrunOrderoptionalNumberRunOrderoptionaldoubleRunOrderoptional*float64#
The order in which AWS CodePipeline runs this action. For more information, see the AWS CodePipeline User Guide.
timeoutoptionalDurationtimeoutoptionalDurationtimeoutoptionalDurationTimeoutoptionalDurationTimeoutoptionalDuration#
A timeout duration that can be applied against the ActionType’s default timeout value specified in Quotas for AWS CodePipeline.

Default: default timeout value defined by each ActionType

This attribute is available only to the ManualApprovalAction.

It is configurable up to 86400 minutes (60 days) with a minimum value of 5 minutes.

variablesNamespaceoptionalstringvariables_namespaceoptionalstrvariablesNamespaceoptionalStringVariablesNamespaceoptionalstringVariablesNamespaceoptional*string#
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

versionoptionalstringversionoptionalstrversionoptionalStringVersionoptionalstringVersionoptional*string#