# ActionProperties

Used as props by: [Action](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline_actions.Action.html)

- Source: [`aws-codepipeline/lib/action.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-codepipeline/lib/action.ts#L49)
- Type last changed: v2.180.0 · 21 Feb 2025

## Example

TypeScript:

```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',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_codepipeline as codepipeline
from aws_cdk import aws_iam as iam

# artifact: codepipeline.Artifact
# resource: cdk.Resource
# role: iam.Role

action_properties = codepipeline.ActionProperties(
    action_name="actionName",
    artifact_bounds=codepipeline.ActionArtifactBounds(
        max_inputs=123,
        max_outputs=123,
        min_inputs=123,
        min_outputs=123
    ),
    category=codepipeline.ActionCategory.SOURCE,
    provider="provider",

    # the properties below are optional
    account="account",
    commands=["commands"],
    inputs=[artifact],
    outputs=[artifact],
    output_variables=["outputVariables"],
    owner="owner",
    region="region",
    resource=resource,
    role=role,
    run_order=123,
    timeout=cdk.Duration.minutes(30),
    variables_namespace="variablesNamespace",
    version="version"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.codepipeline.*;
import software.amazon.awscdk.services.iam.*;

Artifact artifact;
Resource resource;
Role role;

ActionProperties actionProperties = ActionProperties.builder()
        .actionName("actionName")
        .artifactBounds(ActionArtifactBounds.builder()
                .maxInputs(123)
                .maxOutputs(123)
                .minInputs(123)
                .minOutputs(123)
                .build())
        .category(ActionCategory.SOURCE)
        .provider("provider")

        // the properties below are optional
        .account("account")
        .commands(List.of("commands"))
        .inputs(List.of(artifact))
        .outputs(List.of(artifact))
        .outputVariables(List.of("outputVariables"))
        .owner("owner")
        .region("region")
        .resource(resource)
        .role(role)
        .runOrder(123)
        .timeout(Duration.minutes(30))
        .variablesNamespace("variablesNamespace")
        .version("version")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.CodePipeline;
using Amazon.CDK.AWS.IAM;

Artifact artifact;
Resource resource;
Role role;

var actionProperties = new ActionProperties {
    ActionName = "actionName",
    ArtifactBounds = new ActionArtifactBounds {
        MaxInputs = 123,
        MaxOutputs = 123,
        MinInputs = 123,
        MinOutputs = 123
    },
    Category = ActionCategory.SOURCE,
    Provider = "provider",

    // the properties below are optional
    Account = "account",
    Commands = new [] { "commands" },
    Inputs = new [] { artifact },
    Outputs = new [] { artifact },
    OutputVariables = new [] { "outputVariables" },
    Owner = "owner",
    Region = "region",
    Resource = resource,
    Role = role,
    RunOrder = 123,
    Timeout = Duration.Minutes(30),
    VariablesNamespace = "variablesNamespace",
    Version = "version"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var artifact Artifact
var resource Resource
var role Role

actionProperties := &ActionProperties{
	ActionName: jsii.String("actionName"),
	ArtifactBounds: &ActionArtifactBounds{
		MaxInputs: jsii.Number(123),
		MaxOutputs: jsii.Number(123),
		MinInputs: jsii.Number(123),
		MinOutputs: jsii.Number(123),
	},
	Category: awscdk.Aws_codepipeline.ActionCategory_SOURCE,
	Provider: jsii.String("provider"),

	// the properties below are optional
	Account: jsii.String("account"),
	Commands: []*string{
		jsii.String("commands"),
	},
	Inputs: []Artifact{
		artifact,
	},
	Outputs: []Artifact{
		artifact,
	},
	OutputVariables: []*string{
		jsii.String("outputVariables"),
	},
	Owner: jsii.String("owner"),
	Region: jsii.String("region"),
	Resource: resource,
	Role: role,
	RunOrder: jsii.Number(123),
	Timeout: cdk.Duration_Minutes(jsii.Number(30)),
	VariablesNamespace: jsii.String("variablesNamespace"),
	Version: jsii.String("version"),
}
```

## Properties

- `account`: string — 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.

- `actionName`: string (required)

- `artifactBounds`: [ActionArtifactBounds](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.ActionArtifactBounds.html) (required)

- `category`: [ActionCategory](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.ActionCategory.html) (required) — The category of the action.

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

- `commands`: string[] — Shell commands for the Commands action to run.

  **Default:** no commands

- `inputs`: [Artifact](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.Artifact.html)[]

- `outputs`: [Artifact](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.Artifact.html)[]

- `outputVariables`: string[] — The names of the variables in your environment that you want to export.

  **Default:** no output variables

- `owner`: string

- `provider`: string (required) — The service provider that the action calls.

- `region`: string — The AWS region the given Action resides in.

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

  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.

- `resource`: [IResource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResource.html) — 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.

- `role`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html)

- `runOrder`: number — The order in which AWS CodePipeline runs this action. For more information, see the AWS CodePipeline User Guide.

  https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements

- `timeout`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — 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.

- `variablesNamespace`: 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

- `version`: string
