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

Properties for creating a Lifecycle Policy resource.

Extends: LifecyclePolicyProps
Used as props by: LifecyclePolicy

- 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#L286)

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

- `description`: string = None — The description of the lifecycle policy.

- `details`: [LifecyclePolicyDetail](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.LifecyclePolicyDetail.html)[] (required) — Configuration details for the lifecycle policy rules.

- `executionRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The execution role that grants Image Builder access to run lifecycle actions.

  **Default:** an execution role will be generated

  By default, an execution role will be created with the minimal permissions needed to execute the lifecycle policy
  actions.

- `lifecyclePolicyName`: string — The name of the lifecycle policy.

  **Default:** a name is generated

- `resourceSelection`: [LifecyclePolicyResourceSelection](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.LifecyclePolicyResourceSelection.html) (required) — Selection criteria for the resources that the lifecycle policy applies to.

- `resourceType`: [LifecyclePolicyResourceType](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.LifecyclePolicyResourceType.html) (required) — The type of Image Builder resource that the lifecycle policy applies to.

- `status`: [LifecyclePolicyStatus](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.LifecyclePolicyStatus.html) = LifecyclePolicyStatus.ENABLED — The status of the lifecycle policy.

- `tags`: { [key: string]: string } = none — The tags to apply to the lifecycle policy.
