Class FileAssetLocation.Builder

java.lang.Object
software.amazon.awscdk.core.FileAssetLocation.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<FileAssetLocation>
Enclosing interface:
FileAssetLocation

@Stability(Stable) public static final class FileAssetLocation.Builder extends Object implements software.amazon.jsii.Builder<FileAssetLocation>
A builder for FileAssetLocation
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • bucketName

      @Stability(Stable) public FileAssetLocation.Builder bucketName(String bucketName)
      Parameters:
      bucketName - The name of the Amazon S3 bucket. This parameter is required.
      Returns:
      this
    • httpUrl

      @Stability(Stable) public FileAssetLocation.Builder httpUrl(String httpUrl)
      Parameters:
      httpUrl - The HTTP URL of this asset on Amazon S3. This parameter is required. This value suitable for inclusion in a CloudFormation template, and may be an encoded token.

      Example value: https://s3-us-east-1.amazonaws.com/mybucket/myobject

      Returns:
      this
    • objectKey

      @Stability(Stable) public FileAssetLocation.Builder objectKey(String objectKey)
      Parameters:
      objectKey - The Amazon S3 object key. This parameter is required.
      Returns:
      this
    • s3ObjectUrl

      @Stability(Stable) public FileAssetLocation.Builder s3ObjectUrl(String s3ObjectUrl)
      Parameters:
      s3ObjectUrl - The S3 URL of this asset on Amazon S3. This parameter is required. This value suitable for inclusion in a CloudFormation template, and may be an encoded token.

      Example value: s3://mybucket/myobject

      Returns:
      this
    • kmsKeyArn

      @Stability(Stable) public FileAssetLocation.Builder kmsKeyArn(String kmsKeyArn)
      Parameters:
      kmsKeyArn - The ARN of the KMS key used to encrypt the file asset bucket, if any. The CDK bootstrap stack comes with a key policy that does not require setting this property, so you only need to set this property if you have customized the bootstrap stack to require it.
      Returns:
      this
    • s3ObjectUrlWithPlaceholders

      @Stability(Stable) public FileAssetLocation.Builder s3ObjectUrlWithPlaceholders(String s3ObjectUrlWithPlaceholders)
      Parameters:
      s3ObjectUrlWithPlaceholders - Like s3ObjectUrl, but not suitable for CloudFormation consumption. If there are placeholders in the S3 URL, they will be returned unreplaced and un-evaluated.
      Returns:
      this
    • s3Url

      @Stability(Deprecated) @Deprecated public FileAssetLocation.Builder s3Url(String s3Url)
      Deprecated.
      use `httpUrl`
      Parameters:
      s3Url - The HTTP URL of this asset on Amazon S3.
      Returns:
      this
    • build

      @Stability(Stable) public FileAssetLocation build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<FileAssetLocation>
      Returns:
      a new instance of FileAssetLocation
      Throws:
      NullPointerException - if any required attribute was not provided