InitPackage¶
-
class
aws_cdk.aws_ec2.
InitPackage
(type, versions, package_name=None, service_handles=None)¶ Bases:
aws_cdk.aws_ec2.InitElement
A package to be installed during cfn-init time.
- Parameters
type (
str
) –versions (
Sequence
[str
]) –package_name (
Optional
[str
]) –service_handles (
Optional
[Sequence
[InitServiceRestartHandle
]]) –
Attributes
-
element_type
¶ Returns the init element type for this element.
- Return type
str
Static Methods
-
classmethod
apt
(package_name, *, service_restart_handles=None, version=None)¶ Install a package using APT.
- Parameters
package_name (
str
) –service_restart_handles (
Optional
[Sequence
[InitServiceRestartHandle
]]) – Restart the given services after this command has run. Default: - Do not restart any serviceversion (
Optional
[Sequence
[str
]]) – Specify the versions to install. Default: - Install the latest version
- Return type
-
classmethod
msi
(location, *, key=None, service_restart_handles=None)¶ Install an MSI package from an HTTP URL or a location on disk.
- Parameters
location (
str
) –key (
Optional
[str
]) – Identifier key for this package. You can use this to order package installs. Default: - Automatically generatedservice_restart_handles (
Optional
[Sequence
[InitServiceRestartHandle
]]) – Restart the given service after this command has run. Default: - Do not restart any service
- Return type
-
classmethod
python
(package_name, *, service_restart_handles=None, version=None)¶ Install a package from PyPI.
- Parameters
package_name (
str
) –service_restart_handles (
Optional
[Sequence
[InitServiceRestartHandle
]]) – Restart the given services after this command has run. Default: - Do not restart any serviceversion (
Optional
[Sequence
[str
]]) – Specify the versions to install. Default: - Install the latest version
- Return type
-
classmethod
rpm
(location, *, key=None, service_restart_handles=None)¶ Install an RPM from an HTTP URL or a location on disk.
- Parameters
location (
str
) –key (
Optional
[str
]) – Identifier key for this package. You can use this to order package installs. Default: - Automatically generatedservice_restart_handles (
Optional
[Sequence
[InitServiceRestartHandle
]]) – Restart the given service after this command has run. Default: - Do not restart any service
- Return type
-
classmethod
ruby_gem
(gem_name, *, service_restart_handles=None, version=None)¶ Install a package from RubyGems.
- Parameters
gem_name (
str
) –service_restart_handles (
Optional
[Sequence
[InitServiceRestartHandle
]]) – Restart the given services after this command has run. Default: - Do not restart any serviceversion (
Optional
[Sequence
[str
]]) – Specify the versions to install. Default: - Install the latest version
- Return type
-
classmethod
yum
(package_name, *, service_restart_handles=None, version=None)¶ Install a package using Yum.
- Parameters
package_name (
str
) –service_restart_handles (
Optional
[Sequence
[InitServiceRestartHandle
]]) – Restart the given services after this command has run. Default: - Do not restart any serviceversion (
Optional
[Sequence
[str
]]) – Specify the versions to install. Default: - Install the latest version
- Return type