Class ComputeImage.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<ComputeImage>
    Enclosing class:
    ComputeImage

    @Stability(Stable)
    public static final class ComputeImage.Builder
    extends Object
    implements software.amazon.jsii.Builder<ComputeImage>
    A fluent builder for ComputeImage.
    • Method Detail

      • create

        @Stability(Stable)
        public static ComputeImage.Builder create​(software.constructs.Construct scope,
                                                  String id)
        Parameters:
        scope - The scope in which to define this construct. This parameter is required.
        id - The scoped construct ID. This parameter is required.
        Returns:
        a new instance of ComputeImage.Builder.
      • connection

        @Stability(Experimental)
        public ComputeImage.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public ComputeImage.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public ComputeImage.Builder count​(Number count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public ComputeImage.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public ComputeImage.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Parameters:
        dependsOn - This parameter is required.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public ComputeImage.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Parameters:
        forEach - This parameter is required.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public ComputeImage.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Parameters:
        lifecycle - This parameter is required.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public ComputeImage.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Parameters:
        provider - This parameter is required.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public ComputeImage.Builder provisioners​(List<? extends Object> provisioners)
        Parameters:
        provisioners - This parameter is required.
        Returns:
        this
      • name

        @Stability(Stable)
        public ComputeImage.Builder name​(String name)
        Name of the resource;

        provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression '[a-z](%5B-a-z0-9%5D*%5Ba-z0-9%5D)?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#name ComputeImage#name}

        Parameters:
        name - Name of the resource;. This parameter is required.
        Returns:
        this
      • description

        @Stability(Stable)
        public ComputeImage.Builder description​(String description)
        An optional description of this resource. Provide this property when you create the resource.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#description ComputeImage#description}

        Parameters:
        description - An optional description of this resource. Provide this property when you create the resource. This parameter is required.
        Returns:
        this
      • diskSizeGb

        @Stability(Stable)
        public ComputeImage.Builder diskSizeGb​(Number diskSizeGb)
        Size of the image when restored onto a persistent disk (in GB).

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#disk_size_gb ComputeImage#disk_size_gb}

        Parameters:
        diskSizeGb - Size of the image when restored onto a persistent disk (in GB). This parameter is required.
        Returns:
        this
      • family

        @Stability(Stable)
        public ComputeImage.Builder family​(String family)
        The name of the image family to which this image belongs.

        You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#family ComputeImage#family}

        Parameters:
        family - The name of the image family to which this image belongs. This parameter is required.
        Returns:
        this
      • guestOsFeatures

        @Stability(Stable)
        public ComputeImage.Builder guestOsFeatures​(com.hashicorp.cdktf.IResolvable guestOsFeatures)
        guest_os_features block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#guest_os_features ComputeImage#guest_os_features}

        Parameters:
        guestOsFeatures - guest_os_features block. This parameter is required.
        Returns:
        this
      • guestOsFeatures

        @Stability(Stable)
        public ComputeImage.Builder guestOsFeatures​(List<? extends ComputeImageGuestOsFeatures> guestOsFeatures)
        guest_os_features block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#guest_os_features ComputeImage#guest_os_features}

        Parameters:
        guestOsFeatures - guest_os_features block. This parameter is required.
        Returns:
        this
      • id

        @Stability(Stable)
        public ComputeImage.Builder id​(String id)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#id ComputeImage#id}.

        Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.

        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#id ComputeImage#id}. This parameter is required.
        Returns:
        this
      • imageEncryptionKey

        @Stability(Stable)
        public ComputeImage.Builder imageEncryptionKey​(ComputeImageImageEncryptionKey imageEncryptionKey)
        image_encryption_key block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#image_encryption_key ComputeImage#image_encryption_key}

        Parameters:
        imageEncryptionKey - image_encryption_key block. This parameter is required.
        Returns:
        this
      • labels

        @Stability(Stable)
        public ComputeImage.Builder labels​(Map<String,​String> labels)
        Labels to apply to this Image.

        **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#labels ComputeImage#labels}

        Parameters:
        labels - Labels to apply to this Image. This parameter is required.
        Returns:
        this
      • licenses

        @Stability(Stable)
        public ComputeImage.Builder licenses​(List<String> licenses)
        Any applicable license URI.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#licenses ComputeImage#licenses}

        Parameters:
        licenses - Any applicable license URI. This parameter is required.
        Returns:
        this
      • project

        @Stability(Stable)
        public ComputeImage.Builder project​(String project)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#project ComputeImage#project}.

        Parameters:
        project - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#project ComputeImage#project}. This parameter is required.
        Returns:
        this
      • rawDisk

        @Stability(Stable)
        public ComputeImage.Builder rawDisk​(ComputeImageRawDisk rawDisk)
        raw_disk block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#raw_disk ComputeImage#raw_disk}

        Parameters:
        rawDisk - raw_disk block. This parameter is required.
        Returns:
        this
      • sourceDisk

        @Stability(Stable)
        public ComputeImage.Builder sourceDisk​(String sourceDisk)
        The source disk to create this image based on.

        You must provide either this property or the rawDisk.source property but not both to create an image. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#source_disk ComputeImage#source_disk}

        Parameters:
        sourceDisk - The source disk to create this image based on. This parameter is required.
        Returns:
        this
      • sourceImage

        @Stability(Stable)
        public ComputeImage.Builder sourceImage​(String sourceImage)
        URL of the source image used to create this image.

        In order to create an image, you must provide the full or partial URL of one of the following: * The selfLink URL * This property * The rawDisk.source URL * The sourceDisk URL Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#source_image ComputeImage#source_image}

        Parameters:
        sourceImage - URL of the source image used to create this image. This parameter is required.
        Returns:
        this
      • sourceSnapshot

        @Stability(Stable)
        public ComputeImage.Builder sourceSnapshot​(String sourceSnapshot)
        URL of the source snapshot used to create this image.

        In order to create an image, you must provide the full or partial URL of one of the following: * The selfLink URL * This property * The sourceImage URL * The rawDisk.source URL * The sourceDisk URL Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#source_snapshot ComputeImage#source_snapshot}

        Parameters:
        sourceSnapshot - URL of the source snapshot used to create this image. This parameter is required.
        Returns:
        this
      • storageLocations

        @Stability(Stable)
        public ComputeImage.Builder storageLocations​(List<String> storageLocations)
        Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#storage_locations ComputeImage#storage_locations}

        Parameters:
        storageLocations - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images. This parameter is required.
        Returns:
        this
      • timeouts

        @Stability(Stable)
        public ComputeImage.Builder timeouts​(ComputeImageTimeouts timeouts)
        timeouts block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#timeouts ComputeImage#timeouts}

        Parameters:
        timeouts - timeouts block. This parameter is required.
        Returns:
        this
      • build

        @Stability(Stable)
        public ComputeImage build()
        Specified by:
        build in interface software.amazon.jsii.Builder<ComputeImage>
        Returns:
        a newly built instance of ComputeImage.