# ActionDeclarationProperty

Represents information about an action declaration.

- Source: Generated code
- Type last changed: v2.195.0 · 7 May 2025

## Example

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

declare const configuration: any;
const actionDeclarationProperty: codepipeline.CfnPipeline.ActionDeclarationProperty = {
  actionTypeId: {
    category: 'category',
    owner: 'owner',
    provider: 'provider',
    version: 'version',
  },
  name: 'name',

  // the properties below are optional
  commands: ['commands'],
  configuration: configuration,
  environmentVariables: [{
    name: 'name',
    value: 'value',

    // the properties below are optional
    type: 'type',
  }],
  inputArtifacts: [{
    name: 'name',
  }],
  namespace: 'namespace',
  outputArtifacts: [{
    name: 'name',

    // the properties below are optional
    files: ['files'],
  }],
  outputVariables: ['outputVariables'],
  region: 'region',
  roleArn: 'roleArn',
  runOrder: 123,
  timeoutInMinutes: 123,
};
```

## Properties

- `actionTypeId`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPipeline.ActionTypeIdProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.CfnPipeline.ActionTypeIdProperty.html) (required) — Specifies the action type and the provider of the action.

- `commands`: string[] — The shell commands to run with your compute action in CodePipeline.

  All commands are supported except multi-line formats. While CodeBuild logs and permissions are used, you do not need to create any resources in CodeBuild.

  > Using compute time for this action will incur separate charges in AWS CodeBuild .

- `configuration`: any — The action's configuration.

  These are key-value pairs that specify input values for an action. For more information, see [Action Structure Requirements in CodePipeline](https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements) . For the list of configuration properties for the AWS CloudFormation action type in CodePipeline, see [Configuration Properties Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-action-reference.html) in the *AWS CloudFormation User Guide* . For template snippets with examples, see [Using Parameter Override Functions with CodePipeline Pipelines](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-parameter-override-functions.html) in the *AWS CloudFormation User Guide* .

  The values can be represented in either JSON or YAML format. For example, the JSON configuration item format is as follows:

  *JSON:*

  `"Configuration" : { Key : Value },`

- `environmentVariables`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPipeline.EnvironmentVariableProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.CfnPipeline.EnvironmentVariableProperty.html)[] — The environment variables for the action.

- `inputArtifacts`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPipeline.InputArtifactProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.CfnPipeline.InputArtifactProperty.html)[] — The name or ID of the artifact consumed by the action, such as a test or build artifact.

  While the field is not a required parameter, most actions have an action configuration that requires a specified quantity of input artifacts. To refer to the action configuration specification by action provider, see the [Action structure reference](https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference.html) in the *AWS CodePipeline User Guide* .

  > For a CodeBuild action with multiple input artifacts, one of your input sources must be designated the PrimarySource. For more information, see the [CodeBuild action reference page](https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-CodeBuild.html) in the *AWS CodePipeline User Guide* .

- `name`: string (required) — The action declaration's name.

- `namespace`: string — The variable namespace associated with the action.

  All variables produced as output by this action fall under this namespace.

- `outputArtifacts`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPipeline.OutputArtifactProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.CfnPipeline.OutputArtifactProperty.html)[] — The name or ID of the result of the action declaration, such as a test or build artifact.

  While the field is not a required parameter, most actions have an action configuration that requires a specified quantity of output artifacts. To refer to the action configuration specification by action provider, see the [Action structure reference](https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference.html) in the *AWS CodePipeline User Guide* .

- `outputVariables`: string[] — The list of variables that are to be exported from the compute action.

  This is specifically CodeBuild environment variables as used for that action.

- `region`: string — The action declaration's AWS Region, such as us-east-1.

- `roleArn`: string — The ARN of the IAM service role that performs the declared action.

  This is assumed through the roleArn for the pipeline.

- `runOrder`: number — The order in which actions are run.

- `timeoutInMinutes`: number — A timeout duration in minutes that can be applied against the ActionType’s default timeout value specified in [Quotas for AWS CodePipeline](https://docs.aws.amazon.com/codepipeline/latest/userguide/limits.html) . This attribute is available only to the manual approval ActionType.
