NamedPackageOptions

class aws_cdk.aws_ec2.NamedPackageOptions(*, service_restart_handles=None, version=None)

Bases: object

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

Parameters
  • service_restart_handles (Optional[Sequence[InitServiceRestartHandle]]) – Restart the given services after this command has run. Default: - Do not restart any service

  • version (Optional[Sequence[str]]) – Specify the versions to install. Default: - Install the latest version

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2 as ec2

# init_service_restart_handle is of type InitServiceRestartHandle

named_package_options = ec2.NamedPackageOptions(
    service_restart_handles=[init_service_restart_handle],
    version=["version"]
)

Attributes

service_restart_handles

Restart the given services after this command has run.

Default
  • Do not restart any service

Return type

Optional[List[InitServiceRestartHandle]]

version

Specify the versions to install.

Default
  • Install the latest version

Return type

Optional[List[str]]