@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-19T23:09:26.308Z") @Stability(value=Stable) public abstract class InitSource extends InitElement
Example:
Bucket myBucket; InitServiceRestartHandle handle = new InitServiceRestartHandle(); CloudFormationInit.fromElements(InitFile.fromString("/etc/nginx/nginx.conf", "...", InitFileOptions.builder().serviceRestartHandles(List.of(handle)).build()), InitSource.fromS3Object("/var/www/html", myBucket, "html.zip", InitSourceOptions.builder().serviceRestartHandles(List.of(handle)).build()), InitService.enable("nginx", InitServiceOptions.builder() .serviceRestartHandle(handle) .build()));
Modifier | Constructor and Description |
---|---|
protected |
InitSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
InitSource(software.amazon.jsii.JsiiObjectRef objRef) |
protected |
InitSource(String targetDirectory) |
protected |
InitSource(String targetDirectory,
List<InitServiceRestartHandle> serviceHandles) |
Modifier and Type | Method and Description |
---|---|
static InitSource |
fromAsset(String targetDirectory,
String path)
Create an InitSource from an asset created from the given path.
|
static InitSource |
fromAsset(String targetDirectory,
String path,
InitSourceAssetOptions options)
Create an InitSource from an asset created from the given path.
|
static InitSource |
fromExistingAsset(String targetDirectory,
Asset asset)
Extract a directory from an existing directory asset.
|
static InitSource |
fromExistingAsset(String targetDirectory,
Asset asset,
InitSourceOptions options)
Extract a directory from an existing directory asset.
|
static InitSource |
fromGitHub(String targetDirectory,
String owner,
String repo)
Extract a GitHub branch into a given directory.
|
static InitSource |
fromGitHub(String targetDirectory,
String owner,
String repo,
String refSpec)
Extract a GitHub branch into a given directory.
|
static InitSource |
fromGitHub(String targetDirectory,
String owner,
String repo,
String refSpec,
InitSourceOptions options)
Extract a GitHub branch into a given directory.
|
static InitSource |
fromS3Object(String targetDirectory,
IBucket bucket,
String key)
Extract an archive stored in an S3 bucket into the given directory.
|
static InitSource |
fromS3Object(String targetDirectory,
IBucket bucket,
String key,
InitSourceOptions options)
Extract an archive stored in an S3 bucket into the given directory.
|
static InitSource |
fromUrl(String targetDirectory,
String url)
Retrieve a URL and extract it into the given directory.
|
static InitSource |
fromUrl(String targetDirectory,
String url,
InitSourceOptions options)
Retrieve a URL and extract it into the given directory.
|
String |
getElementType()
Returns the init element type for this element.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
protected InitSource(software.amazon.jsii.JsiiObjectRef objRef)
protected InitSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected InitSource(@NotNull String targetDirectory, @Nullable List<InitServiceRestartHandle> serviceHandles)
targetDirectory
- This parameter is required.serviceHandles
- @Stability(value=Stable) protected InitSource(@NotNull String targetDirectory)
targetDirectory
- This parameter is required.@Stability(value=Stable) @NotNull public static InitSource fromAsset(@NotNull String targetDirectory, @NotNull String path, @Nullable InitSourceAssetOptions options)
targetDirectory
- This parameter is required.path
- This parameter is required.options
- @Stability(value=Stable) @NotNull public static InitSource fromAsset(@NotNull String targetDirectory, @NotNull String path)
targetDirectory
- This parameter is required.path
- This parameter is required.@Stability(value=Stable) @NotNull public static InitSource fromExistingAsset(@NotNull String targetDirectory, @NotNull Asset asset, @Nullable InitSourceOptions options)
targetDirectory
- This parameter is required.asset
- This parameter is required.options
- @Stability(value=Stable) @NotNull public static InitSource fromExistingAsset(@NotNull String targetDirectory, @NotNull Asset asset)
targetDirectory
- This parameter is required.asset
- This parameter is required.@Stability(value=Stable) @NotNull public static InitSource fromGitHub(@NotNull String targetDirectory, @NotNull String owner, @NotNull String repo, @Nullable String refSpec, @Nullable InitSourceOptions options)
targetDirectory
- This parameter is required.owner
- This parameter is required.repo
- This parameter is required.refSpec
- options
- @Stability(value=Stable) @NotNull public static InitSource fromGitHub(@NotNull String targetDirectory, @NotNull String owner, @NotNull String repo, @Nullable String refSpec)
targetDirectory
- This parameter is required.owner
- This parameter is required.repo
- This parameter is required.refSpec
- @Stability(value=Stable) @NotNull public static InitSource fromGitHub(@NotNull String targetDirectory, @NotNull String owner, @NotNull String repo)
targetDirectory
- This parameter is required.owner
- This parameter is required.repo
- This parameter is required.@Stability(value=Stable) @NotNull public static InitSource fromS3Object(@NotNull String targetDirectory, @NotNull IBucket bucket, @NotNull String key, @Nullable InitSourceOptions options)
targetDirectory
- This parameter is required.bucket
- This parameter is required.key
- This parameter is required.options
- @Stability(value=Stable) @NotNull public static InitSource fromS3Object(@NotNull String targetDirectory, @NotNull IBucket bucket, @NotNull String key)
targetDirectory
- This parameter is required.bucket
- This parameter is required.key
- This parameter is required.@Stability(value=Stable) @NotNull public static InitSource fromUrl(@NotNull String targetDirectory, @NotNull String url, @Nullable InitSourceOptions options)
targetDirectory
- This parameter is required.url
- This parameter is required.options
- @Stability(value=Stable) @NotNull public static InitSource fromUrl(@NotNull String targetDirectory, @NotNull String url)
targetDirectory
- This parameter is required.url
- This parameter is required.@Stability(value=Stable) @NotNull public String getElementType()
getElementType
in class InitElement
Copyright © 2023. All rights reserved.