# NamedPackageOptions

Options for InitPackage.yum/apt/rubyGem/python.

- Source: [`aws-ec2/lib/cfn-init-elements.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ec2/lib/cfn-init-elements.ts#L637)

## Example

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

declare const initServiceRestartHandle: ec2.InitServiceRestartHandle;
const namedPackageOptions: ec2.NamedPackageOptions = {
  serviceRestartHandles: [initServiceRestartHandle],
  version: ['version'],
};
```

## Properties

- `serviceRestartHandles`: [InitServiceRestartHandle](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.InitServiceRestartHandle.html)[] — Restart the given services after this command has run.

  **Default:** Do not restart any service

- `version`: string[] — Specify the versions to install.

  **Default:** Install the latest version
