> **Experimental**
>
> `@aws-cdk/aws-imagebuilder-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# LifecyclePolicyAction

The action to perform in the lifecycle policy rule.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/lifecycle-policy.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-imagebuilder-alpha/lib/lifecycle-policy.ts#L97)

## Example

```ts
const disabledPolicy = new imagebuilder.LifecyclePolicy(this, 'DisabledPolicy', {
  lifecyclePolicyName: 'my-disabled-policy',
  description: 'A lifecycle policy that is temporarily disabled',
  status: imagebuilder.LifecyclePolicyStatus.DISABLED,
  resourceType: imagebuilder.LifecyclePolicyResourceType.AMI_IMAGE,
  details: [
    {
      action: { type: imagebuilder.LifecyclePolicyActionType.DELETE },
      filter: { ageFilter: { age: Duration.days(30) } }
    }
  ],
  resourceSelection: {
    tags: { Environment: 'testing' }
  },
  tags: {
    Owner: 'DevOps',
    CostCenter: 'Engineering'
  }
});
```

## Properties

- `includeAmis`: boolean — Whether to include AMIs in the scope of the lifecycle rule.

  **Default:** true for AMI-based policies, false otherwise

- `includeContainers`: boolean — Whether to include containers in the scope of the lifecycle rule.

  **Default:** true for container-based policies, false otherwise

- `includeSnapshots`: boolean — Whether to include snapshots in the scope of the lifecycle rule.

  **Default:** true for AMI-based policies, false otherwise

- `type`: [LifecyclePolicyActionType](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.LifecyclePolicyActionType.html) (required) — The action to perform on the resources selected in the lifecycle policy rule.
