Interface DeployTimeSubstitutedFileProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
DeployTimeSubstitutedFileProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.102.0 (build e354887)", date="2024-09-10T01:10:15.671Z") @Stability(Stable) public interface DeployTimeSubstitutedFileProps extends software.amazon.jsii.JsiiSerializable
Example:

 import software.amazon.awscdk.services.lambda.*;
 Function myLambdaFunction;
 Bucket destinationBucket;
 //(Optional) if provided, the resulting processed file would be uploaded to the destinationBucket under the destinationKey name.
 String destinationKey;
 Role role;
 DeployTimeSubstitutedFile.Builder.create(this, "MyFile")
         .source("my-file.yaml")
         .destinationKey(destinationKey)
         .destinationBucket(destinationBucket)
         .substitutions(Map.of(
                 "variableName", myLambdaFunction.getFunctionName()))
         .role(role)
         .build();
 
  • Method Details

    • getDestinationBucket

      @Stability(Stable) @NotNull IBucket getDestinationBucket()
      The S3 bucket to sync the contents of the zip file to.
    • getSource

      @Stability(Stable) @NotNull String getSource()
      Path to the user's local file.
    • getSubstitutions

      @Stability(Stable) @NotNull Map<String,String> getSubstitutions()
      User-defined substitutions to make in the file.

      Placeholders in the user's local file must be specified with double curly brackets and spaces. For example, if you use the key 'xxxx' in the file, it must be written as: {{ xxxx }} to be recognized by the construct as a substitution.

    • getDestinationKey

      @Stability(Stable) @Nullable default String getDestinationKey()
      The object key in the destination bucket where the processed file would be written to.

      Default: - Fingerprint of the file content would be used as object key

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      Execution role associated with this function.

      Default: - A role is automatically created

    • builder

      @Stability(Stable) static DeployTimeSubstitutedFileProps.Builder builder()
      Returns:
      a DeployTimeSubstitutedFileProps.Builder of DeployTimeSubstitutedFileProps