# ActionProps

Properties for the Action construct.

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

- Source: [`aws-appconfig/lib/extension.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-appconfig/lib/extension.ts#L154)
- Type last changed: v2.130.0 · 23 Feb 2024

## Example

TypeScript:

```ts
declare const fn: lambda.Function;

new appconfig.Extension(this, 'MyExtension', {
  actions: [
    new appconfig.Action({
      actionPoints: [appconfig.ActionPoint.ON_DEPLOYMENT_START],
      eventDestination: new appconfig.LambdaDestination(fn),
    }),
  ],
});
```

Python:

```python
# fn: lambda.Function

appconfig.Extension(self, "MyExtension",
    actions=[
        appconfig.Action(
            action_points=[appconfig.ActionPoint.ON_DEPLOYMENT_START],
            event_destination=appconfig.LambdaDestination(fn)
        )
    ]
)
```

Java:

```java
Function fn;

Extension.Builder.create(this, "MyExtension")
        .actions(List.of(
            Action.Builder.create()
                    .actionPoints(List.of(ActionPoint.ON_DEPLOYMENT_START))
                    .eventDestination(new LambdaDestination(fn))
                    .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
Function fn;

new Extension(this, "MyExtension", new ExtensionProps {
    Actions = new [] {
        new Action(new ActionProps {
            ActionPoints = new [] { ActionPoint.ON_DEPLOYMENT_START },
            EventDestination = new LambdaDestination(fn)
        }) }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var fn Function

appconfig.NewExtension(this, jsii.String("MyExtension"), &ExtensionProps{
	Actions: []Action{
		appconfig.NewAction(&ActionProps{
			ActionPoints: []ActionPoint{
				appconfig.ActionPoint_ON_DEPLOYMENT_START,
			},
			EventDestination: appconfig.NewLambdaDestination(fn),
		}),
	},
})
```

## Properties

- `actionPoints`: [ActionPoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.ActionPoint.html)[] (required) — The action points that will trigger the extension action.

- `description`: string — The description for the action.

  **Default:** No description.

- `eventDestination`: [IEventDestination](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.IEventDestination.html) (required) — The event destination for the action.

- `executionRole`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The execution role for the action.

  **Default:** A role is generated.

- `invokeWithoutExecutionRole`: boolean = false — The flag that specifies whether or not to create the execution role.

  If set to true, then the role will not be auto-generated under the assumption
  there is already the corresponding resource-based policy attached to the event
  destination. If false, the execution role will be generated if not provided.

- `name`: string — The name for the action.

  **Default:** A name is generated.
