1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. BackendBucket
Google Cloud Classic v7.18.0 published on Wednesday, Apr 10, 2024 by Pulumi

gcp.compute.BackendBucket

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.18.0 published on Wednesday, Apr 10, 2024 by Pulumi

    Backend buckets allow you to use Google Cloud Storage buckets with HTTP(S) load balancing.

    An HTTP(S) load balancer can direct traffic to specified URLs to a backend bucket rather than a backend service. It can send requests for static content to a Cloud Storage bucket and requests for dynamic content to a virtual machine instance.

    To get more information about BackendBucket, see:

    Example Usage

    Backend Bucket Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const imageBucket = new gcp.storage.Bucket("image_bucket", {
        name: "image-store-bucket",
        location: "EU",
    });
    const imageBackend = new gcp.compute.BackendBucket("image_backend", {
        name: "image-backend-bucket",
        description: "Contains beautiful images",
        bucketName: imageBucket.name,
        enableCdn: true,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    image_bucket = gcp.storage.Bucket("image_bucket",
        name="image-store-bucket",
        location="EU")
    image_backend = gcp.compute.BackendBucket("image_backend",
        name="image-backend-bucket",
        description="Contains beautiful images",
        bucket_name=image_bucket.name,
        enable_cdn=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		imageBucket, err := storage.NewBucket(ctx, "image_bucket", &storage.BucketArgs{
    			Name:     pulumi.String("image-store-bucket"),
    			Location: pulumi.String("EU"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewBackendBucket(ctx, "image_backend", &compute.BackendBucketArgs{
    			Name:        pulumi.String("image-backend-bucket"),
    			Description: pulumi.String("Contains beautiful images"),
    			BucketName:  imageBucket.Name,
    			EnableCdn:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var imageBucket = new Gcp.Storage.Bucket("image_bucket", new()
        {
            Name = "image-store-bucket",
            Location = "EU",
        });
    
        var imageBackend = new Gcp.Compute.BackendBucket("image_backend", new()
        {
            Name = "image-backend-bucket",
            Description = "Contains beautiful images",
            BucketName = imageBucket.Name,
            EnableCdn = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.compute.BackendBucket;
    import com.pulumi.gcp.compute.BackendBucketArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var imageBucket = new Bucket("imageBucket", BucketArgs.builder()        
                .name("image-store-bucket")
                .location("EU")
                .build());
    
            var imageBackend = new BackendBucket("imageBackend", BackendBucketArgs.builder()        
                .name("image-backend-bucket")
                .description("Contains beautiful images")
                .bucketName(imageBucket.name())
                .enableCdn(true)
                .build());
    
        }
    }
    
    resources:
      imageBackend:
        type: gcp:compute:BackendBucket
        name: image_backend
        properties:
          name: image-backend-bucket
          description: Contains beautiful images
          bucketName: ${imageBucket.name}
          enableCdn: true
      imageBucket:
        type: gcp:storage:Bucket
        name: image_bucket
        properties:
          name: image-store-bucket
          location: EU
    

    Backend Bucket Security Policy

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const imageBackendBucket = new gcp.storage.Bucket("image_backend", {
        name: "image-store-bucket",
        location: "EU",
    });
    const policy = new gcp.compute.SecurityPolicy("policy", {
        name: "image-store-bucket",
        description: "basic security policy",
        type: "CLOUD_ARMOR_EDGE",
    });
    const imageBackend = new gcp.compute.BackendBucket("image_backend", {
        name: "image-backend-bucket",
        description: "Contains beautiful images",
        bucketName: imageBackendBucket.name,
        enableCdn: true,
        edgeSecurityPolicy: policy.id,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    image_backend_bucket = gcp.storage.Bucket("image_backend",
        name="image-store-bucket",
        location="EU")
    policy = gcp.compute.SecurityPolicy("policy",
        name="image-store-bucket",
        description="basic security policy",
        type="CLOUD_ARMOR_EDGE")
    image_backend = gcp.compute.BackendBucket("image_backend",
        name="image-backend-bucket",
        description="Contains beautiful images",
        bucket_name=image_backend_bucket.name,
        enable_cdn=True,
        edge_security_policy=policy.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		imageBackendBucket, err := storage.NewBucket(ctx, "image_backend", &storage.BucketArgs{
    			Name:     pulumi.String("image-store-bucket"),
    			Location: pulumi.String("EU"),
    		})
    		if err != nil {
    			return err
    		}
    		policy, err := compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
    			Name:        pulumi.String("image-store-bucket"),
    			Description: pulumi.String("basic security policy"),
    			Type:        pulumi.String("CLOUD_ARMOR_EDGE"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewBackendBucket(ctx, "image_backend", &compute.BackendBucketArgs{
    			Name:               pulumi.String("image-backend-bucket"),
    			Description:        pulumi.String("Contains beautiful images"),
    			BucketName:         imageBackendBucket.Name,
    			EnableCdn:          pulumi.Bool(true),
    			EdgeSecurityPolicy: policy.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var imageBackendBucket = new Gcp.Storage.Bucket("image_backend", new()
        {
            Name = "image-store-bucket",
            Location = "EU",
        });
    
        var policy = new Gcp.Compute.SecurityPolicy("policy", new()
        {
            Name = "image-store-bucket",
            Description = "basic security policy",
            Type = "CLOUD_ARMOR_EDGE",
        });
    
        var imageBackend = new Gcp.Compute.BackendBucket("image_backend", new()
        {
            Name = "image-backend-bucket",
            Description = "Contains beautiful images",
            BucketName = imageBackendBucket.Name,
            EnableCdn = true,
            EdgeSecurityPolicy = policy.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.compute.SecurityPolicy;
    import com.pulumi.gcp.compute.SecurityPolicyArgs;
    import com.pulumi.gcp.compute.BackendBucket;
    import com.pulumi.gcp.compute.BackendBucketArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var imageBackendBucket = new Bucket("imageBackendBucket", BucketArgs.builder()        
                .name("image-store-bucket")
                .location("EU")
                .build());
    
            var policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()        
                .name("image-store-bucket")
                .description("basic security policy")
                .type("CLOUD_ARMOR_EDGE")
                .build());
    
            var imageBackend = new BackendBucket("imageBackend", BackendBucketArgs.builder()        
                .name("image-backend-bucket")
                .description("Contains beautiful images")
                .bucketName(imageBackendBucket.name())
                .enableCdn(true)
                .edgeSecurityPolicy(policy.id())
                .build());
    
        }
    }
    
    resources:
      imageBackend:
        type: gcp:compute:BackendBucket
        name: image_backend
        properties:
          name: image-backend-bucket
          description: Contains beautiful images
          bucketName: ${imageBackendBucket.name}
          enableCdn: true
          edgeSecurityPolicy: ${policy.id}
      imageBackendBucket:
        type: gcp:storage:Bucket
        name: image_backend
        properties:
          name: image-store-bucket
          location: EU
      policy:
        type: gcp:compute:SecurityPolicy
        properties:
          name: image-store-bucket
          description: basic security policy
          type: CLOUD_ARMOR_EDGE
    

    Backend Bucket Query String Whitelist

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const imageBucket = new gcp.storage.Bucket("image_bucket", {
        name: "image-backend-bucket",
        location: "EU",
    });
    const imageBackend = new gcp.compute.BackendBucket("image_backend", {
        name: "image-backend-bucket",
        description: "Contains beautiful images",
        bucketName: imageBucket.name,
        enableCdn: true,
        cdnPolicy: {
            cacheKeyPolicy: {
                queryStringWhitelists: ["image-version"],
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    image_bucket = gcp.storage.Bucket("image_bucket",
        name="image-backend-bucket",
        location="EU")
    image_backend = gcp.compute.BackendBucket("image_backend",
        name="image-backend-bucket",
        description="Contains beautiful images",
        bucket_name=image_bucket.name,
        enable_cdn=True,
        cdn_policy=gcp.compute.BackendBucketCdnPolicyArgs(
            cache_key_policy=gcp.compute.BackendBucketCdnPolicyCacheKeyPolicyArgs(
                query_string_whitelists=["image-version"],
            ),
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		imageBucket, err := storage.NewBucket(ctx, "image_bucket", &storage.BucketArgs{
    			Name:     pulumi.String("image-backend-bucket"),
    			Location: pulumi.String("EU"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewBackendBucket(ctx, "image_backend", &compute.BackendBucketArgs{
    			Name:        pulumi.String("image-backend-bucket"),
    			Description: pulumi.String("Contains beautiful images"),
    			BucketName:  imageBucket.Name,
    			EnableCdn:   pulumi.Bool(true),
    			CdnPolicy: &compute.BackendBucketCdnPolicyArgs{
    				CacheKeyPolicy: &compute.BackendBucketCdnPolicyCacheKeyPolicyArgs{
    					QueryStringWhitelists: pulumi.StringArray{
    						pulumi.String("image-version"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var imageBucket = new Gcp.Storage.Bucket("image_bucket", new()
        {
            Name = "image-backend-bucket",
            Location = "EU",
        });
    
        var imageBackend = new Gcp.Compute.BackendBucket("image_backend", new()
        {
            Name = "image-backend-bucket",
            Description = "Contains beautiful images",
            BucketName = imageBucket.Name,
            EnableCdn = true,
            CdnPolicy = new Gcp.Compute.Inputs.BackendBucketCdnPolicyArgs
            {
                CacheKeyPolicy = new Gcp.Compute.Inputs.BackendBucketCdnPolicyCacheKeyPolicyArgs
                {
                    QueryStringWhitelists = new[]
                    {
                        "image-version",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.compute.BackendBucket;
    import com.pulumi.gcp.compute.BackendBucketArgs;
    import com.pulumi.gcp.compute.inputs.BackendBucketCdnPolicyArgs;
    import com.pulumi.gcp.compute.inputs.BackendBucketCdnPolicyCacheKeyPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var imageBucket = new Bucket("imageBucket", BucketArgs.builder()        
                .name("image-backend-bucket")
                .location("EU")
                .build());
    
            var imageBackend = new BackendBucket("imageBackend", BackendBucketArgs.builder()        
                .name("image-backend-bucket")
                .description("Contains beautiful images")
                .bucketName(imageBucket.name())
                .enableCdn(true)
                .cdnPolicy(BackendBucketCdnPolicyArgs.builder()
                    .cacheKeyPolicy(BackendBucketCdnPolicyCacheKeyPolicyArgs.builder()
                        .queryStringWhitelists("image-version")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      imageBackend:
        type: gcp:compute:BackendBucket
        name: image_backend
        properties:
          name: image-backend-bucket
          description: Contains beautiful images
          bucketName: ${imageBucket.name}
          enableCdn: true
          cdnPolicy:
            cacheKeyPolicy:
              queryStringWhitelists:
                - image-version
      imageBucket:
        type: gcp:storage:Bucket
        name: image_bucket
        properties:
          name: image-backend-bucket
          location: EU
    

    Backend Bucket Include Http Headers

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const imageBucket = new gcp.storage.Bucket("image_bucket", {
        name: "image-backend-bucket",
        location: "EU",
    });
    const imageBackend = new gcp.compute.BackendBucket("image_backend", {
        name: "image-backend-bucket",
        description: "Contains beautiful images",
        bucketName: imageBucket.name,
        enableCdn: true,
        cdnPolicy: {
            cacheKeyPolicy: {
                includeHttpHeaders: ["X-My-Header-Field"],
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    image_bucket = gcp.storage.Bucket("image_bucket",
        name="image-backend-bucket",
        location="EU")
    image_backend = gcp.compute.BackendBucket("image_backend",
        name="image-backend-bucket",
        description="Contains beautiful images",
        bucket_name=image_bucket.name,
        enable_cdn=True,
        cdn_policy=gcp.compute.BackendBucketCdnPolicyArgs(
            cache_key_policy=gcp.compute.BackendBucketCdnPolicyCacheKeyPolicyArgs(
                include_http_headers=["X-My-Header-Field"],
            ),
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		imageBucket, err := storage.NewBucket(ctx, "image_bucket", &storage.BucketArgs{
    			Name:     pulumi.String("image-backend-bucket"),
    			Location: pulumi.String("EU"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewBackendBucket(ctx, "image_backend", &compute.BackendBucketArgs{
    			Name:        pulumi.String("image-backend-bucket"),
    			Description: pulumi.String("Contains beautiful images"),
    			BucketName:  imageBucket.Name,
    			EnableCdn:   pulumi.Bool(true),
    			CdnPolicy: &compute.BackendBucketCdnPolicyArgs{
    				CacheKeyPolicy: &compute.BackendBucketCdnPolicyCacheKeyPolicyArgs{
    					IncludeHttpHeaders: pulumi.StringArray{
    						pulumi.String("X-My-Header-Field"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var imageBucket = new Gcp.Storage.Bucket("image_bucket", new()
        {
            Name = "image-backend-bucket",
            Location = "EU",
        });
    
        var imageBackend = new Gcp.Compute.BackendBucket("image_backend", new()
        {
            Name = "image-backend-bucket",
            Description = "Contains beautiful images",
            BucketName = imageBucket.Name,
            EnableCdn = true,
            CdnPolicy = new Gcp.Compute.Inputs.BackendBucketCdnPolicyArgs
            {
                CacheKeyPolicy = new Gcp.Compute.Inputs.BackendBucketCdnPolicyCacheKeyPolicyArgs
                {
                    IncludeHttpHeaders = new[]
                    {
                        "X-My-Header-Field",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.compute.BackendBucket;
    import com.pulumi.gcp.compute.BackendBucketArgs;
    import com.pulumi.gcp.compute.inputs.BackendBucketCdnPolicyArgs;
    import com.pulumi.gcp.compute.inputs.BackendBucketCdnPolicyCacheKeyPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var imageBucket = new Bucket("imageBucket", BucketArgs.builder()        
                .name("image-backend-bucket")
                .location("EU")
                .build());
    
            var imageBackend = new BackendBucket("imageBackend", BackendBucketArgs.builder()        
                .name("image-backend-bucket")
                .description("Contains beautiful images")
                .bucketName(imageBucket.name())
                .enableCdn(true)
                .cdnPolicy(BackendBucketCdnPolicyArgs.builder()
                    .cacheKeyPolicy(BackendBucketCdnPolicyCacheKeyPolicyArgs.builder()
                        .includeHttpHeaders("X-My-Header-Field")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      imageBackend:
        type: gcp:compute:BackendBucket
        name: image_backend
        properties:
          name: image-backend-bucket
          description: Contains beautiful images
          bucketName: ${imageBucket.name}
          enableCdn: true
          cdnPolicy:
            cacheKeyPolicy:
              includeHttpHeaders:
                - X-My-Header-Field
      imageBucket:
        type: gcp:storage:Bucket
        name: image_bucket
        properties:
          name: image-backend-bucket
          location: EU
    

    Create BackendBucket Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BackendBucket(name: string, args: BackendBucketArgs, opts?: CustomResourceOptions);
    @overload
    def BackendBucket(resource_name: str,
                      args: BackendBucketArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackendBucket(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      bucket_name: Optional[str] = None,
                      cdn_policy: Optional[BackendBucketCdnPolicyArgs] = None,
                      compression_mode: Optional[str] = None,
                      custom_response_headers: Optional[Sequence[str]] = None,
                      description: Optional[str] = None,
                      edge_security_policy: Optional[str] = None,
                      enable_cdn: Optional[bool] = None,
                      name: Optional[str] = None,
                      project: Optional[str] = None)
    func NewBackendBucket(ctx *Context, name string, args BackendBucketArgs, opts ...ResourceOption) (*BackendBucket, error)
    public BackendBucket(string name, BackendBucketArgs args, CustomResourceOptions? opts = null)
    public BackendBucket(String name, BackendBucketArgs args)
    public BackendBucket(String name, BackendBucketArgs args, CustomResourceOptions options)
    
    type: gcp:compute:BackendBucket
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BackendBucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BackendBucketArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BackendBucketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackendBucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackendBucketArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var backendBucketResource = new Gcp.Compute.BackendBucket("backendBucketResource", new()
    {
        BucketName = "string",
        CdnPolicy = new Gcp.Compute.Inputs.BackendBucketCdnPolicyArgs
        {
            BypassCacheOnRequestHeaders = new[]
            {
                new Gcp.Compute.Inputs.BackendBucketCdnPolicyBypassCacheOnRequestHeaderArgs
                {
                    HeaderName = "string",
                },
            },
            CacheKeyPolicy = new Gcp.Compute.Inputs.BackendBucketCdnPolicyCacheKeyPolicyArgs
            {
                IncludeHttpHeaders = new[]
                {
                    "string",
                },
                QueryStringWhitelists = new[]
                {
                    "string",
                },
            },
            CacheMode = "string",
            ClientTtl = 0,
            DefaultTtl = 0,
            MaxTtl = 0,
            NegativeCaching = false,
            NegativeCachingPolicies = new[]
            {
                new Gcp.Compute.Inputs.BackendBucketCdnPolicyNegativeCachingPolicyArgs
                {
                    Code = 0,
                    Ttl = 0,
                },
            },
            RequestCoalescing = false,
            ServeWhileStale = 0,
            SignedUrlCacheMaxAgeSec = 0,
        },
        CompressionMode = "string",
        CustomResponseHeaders = new[]
        {
            "string",
        },
        Description = "string",
        EdgeSecurityPolicy = "string",
        EnableCdn = false,
        Name = "string",
        Project = "string",
    });
    
    example, err := compute.NewBackendBucket(ctx, "backendBucketResource", &compute.BackendBucketArgs{
    	BucketName: pulumi.String("string"),
    	CdnPolicy: &compute.BackendBucketCdnPolicyArgs{
    		BypassCacheOnRequestHeaders: compute.BackendBucketCdnPolicyBypassCacheOnRequestHeaderArray{
    			&compute.BackendBucketCdnPolicyBypassCacheOnRequestHeaderArgs{
    				HeaderName: pulumi.String("string"),
    			},
    		},
    		CacheKeyPolicy: &compute.BackendBucketCdnPolicyCacheKeyPolicyArgs{
    			IncludeHttpHeaders: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			QueryStringWhitelists: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		CacheMode:       pulumi.String("string"),
    		ClientTtl:       pulumi.Int(0),
    		DefaultTtl:      pulumi.Int(0),
    		MaxTtl:          pulumi.Int(0),
    		NegativeCaching: pulumi.Bool(false),
    		NegativeCachingPolicies: compute.BackendBucketCdnPolicyNegativeCachingPolicyArray{
    			&compute.BackendBucketCdnPolicyNegativeCachingPolicyArgs{
    				Code: pulumi.Int(0),
    				Ttl:  pulumi.Int(0),
    			},
    		},
    		RequestCoalescing:       pulumi.Bool(false),
    		ServeWhileStale:         pulumi.Int(0),
    		SignedUrlCacheMaxAgeSec: pulumi.Int(0),
    	},
    	CompressionMode: pulumi.String("string"),
    	CustomResponseHeaders: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description:        pulumi.String("string"),
    	EdgeSecurityPolicy: pulumi.String("string"),
    	EnableCdn:          pulumi.Bool(false),
    	Name:               pulumi.String("string"),
    	Project:            pulumi.String("string"),
    })
    
    var backendBucketResource = new BackendBucket("backendBucketResource", BackendBucketArgs.builder()        
        .bucketName("string")
        .cdnPolicy(BackendBucketCdnPolicyArgs.builder()
            .bypassCacheOnRequestHeaders(BackendBucketCdnPolicyBypassCacheOnRequestHeaderArgs.builder()
                .headerName("string")
                .build())
            .cacheKeyPolicy(BackendBucketCdnPolicyCacheKeyPolicyArgs.builder()
                .includeHttpHeaders("string")
                .queryStringWhitelists("string")
                .build())
            .cacheMode("string")
            .clientTtl(0)
            .defaultTtl(0)
            .maxTtl(0)
            .negativeCaching(false)
            .negativeCachingPolicies(BackendBucketCdnPolicyNegativeCachingPolicyArgs.builder()
                .code(0)
                .ttl(0)
                .build())
            .requestCoalescing(false)
            .serveWhileStale(0)
            .signedUrlCacheMaxAgeSec(0)
            .build())
        .compressionMode("string")
        .customResponseHeaders("string")
        .description("string")
        .edgeSecurityPolicy("string")
        .enableCdn(false)
        .name("string")
        .project("string")
        .build());
    
    backend_bucket_resource = gcp.compute.BackendBucket("backendBucketResource",
        bucket_name="string",
        cdn_policy=gcp.compute.BackendBucketCdnPolicyArgs(
            bypass_cache_on_request_headers=[gcp.compute.BackendBucketCdnPolicyBypassCacheOnRequestHeaderArgs(
                header_name="string",
            )],
            cache_key_policy=gcp.compute.BackendBucketCdnPolicyCacheKeyPolicyArgs(
                include_http_headers=["string"],
                query_string_whitelists=["string"],
            ),
            cache_mode="string",
            client_ttl=0,
            default_ttl=0,
            max_ttl=0,
            negative_caching=False,
            negative_caching_policies=[gcp.compute.BackendBucketCdnPolicyNegativeCachingPolicyArgs(
                code=0,
                ttl=0,
            )],
            request_coalescing=False,
            serve_while_stale=0,
            signed_url_cache_max_age_sec=0,
        ),
        compression_mode="string",
        custom_response_headers=["string"],
        description="string",
        edge_security_policy="string",
        enable_cdn=False,
        name="string",
        project="string")
    
    const backendBucketResource = new gcp.compute.BackendBucket("backendBucketResource", {
        bucketName: "string",
        cdnPolicy: {
            bypassCacheOnRequestHeaders: [{
                headerName: "string",
            }],
            cacheKeyPolicy: {
                includeHttpHeaders: ["string"],
                queryStringWhitelists: ["string"],
            },
            cacheMode: "string",
            clientTtl: 0,
            defaultTtl: 0,
            maxTtl: 0,
            negativeCaching: false,
            negativeCachingPolicies: [{
                code: 0,
                ttl: 0,
            }],
            requestCoalescing: false,
            serveWhileStale: 0,
            signedUrlCacheMaxAgeSec: 0,
        },
        compressionMode: "string",
        customResponseHeaders: ["string"],
        description: "string",
        edgeSecurityPolicy: "string",
        enableCdn: false,
        name: "string",
        project: "string",
    });
    
    type: gcp:compute:BackendBucket
    properties:
        bucketName: string
        cdnPolicy:
            bypassCacheOnRequestHeaders:
                - headerName: string
            cacheKeyPolicy:
                includeHttpHeaders:
                    - string
                queryStringWhitelists:
                    - string
            cacheMode: string
            clientTtl: 0
            defaultTtl: 0
            maxTtl: 0
            negativeCaching: false
            negativeCachingPolicies:
                - code: 0
                  ttl: 0
            requestCoalescing: false
            serveWhileStale: 0
            signedUrlCacheMaxAgeSec: 0
        compressionMode: string
        customResponseHeaders:
            - string
        description: string
        edgeSecurityPolicy: string
        enableCdn: false
        name: string
        project: string
    

    BackendBucket Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The BackendBucket resource accepts the following input properties:

    BucketName string
    Cloud Storage bucket name.
    CdnPolicy BackendBucketCdnPolicy
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    CompressionMode string
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    CustomResponseHeaders List<string>
    Headers that the HTTP/S load balancer should add to proxied responses.
    Description string
    An optional textual description of the resource; provided by the client when the resource is created.
    EdgeSecurityPolicy string
    The security policy associated with this backend bucket.
    EnableCdn bool
    If true, enable Cloud CDN for this BackendBucket.
    Name string
    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? 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.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    BucketName string
    Cloud Storage bucket name.
    CdnPolicy BackendBucketCdnPolicyArgs
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    CompressionMode string
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    CustomResponseHeaders []string
    Headers that the HTTP/S load balancer should add to proxied responses.
    Description string
    An optional textual description of the resource; provided by the client when the resource is created.
    EdgeSecurityPolicy string
    The security policy associated with this backend bucket.
    EnableCdn bool
    If true, enable Cloud CDN for this BackendBucket.
    Name string
    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? 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.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    bucketName String
    Cloud Storage bucket name.
    cdnPolicy BackendBucketCdnPolicy
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    compressionMode String
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    customResponseHeaders List<String>
    Headers that the HTTP/S load balancer should add to proxied responses.
    description String
    An optional textual description of the resource; provided by the client when the resource is created.
    edgeSecurityPolicy String
    The security policy associated with this backend bucket.
    enableCdn Boolean
    If true, enable Cloud CDN for this BackendBucket.
    name String
    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? 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.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    bucketName string
    Cloud Storage bucket name.
    cdnPolicy BackendBucketCdnPolicy
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    compressionMode string
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    customResponseHeaders string[]
    Headers that the HTTP/S load balancer should add to proxied responses.
    description string
    An optional textual description of the resource; provided by the client when the resource is created.
    edgeSecurityPolicy string
    The security policy associated with this backend bucket.
    enableCdn boolean
    If true, enable Cloud CDN for this BackendBucket.
    name string
    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? 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.


    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    bucket_name str
    Cloud Storage bucket name.
    cdn_policy BackendBucketCdnPolicyArgs
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    compression_mode str
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    custom_response_headers Sequence[str]
    Headers that the HTTP/S load balancer should add to proxied responses.
    description str
    An optional textual description of the resource; provided by the client when the resource is created.
    edge_security_policy str
    The security policy associated with this backend bucket.
    enable_cdn bool
    If true, enable Cloud CDN for this BackendBucket.
    name str
    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? 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.


    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    bucketName String
    Cloud Storage bucket name.
    cdnPolicy Property Map
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    compressionMode String
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    customResponseHeaders List<String>
    Headers that the HTTP/S load balancer should add to proxied responses.
    description String
    An optional textual description of the resource; provided by the client when the resource is created.
    edgeSecurityPolicy String
    The security policy associated with this backend bucket.
    enableCdn Boolean
    If true, enable Cloud CDN for this BackendBucket.
    name String
    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? 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.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BackendBucket resource produces the following output properties:

    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    id string
    The provider-assigned unique ID for this managed resource.
    selfLink string
    The URI of the created resource.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    id str
    The provider-assigned unique ID for this managed resource.
    self_link str
    The URI of the created resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.

    Look up Existing BackendBucket Resource

    Get an existing BackendBucket resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BackendBucketState, opts?: CustomResourceOptions): BackendBucket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket_name: Optional[str] = None,
            cdn_policy: Optional[BackendBucketCdnPolicyArgs] = None,
            compression_mode: Optional[str] = None,
            creation_timestamp: Optional[str] = None,
            custom_response_headers: Optional[Sequence[str]] = None,
            description: Optional[str] = None,
            edge_security_policy: Optional[str] = None,
            enable_cdn: Optional[bool] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            self_link: Optional[str] = None) -> BackendBucket
    func GetBackendBucket(ctx *Context, name string, id IDInput, state *BackendBucketState, opts ...ResourceOption) (*BackendBucket, error)
    public static BackendBucket Get(string name, Input<string> id, BackendBucketState? state, CustomResourceOptions? opts = null)
    public static BackendBucket get(String name, Output<String> id, BackendBucketState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BucketName string
    Cloud Storage bucket name.
    CdnPolicy BackendBucketCdnPolicy
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    CompressionMode string
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    CustomResponseHeaders List<string>
    Headers that the HTTP/S load balancer should add to proxied responses.
    Description string
    An optional textual description of the resource; provided by the client when the resource is created.
    EdgeSecurityPolicy string
    The security policy associated with this backend bucket.
    EnableCdn bool
    If true, enable Cloud CDN for this BackendBucket.
    Name string
    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? 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.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    SelfLink string
    The URI of the created resource.
    BucketName string
    Cloud Storage bucket name.
    CdnPolicy BackendBucketCdnPolicyArgs
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    CompressionMode string
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    CustomResponseHeaders []string
    Headers that the HTTP/S load balancer should add to proxied responses.
    Description string
    An optional textual description of the resource; provided by the client when the resource is created.
    EdgeSecurityPolicy string
    The security policy associated with this backend bucket.
    EnableCdn bool
    If true, enable Cloud CDN for this BackendBucket.
    Name string
    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? 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.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    SelfLink string
    The URI of the created resource.
    bucketName String
    Cloud Storage bucket name.
    cdnPolicy BackendBucketCdnPolicy
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    compressionMode String
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    customResponseHeaders List<String>
    Headers that the HTTP/S load balancer should add to proxied responses.
    description String
    An optional textual description of the resource; provided by the client when the resource is created.
    edgeSecurityPolicy String
    The security policy associated with this backend bucket.
    enableCdn Boolean
    If true, enable Cloud CDN for this BackendBucket.
    name String
    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? 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.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    selfLink String
    The URI of the created resource.
    bucketName string
    Cloud Storage bucket name.
    cdnPolicy BackendBucketCdnPolicy
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    compressionMode string
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    customResponseHeaders string[]
    Headers that the HTTP/S load balancer should add to proxied responses.
    description string
    An optional textual description of the resource; provided by the client when the resource is created.
    edgeSecurityPolicy string
    The security policy associated with this backend bucket.
    enableCdn boolean
    If true, enable Cloud CDN for this BackendBucket.
    name string
    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? 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.


    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    selfLink string
    The URI of the created resource.
    bucket_name str
    Cloud Storage bucket name.
    cdn_policy BackendBucketCdnPolicyArgs
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    compression_mode str
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    custom_response_headers Sequence[str]
    Headers that the HTTP/S load balancer should add to proxied responses.
    description str
    An optional textual description of the resource; provided by the client when the resource is created.
    edge_security_policy str
    The security policy associated with this backend bucket.
    enable_cdn bool
    If true, enable Cloud CDN for this BackendBucket.
    name str
    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? 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.


    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    self_link str
    The URI of the created resource.
    bucketName String
    Cloud Storage bucket name.
    cdnPolicy Property Map
    Cloud CDN configuration for this Backend Bucket. Structure is documented below.
    compressionMode String
    Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values are: AUTOMATIC, DISABLED.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    customResponseHeaders List<String>
    Headers that the HTTP/S load balancer should add to proxied responses.
    description String
    An optional textual description of the resource; provided by the client when the resource is created.
    edgeSecurityPolicy String
    The security policy associated with this backend bucket.
    enableCdn Boolean
    If true, enable Cloud CDN for this BackendBucket.
    name String
    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? 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.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    selfLink String
    The URI of the created resource.

    Supporting Types

    BackendBucketCdnPolicy, BackendBucketCdnPolicyArgs

    BypassCacheOnRequestHeaders List<BackendBucketCdnPolicyBypassCacheOnRequestHeader>
    Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. Structure is documented below.
    CacheKeyPolicy BackendBucketCdnPolicyCacheKeyPolicy
    The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
    CacheMode string
    Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL, CACHE_ALL_STATIC.
    ClientTtl int
    Specifies the maximum allowed TTL for cached content served by this origin.
    DefaultTtl int
    Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age).
    MaxTtl int
    Specifies the maximum allowed TTL for cached content served by this origin.
    NegativeCaching bool
    Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
    NegativeCachingPolicies List<BackendBucketCdnPolicyNegativeCachingPolicy>
    Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs. Structure is documented below.
    RequestCoalescing bool
    If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
    ServeWhileStale int
    Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache.
    SignedUrlCacheMaxAgeSec int
    Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
    BypassCacheOnRequestHeaders []BackendBucketCdnPolicyBypassCacheOnRequestHeader
    Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. Structure is documented below.
    CacheKeyPolicy BackendBucketCdnPolicyCacheKeyPolicy
    The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
    CacheMode string
    Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL, CACHE_ALL_STATIC.
    ClientTtl int
    Specifies the maximum allowed TTL for cached content served by this origin.
    DefaultTtl int
    Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age).
    MaxTtl int
    Specifies the maximum allowed TTL for cached content served by this origin.
    NegativeCaching bool
    Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
    NegativeCachingPolicies []BackendBucketCdnPolicyNegativeCachingPolicy
    Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs. Structure is documented below.
    RequestCoalescing bool
    If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
    ServeWhileStale int
    Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache.
    SignedUrlCacheMaxAgeSec int
    Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
    bypassCacheOnRequestHeaders List<BackendBucketCdnPolicyBypassCacheOnRequestHeader>
    Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. Structure is documented below.
    cacheKeyPolicy BackendBucketCdnPolicyCacheKeyPolicy
    The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
    cacheMode String
    Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL, CACHE_ALL_STATIC.
    clientTtl Integer
    Specifies the maximum allowed TTL for cached content served by this origin.
    defaultTtl Integer
    Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age).
    maxTtl Integer
    Specifies the maximum allowed TTL for cached content served by this origin.
    negativeCaching Boolean
    Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
    negativeCachingPolicies List<BackendBucketCdnPolicyNegativeCachingPolicy>
    Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs. Structure is documented below.
    requestCoalescing Boolean
    If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
    serveWhileStale Integer
    Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache.
    signedUrlCacheMaxAgeSec Integer
    Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
    bypassCacheOnRequestHeaders BackendBucketCdnPolicyBypassCacheOnRequestHeader[]
    Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. Structure is documented below.
    cacheKeyPolicy BackendBucketCdnPolicyCacheKeyPolicy
    The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
    cacheMode string
    Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL, CACHE_ALL_STATIC.
    clientTtl number
    Specifies the maximum allowed TTL for cached content served by this origin.
    defaultTtl number
    Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age).
    maxTtl number
    Specifies the maximum allowed TTL for cached content served by this origin.
    negativeCaching boolean
    Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
    negativeCachingPolicies BackendBucketCdnPolicyNegativeCachingPolicy[]
    Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs. Structure is documented below.
    requestCoalescing boolean
    If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
    serveWhileStale number
    Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache.
    signedUrlCacheMaxAgeSec number
    Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
    bypass_cache_on_request_headers Sequence[BackendBucketCdnPolicyBypassCacheOnRequestHeader]
    Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. Structure is documented below.
    cache_key_policy BackendBucketCdnPolicyCacheKeyPolicy
    The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
    cache_mode str
    Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL, CACHE_ALL_STATIC.
    client_ttl int
    Specifies the maximum allowed TTL for cached content served by this origin.
    default_ttl int
    Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age).
    max_ttl int
    Specifies the maximum allowed TTL for cached content served by this origin.
    negative_caching bool
    Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
    negative_caching_policies Sequence[BackendBucketCdnPolicyNegativeCachingPolicy]
    Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs. Structure is documented below.
    request_coalescing bool
    If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
    serve_while_stale int
    Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache.
    signed_url_cache_max_age_sec int
    Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
    bypassCacheOnRequestHeaders List<Property Map>
    Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. Structure is documented below.
    cacheKeyPolicy Property Map
    The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
    cacheMode String
    Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL, CACHE_ALL_STATIC.
    clientTtl Number
    Specifies the maximum allowed TTL for cached content served by this origin.
    defaultTtl Number
    Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age).
    maxTtl Number
    Specifies the maximum allowed TTL for cached content served by this origin.
    negativeCaching Boolean
    Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
    negativeCachingPolicies List<Property Map>
    Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs. Structure is documented below.
    requestCoalescing Boolean
    If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
    serveWhileStale Number
    Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache.
    signedUrlCacheMaxAgeSec Number
    Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.

    BackendBucketCdnPolicyBypassCacheOnRequestHeader, BackendBucketCdnPolicyBypassCacheOnRequestHeaderArgs

    HeaderName string
    The header field name to match on when bypassing cache. Values are case-insensitive.
    HeaderName string
    The header field name to match on when bypassing cache. Values are case-insensitive.
    headerName String
    The header field name to match on when bypassing cache. Values are case-insensitive.
    headerName string
    The header field name to match on when bypassing cache. Values are case-insensitive.
    header_name str
    The header field name to match on when bypassing cache. Values are case-insensitive.
    headerName String
    The header field name to match on when bypassing cache. Values are case-insensitive.

    BackendBucketCdnPolicyCacheKeyPolicy, BackendBucketCdnPolicyCacheKeyPolicyArgs

    IncludeHttpHeaders List<string>
    Allows HTTP request headers (by name) to be used in the cache key.
    QueryStringWhitelists List<string>
    Names of query string parameters to include in cache keys. Default parameters are always included. '&' and '=' will be percent encoded and not treated as delimiters.
    IncludeHttpHeaders []string
    Allows HTTP request headers (by name) to be used in the cache key.
    QueryStringWhitelists []string
    Names of query string parameters to include in cache keys. Default parameters are always included. '&' and '=' will be percent encoded and not treated as delimiters.
    includeHttpHeaders List<String>
    Allows HTTP request headers (by name) to be used in the cache key.
    queryStringWhitelists List<String>
    Names of query string parameters to include in cache keys. Default parameters are always included. '&' and '=' will be percent encoded and not treated as delimiters.
    includeHttpHeaders string[]
    Allows HTTP request headers (by name) to be used in the cache key.
    queryStringWhitelists string[]
    Names of query string parameters to include in cache keys. Default parameters are always included. '&' and '=' will be percent encoded and not treated as delimiters.
    include_http_headers Sequence[str]
    Allows HTTP request headers (by name) to be used in the cache key.
    query_string_whitelists Sequence[str]
    Names of query string parameters to include in cache keys. Default parameters are always included. '&' and '=' will be percent encoded and not treated as delimiters.
    includeHttpHeaders List<String>
    Allows HTTP request headers (by name) to be used in the cache key.
    queryStringWhitelists List<String>
    Names of query string parameters to include in cache keys. Default parameters are always included. '&' and '=' will be percent encoded and not treated as delimiters.

    BackendBucketCdnPolicyNegativeCachingPolicy, BackendBucketCdnPolicyNegativeCachingPolicyArgs

    Code int
    The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.
    Ttl int
    The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
    Code int
    The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.
    Ttl int
    The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
    code Integer
    The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.
    ttl Integer
    The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
    code number
    The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.
    ttl number
    The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
    code int
    The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.
    ttl int
    The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
    code Number
    The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.
    ttl Number
    The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.

    Import

    BackendBucket can be imported using any of these accepted formats:

    • projects/{{project}}/global/backendBuckets/{{name}}

    • {{project}}/{{name}}

    • {{name}}

    When using the pulumi import command, BackendBucket can be imported using one of the formats above. For example:

    $ pulumi import gcp:compute/backendBucket:BackendBucket default projects/{{project}}/global/backendBuckets/{{name}}
    
    $ pulumi import gcp:compute/backendBucket:BackendBucket default {{project}}/{{name}}
    
    $ pulumi import gcp:compute/backendBucket:BackendBucket default {{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.18.0 published on Wednesday, Apr 10, 2024 by Pulumi