Class ImportSource
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudfront.ImportSource
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
- Direct Known Subclasses:
AssetImportSource
,InlineImportSource
,S3ImportSource
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:05.566Z")
@Stability(Stable)
public abstract class ImportSource
extends software.amazon.jsii.JsiiObject
The data to be imported to the key value store.
Example:
KeyValueStore storeAsset = KeyValueStore.Builder.create(this, "KeyValueStoreAsset") .keyValueStoreName("KeyValueStoreAsset") .source(ImportSource.fromAsset("path-to-data.json")) .build(); KeyValueStore storeInline = KeyValueStore.Builder.create(this, "KeyValueStoreInline") .keyValueStoreName("KeyValueStoreInline") .source(ImportSource.fromInline(JSON.stringify(Map.of( "data", List.of(Map.of( "key", "key1", "value", "value1"), Map.of( "key", "key2", "value", "value2")))))) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
ImportSource
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ImportSource
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic ImportSource
An import source that exists as a local file.static ImportSource
fromAsset
(String path, AssetOptions options) An import source that exists as a local file.static ImportSource
fromBucket
(IBucket bucket, String key) An import source that exists as an object in an S3 bucket.static ImportSource
fromInline
(String data) An import source that uses an inline string.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ImportSource
protected ImportSource(software.amazon.jsii.JsiiObjectRef objRef) -
ImportSource
protected ImportSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ImportSource
@Stability(Stable) protected ImportSource()
-
-
Method Details
-
fromAsset
@Stability(Stable) @NotNull public static ImportSource fromAsset(@NotNull String path, @Nullable AssetOptions options) An import source that exists as a local file.- Parameters:
path
- the path to the local file. This parameter is required.options
- the configuration for the temporarily created S3 file.
-
fromAsset
An import source that exists as a local file.- Parameters:
path
- the path to the local file. This parameter is required.
-
fromBucket
@Stability(Stable) @NotNull public static ImportSource fromBucket(@NotNull IBucket bucket, @NotNull String key) An import source that exists as an object in an S3 bucket.- Parameters:
bucket
- the S3 bucket that contains the data. This parameter is required.key
- the key within the S3 bucket that contains the data. This parameter is required.
-
fromInline
An import source that uses an inline string.- Parameters:
data
- the contents of the KeyValueStore. This parameter is required.
-