1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. BackendBucket
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi

gcp.compute.BackendBucket

Explore with Pulumi AI

gcp logo
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 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

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var imageBucket = new Gcp.Storage.Bucket("imageBucket", new()
        {
            Location = "EU",
        });
    
        var imageBackend = new Gcp.Compute.BackendBucket("imageBackend", new()
        {
            Description = "Contains beautiful images",
            BucketName = imageBucket.Name,
            EnableCdn = true,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v6/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, "imageBucket", &storage.BucketArgs{
    			Location: pulumi.String("EU"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewBackendBucket(ctx, "imageBackend", &compute.BackendBucketArgs{
    			Description: pulumi.String("Contains beautiful images"),
    			BucketName:  imageBucket.Name,
    			EnableCdn:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()        
                .location("EU")
                .build());
    
            var imageBackend = new BackendBucket("imageBackend", BackendBucketArgs.builder()        
                .description("Contains beautiful images")
                .bucketName(imageBucket.name())
                .enableCdn(true)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    image_bucket = gcp.storage.Bucket("imageBucket", location="EU")
    image_backend = gcp.compute.BackendBucket("imageBackend",
        description="Contains beautiful images",
        bucket_name=image_bucket.name,
        enable_cdn=True)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const imageBucket = new gcp.storage.Bucket("imageBucket", {location: "EU"});
    const imageBackend = new gcp.compute.BackendBucket("imageBackend", {
        description: "Contains beautiful images",
        bucketName: imageBucket.name,
        enableCdn: true,
    });
    
    resources:
      imageBackend:
        type: gcp:compute:BackendBucket
        properties:
          description: Contains beautiful images
          bucketName: ${imageBucket.name}
          enableCdn: true
      imageBucket:
        type: gcp:storage:Bucket
        properties:
          location: EU
    

    Backend Bucket Security Policy

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var imageBackendBucket = new Gcp.Storage.Bucket("imageBackendBucket", new()
        {
            Location = "EU",
        });
    
        var policy = new Gcp.Compute.SecurityPolicy("policy", new()
        {
            Description = "basic security policy",
            Type = "CLOUD_ARMOR_EDGE",
        });
    
        var imageBackendBackendBucket = new Gcp.Compute.BackendBucket("imageBackendBackendBucket", new()
        {
            Description = "Contains beautiful images",
            BucketName = imageBackendBucket.Name,
            EnableCdn = true,
            EdgeSecurityPolicy = policy.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v6/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, "imageBackendBucket", &storage.BucketArgs{
    			Location: pulumi.String("EU"),
    		})
    		if err != nil {
    			return err
    		}
    		policy, err := compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
    			Description: pulumi.String("basic security policy"),
    			Type:        pulumi.String("CLOUD_ARMOR_EDGE"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewBackendBucket(ctx, "imageBackendBackendBucket", &compute.BackendBucketArgs{
    			Description:        pulumi.String("Contains beautiful images"),
    			BucketName:         imageBackendBucket.Name,
    			EnableCdn:          pulumi.Bool(true),
    			EdgeSecurityPolicy: policy.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()        
                .location("EU")
                .build());
    
            var policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()        
                .description("basic security policy")
                .type("CLOUD_ARMOR_EDGE")
                .build());
    
            var imageBackendBackendBucket = new BackendBucket("imageBackendBackendBucket", BackendBucketArgs.builder()        
                .description("Contains beautiful images")
                .bucketName(imageBackendBucket.name())
                .enableCdn(true)
                .edgeSecurityPolicy(policy.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    image_backend_bucket = gcp.storage.Bucket("imageBackendBucket", location="EU")
    policy = gcp.compute.SecurityPolicy("policy",
        description="basic security policy",
        type="CLOUD_ARMOR_EDGE")
    image_backend_backend_bucket = gcp.compute.BackendBucket("imageBackendBackendBucket",
        description="Contains beautiful images",
        bucket_name=image_backend_bucket.name,
        enable_cdn=True,
        edge_security_policy=policy.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const imageBackendBucket = new gcp.storage.Bucket("imageBackendBucket", {location: "EU"});
    const policy = new gcp.compute.SecurityPolicy("policy", {
        description: "basic security policy",
        type: "CLOUD_ARMOR_EDGE",
    });
    const imageBackendBackendBucket = new gcp.compute.BackendBucket("imageBackendBackendBucket", {
        description: "Contains beautiful images",
        bucketName: imageBackendBucket.name,
        enableCdn: true,
        edgeSecurityPolicy: policy.id,
    });
    
    resources:
      imageBackendBackendBucket:
        type: gcp:compute:BackendBucket
        properties:
          description: Contains beautiful images
          bucketName: ${imageBackendBucket.name}
          enableCdn: true
          edgeSecurityPolicy: ${policy.id}
      imageBackendBucket:
        type: gcp:storage:Bucket
        properties:
          location: EU
      policy:
        type: gcp:compute:SecurityPolicy
        properties:
          description: basic security policy
          type: CLOUD_ARMOR_EDGE
    

    Backend Bucket Query String Whitelist

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var imageBucket = new Gcp.Storage.Bucket("imageBucket", new()
        {
            Location = "EU",
        });
    
        var imageBackend = new Gcp.Compute.BackendBucket("imageBackend", new()
        {
            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 main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v6/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, "imageBucket", &storage.BucketArgs{
    			Location: pulumi.String("EU"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewBackendBucket(ctx, "imageBackend", &compute.BackendBucketArgs{
    			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
    	})
    }
    
    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()        
                .location("EU")
                .build());
    
            var imageBackend = new BackendBucket("imageBackend", BackendBucketArgs.builder()        
                .description("Contains beautiful images")
                .bucketName(imageBucket.name())
                .enableCdn(true)
                .cdnPolicy(BackendBucketCdnPolicyArgs.builder()
                    .cacheKeyPolicy(BackendBucketCdnPolicyCacheKeyPolicyArgs.builder()
                        .queryStringWhitelists("image-version")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    image_bucket = gcp.storage.Bucket("imageBucket", location="EU")
    image_backend = gcp.compute.BackendBucket("imageBackend",
        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"],
            ),
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const imageBucket = new gcp.storage.Bucket("imageBucket", {location: "EU"});
    const imageBackend = new gcp.compute.BackendBucket("imageBackend", {
        description: "Contains beautiful images",
        bucketName: imageBucket.name,
        enableCdn: true,
        cdnPolicy: {
            cacheKeyPolicy: {
                queryStringWhitelists: ["image-version"],
            },
        },
    });
    
    resources:
      imageBackend:
        type: gcp:compute:BackendBucket
        properties:
          description: Contains beautiful images
          bucketName: ${imageBucket.name}
          enableCdn: true
          cdnPolicy:
            cacheKeyPolicy:
              queryStringWhitelists:
                - image-version
      imageBucket:
        type: gcp:storage:Bucket
        properties:
          location: EU
    

    Backend Bucket Include Http Headers

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var imageBucket = new Gcp.Storage.Bucket("imageBucket", new()
        {
            Location = "EU",
        });
    
        var imageBackend = new Gcp.Compute.BackendBucket("imageBackend", new()
        {
            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 main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v6/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, "imageBucket", &storage.BucketArgs{
    			Location: pulumi.String("EU"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewBackendBucket(ctx, "imageBackend", &compute.BackendBucketArgs{
    			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
    	})
    }
    
    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()        
                .location("EU")
                .build());
    
            var imageBackend = new BackendBucket("imageBackend", BackendBucketArgs.builder()        
                .description("Contains beautiful images")
                .bucketName(imageBucket.name())
                .enableCdn(true)
                .cdnPolicy(BackendBucketCdnPolicyArgs.builder()
                    .cacheKeyPolicy(BackendBucketCdnPolicyCacheKeyPolicyArgs.builder()
                        .includeHttpHeaders("X-My-Header-Field")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    image_bucket = gcp.storage.Bucket("imageBucket", location="EU")
    image_backend = gcp.compute.BackendBucket("imageBackend",
        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"],
            ),
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const imageBucket = new gcp.storage.Bucket("imageBucket", {location: "EU"});
    const imageBackend = new gcp.compute.BackendBucket("imageBackend", {
        description: "Contains beautiful images",
        bucketName: imageBucket.name,
        enableCdn: true,
        cdnPolicy: {
            cacheKeyPolicy: {
                includeHttpHeaders: ["X-My-Header-Field"],
            },
        },
    });
    
    resources:
      imageBackend:
        type: gcp:compute:BackendBucket
        properties:
          description: Contains beautiful images
          bucketName: ${imageBucket.name}
          enableCdn: true
          cdnPolicy:
            cacheKeyPolicy:
              includeHttpHeaders:
                - X-My-Header-Field
      imageBucket:
        type: gcp:storage:Bucket
        properties:
          location: EU
    

    Create BackendBucket Resource

    new BackendBucket(name: string, args: BackendBucketArgs, opts?: CustomResourceOptions);
    @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)
    @overload
    def BackendBucket(resource_name: str,
                      args: BackendBucketArgs,
                      opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

     $ 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}}
    

    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 v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi