# DeploymentPreferenceProperty

- Source: Generated code
- Type last changed: v2.106.0 · 10 Nov 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sam as sam } from 'aws-cdk-lib';
const deploymentPreferenceProperty: sam.CfnFunction.DeploymentPreferenceProperty = {
  alarms: ['alarms'],
  enabled: false,
  hooks: {
    postTraffic: 'postTraffic',
    preTraffic: 'preTraffic',
  },
  role: 'role',
  type: 'type',
};
```

## Properties

- `alarms`: string[]

- `enabled`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `hooks`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.HooksProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.HooksProperty.html)

- `role`: string

- `type`: string
