Class StorageBucket.Builder

    • Method Detail

      • create

        @Stability(Stable)
        public static StorageBucket.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 StorageBucket.Builder.
      • connection

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

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

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

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

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

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

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

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

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

        @Stability(Stable)
        public StorageBucket.Builder location​(String location)
        The Google Cloud Storage location.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#location StorageBucket#location}

        Parameters:
        location - The Google Cloud Storage location. This parameter is required.
        Returns:
        this
      • name

        @Stability(Stable)
        public StorageBucket.Builder name​(String name)
        The name of the bucket.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#name StorageBucket#name}

        Parameters:
        name - The name of the bucket. This parameter is required.
        Returns:
        this
      • autoclass

        @Stability(Stable)
        public StorageBucket.Builder autoclass​(StorageBucketAutoclass autoclass)
        autoclass block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#autoclass StorageBucket#autoclass}

        Parameters:
        autoclass - autoclass block. This parameter is required.
        Returns:
        this
      • cors

        @Stability(Stable)
        public StorageBucket.Builder cors​(com.hashicorp.cdktf.IResolvable cors)
        cors block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#cors StorageBucket#cors}

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

        @Stability(Stable)
        public StorageBucket.Builder cors​(List<? extends StorageBucketCors> cors)
        cors block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#cors StorageBucket#cors}

        Parameters:
        cors - cors block. This parameter is required.
        Returns:
        this
      • customPlacementConfig

        @Stability(Stable)
        public StorageBucket.Builder customPlacementConfig​(StorageBucketCustomPlacementConfig customPlacementConfig)
        custom_placement_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#custom_placement_config StorageBucket#custom_placement_config}

        Parameters:
        customPlacementConfig - custom_placement_config block. This parameter is required.
        Returns:
        this
      • defaultEventBasedHold

        @Stability(Stable)
        public StorageBucket.Builder defaultEventBasedHold​(Boolean defaultEventBasedHold)
        Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#default_event_based_hold StorageBucket#default_event_based_hold}

        Parameters:
        defaultEventBasedHold - Whether or not to automatically apply an eventBasedHold to new objects added to the bucket. This parameter is required.
        Returns:
        this
      • defaultEventBasedHold

        @Stability(Stable)
        public StorageBucket.Builder defaultEventBasedHold​(com.hashicorp.cdktf.IResolvable defaultEventBasedHold)
        Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#default_event_based_hold StorageBucket#default_event_based_hold}

        Parameters:
        defaultEventBasedHold - Whether or not to automatically apply an eventBasedHold to new objects added to the bucket. This parameter is required.
        Returns:
        this
      • enableObjectRetention

        @Stability(Stable)
        public StorageBucket.Builder enableObjectRetention​(Boolean enableObjectRetention)
        Enables each object in the bucket to have its own retention policy, which prevents deletion until stored for a specific length of time.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#enable_object_retention StorageBucket#enable_object_retention}

        Parameters:
        enableObjectRetention - Enables each object in the bucket to have its own retention policy, which prevents deletion until stored for a specific length of time. This parameter is required.
        Returns:
        this
      • enableObjectRetention

        @Stability(Stable)
        public StorageBucket.Builder enableObjectRetention​(com.hashicorp.cdktf.IResolvable enableObjectRetention)
        Enables each object in the bucket to have its own retention policy, which prevents deletion until stored for a specific length of time.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#enable_object_retention StorageBucket#enable_object_retention}

        Parameters:
        enableObjectRetention - Enables each object in the bucket to have its own retention policy, which prevents deletion until stored for a specific length of time. This parameter is required.
        Returns:
        this
      • encryption

        @Stability(Stable)
        public StorageBucket.Builder encryption​(StorageBucketEncryption encryption)
        encryption block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#encryption StorageBucket#encryption}

        Parameters:
        encryption - encryption block. This parameter is required.
        Returns:
        this
      • forceDestroy

        @Stability(Stable)
        public StorageBucket.Builder forceDestroy​(Boolean forceDestroy)
        When deleting a bucket, this boolean option will delete all contained objects.

        If you try to delete a bucket that contains objects, Terraform will fail that run. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#force_destroy StorageBucket#force_destroy}

        Parameters:
        forceDestroy - When deleting a bucket, this boolean option will delete all contained objects. This parameter is required.
        Returns:
        this
      • forceDestroy

        @Stability(Stable)
        public StorageBucket.Builder forceDestroy​(com.hashicorp.cdktf.IResolvable forceDestroy)
        When deleting a bucket, this boolean option will delete all contained objects.

        If you try to delete a bucket that contains objects, Terraform will fail that run. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#force_destroy StorageBucket#force_destroy}

        Parameters:
        forceDestroy - When deleting a bucket, this boolean option will delete all contained objects. This parameter is required.
        Returns:
        this
      • id

        @Stability(Stable)
        public StorageBucket.Builder id​(String id)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#id StorageBucket#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/storage_bucket#id StorageBucket#id}. This parameter is required.
        Returns:
        this
      • labels

        @Stability(Stable)
        public StorageBucket.Builder labels​(Map<String,​String> labels)
        A set of key/value label pairs to assign to the bucket.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#labels StorageBucket#labels}

        Parameters:
        labels - A set of key/value label pairs to assign to the bucket. This parameter is required.
        Returns:
        this
      • lifecycleRule

        @Stability(Stable)
        public StorageBucket.Builder lifecycleRule​(com.hashicorp.cdktf.IResolvable lifecycleRule)
        lifecycle_rule block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#lifecycle_rule StorageBucket#lifecycle_rule}

        Parameters:
        lifecycleRule - lifecycle_rule block. This parameter is required.
        Returns:
        this
      • lifecycleRule

        @Stability(Stable)
        public StorageBucket.Builder lifecycleRule​(List<? extends StorageBucketLifecycleRule> lifecycleRule)
        lifecycle_rule block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#lifecycle_rule StorageBucket#lifecycle_rule}

        Parameters:
        lifecycleRule - lifecycle_rule block. This parameter is required.
        Returns:
        this
      • logging

        @Stability(Stable)
        public StorageBucket.Builder logging​(StorageBucketLogging logging)
        logging block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#logging StorageBucket#logging}

        Parameters:
        logging - logging block. This parameter is required.
        Returns:
        this
      • project

        @Stability(Stable)
        public StorageBucket.Builder project​(String project)
        The ID of the project in which the resource belongs.

        If it is not provided, the provider project is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#project StorageBucket#project}

        Parameters:
        project - The ID of the project in which the resource belongs. This parameter is required.
        Returns:
        this
      • publicAccessPrevention

        @Stability(Stable)
        public StorageBucket.Builder publicAccessPrevention​(String publicAccessPrevention)
        Prevents public access to a bucket.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#public_access_prevention StorageBucket#public_access_prevention}

        Parameters:
        publicAccessPrevention - Prevents public access to a bucket. This parameter is required.
        Returns:
        this
      • requesterPays

        @Stability(Stable)
        public StorageBucket.Builder requesterPays​(Boolean requesterPays)
        Enables Requester Pays on a storage bucket.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#requester_pays StorageBucket#requester_pays}

        Parameters:
        requesterPays - Enables Requester Pays on a storage bucket. This parameter is required.
        Returns:
        this
      • requesterPays

        @Stability(Stable)
        public StorageBucket.Builder requesterPays​(com.hashicorp.cdktf.IResolvable requesterPays)
        Enables Requester Pays on a storage bucket.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#requester_pays StorageBucket#requester_pays}

        Parameters:
        requesterPays - Enables Requester Pays on a storage bucket. This parameter is required.
        Returns:
        this
      • retentionPolicy

        @Stability(Stable)
        public StorageBucket.Builder retentionPolicy​(StorageBucketRetentionPolicy retentionPolicy)
        retention_policy block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#retention_policy StorageBucket#retention_policy}

        Parameters:
        retentionPolicy - retention_policy block. This parameter is required.
        Returns:
        this
      • rpo

        @Stability(Stable)
        public StorageBucket.Builder rpo​(String rpo)
        Specifies the RPO setting of bucket.

        If set 'ASYNC_TURBO', The Turbo Replication will be enabled for the dual-region bucket. Value 'DEFAULT' will set RPO setting to default. Turbo Replication is only for buckets in dual-regions.See the docs for more details. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#rpo StorageBucket#rpo}

        Parameters:
        rpo - Specifies the RPO setting of bucket. This parameter is required.
        Returns:
        this
      • softDeletePolicy

        @Stability(Stable)
        public StorageBucket.Builder softDeletePolicy​(StorageBucketSoftDeletePolicy softDeletePolicy)
        soft_delete_policy block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#soft_delete_policy StorageBucket#soft_delete_policy}

        Parameters:
        softDeletePolicy - soft_delete_policy block. This parameter is required.
        Returns:
        this
      • storageClass

        @Stability(Stable)
        public StorageBucket.Builder storageClass​(String storageClass)
        The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#storage_class StorageBucket#storage_class}

        Parameters:
        storageClass - The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE. This parameter is required.
        Returns:
        this
      • timeouts

        @Stability(Stable)
        public StorageBucket.Builder timeouts​(StorageBucketTimeouts timeouts)
        timeouts block.

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

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

        @Stability(Stable)
        public StorageBucket.Builder uniformBucketLevelAccess​(Boolean uniformBucketLevelAccess)
        Enables uniform bucket-level access on a bucket.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#uniform_bucket_level_access StorageBucket#uniform_bucket_level_access}

        Parameters:
        uniformBucketLevelAccess - Enables uniform bucket-level access on a bucket. This parameter is required.
        Returns:
        this
      • uniformBucketLevelAccess

        @Stability(Stable)
        public StorageBucket.Builder uniformBucketLevelAccess​(com.hashicorp.cdktf.IResolvable uniformBucketLevelAccess)
        Enables uniform bucket-level access on a bucket.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#uniform_bucket_level_access StorageBucket#uniform_bucket_level_access}

        Parameters:
        uniformBucketLevelAccess - Enables uniform bucket-level access on a bucket. This parameter is required.
        Returns:
        this
      • versioning

        @Stability(Stable)
        public StorageBucket.Builder versioning​(StorageBucketVersioning versioning)
        versioning block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#versioning StorageBucket#versioning}

        Parameters:
        versioning - versioning block. This parameter is required.
        Returns:
        this
      • website

        @Stability(Stable)
        public StorageBucket.Builder website​(StorageBucketWebsite website)
        website block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/storage_bucket#website StorageBucket#website}

        Parameters:
        website - website block. This parameter is required.
        Returns:
        this