gcp.compute.BackendBucket
Explore with Pulumi AI
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/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/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/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/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={
"cache_key_policy": {
"query_string_whitelists": ["image-version"],
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/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={
"cache_key_policy": {
"include_http_headers": ["X-My-Header-Field"],
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/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.
Constructor 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={
"bypass_cache_on_request_headers": [{
"header_name": "string",
}],
"cache_key_policy": {
"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": [{
"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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BackendBucket resource accepts the following input properties:
- Bucket
Name string - Cloud Storage bucket name.
- Cdn
Policy BackendBucket Cdn Policy - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- Compression
Mode string - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - Custom
Response List<string>Headers - 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.
- Edge
Security stringPolicy - The security policy associated with this backend bucket.
- Enable
Cdn 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.
- Bucket
Name string - Cloud Storage bucket name.
- Cdn
Policy BackendBucket Cdn Policy Args - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- Compression
Mode string - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - Custom
Response []stringHeaders - 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.
- Edge
Security stringPolicy - The security policy associated with this backend bucket.
- Enable
Cdn 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.
- bucket
Name String - Cloud Storage bucket name.
- cdn
Policy BackendBucket Cdn Policy - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- compression
Mode String - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - custom
Response List<String>Headers - 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.
- edge
Security StringPolicy - The security policy associated with this backend bucket.
- enable
Cdn 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 string - Cloud Storage bucket name.
- cdn
Policy BackendBucket Cdn Policy - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- compression
Mode string - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - custom
Response string[]Headers - 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.
- edge
Security stringPolicy - The security policy associated with this backend bucket.
- enable
Cdn 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 BackendBucket Cdn Policy Args - 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_ Sequence[str]headers - 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_ strpolicy - 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.
- bucket
Name String - Cloud Storage bucket name.
- cdn
Policy Property Map - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- compression
Mode String - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - custom
Response List<String>Headers - 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.
- edge
Security StringPolicy - The security policy associated with this backend bucket.
- enable
Cdn 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:
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link string - The URI of the created resource.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link string - The URI of the created resource.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Link String - The URI of the created resource.
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- id string
- The provider-assigned unique ID for this managed resource.
- self
Link 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.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Link 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.
- Bucket
Name string - Cloud Storage bucket name.
- Cdn
Policy BackendBucket Cdn Policy - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- Compression
Mode string - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Custom
Response List<string>Headers - 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.
- Edge
Security stringPolicy - The security policy associated with this backend bucket.
- Enable
Cdn 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.
- Self
Link string - The URI of the created resource.
- Bucket
Name string - Cloud Storage bucket name.
- Cdn
Policy BackendBucket Cdn Policy Args - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- Compression
Mode string - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Custom
Response []stringHeaders - 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.
- Edge
Security stringPolicy - The security policy associated with this backend bucket.
- Enable
Cdn 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.
- Self
Link string - The URI of the created resource.
- bucket
Name String - Cloud Storage bucket name.
- cdn
Policy BackendBucket Cdn Policy - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- compression
Mode String - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - creation
Timestamp String - Creation timestamp in RFC3339 text format.
- custom
Response List<String>Headers - 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.
- edge
Security StringPolicy - The security policy associated with this backend bucket.
- enable
Cdn 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.
- self
Link String - The URI of the created resource.
- bucket
Name string - Cloud Storage bucket name.
- cdn
Policy BackendBucket Cdn Policy - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- compression
Mode string - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - creation
Timestamp string - Creation timestamp in RFC3339 text format.
- custom
Response string[]Headers - 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.
- edge
Security stringPolicy - The security policy associated with this backend bucket.
- enable
Cdn 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.
- self
Link string - The URI of the created resource.
- bucket_
name str - Cloud Storage bucket name.
- cdn_
policy BackendBucket Cdn Policy Args - 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_ Sequence[str]headers - 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_ strpolicy - 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.
- bucket
Name String - Cloud Storage bucket name.
- cdn
Policy Property Map - Cloud CDN configuration for this Backend Bucket. Structure is documented below.
- compression
Mode String - Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
Possible values are:
AUTOMATIC
,DISABLED
. - creation
Timestamp String - Creation timestamp in RFC3339 text format.
- custom
Response List<String>Headers - 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.
- edge
Security StringPolicy - The security policy associated with this backend bucket.
- enable
Cdn 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.
- self
Link String - The URI of the created resource.
Supporting Types
BackendBucketCdnPolicy, BackendBucketCdnPolicyArgs
- Bypass
Cache List<BackendOn Request Headers Bucket Cdn Policy Bypass Cache On Request Header> - 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 BackendPolicy Bucket Cdn Policy Cache Key Policy - The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
- Cache
Mode 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
. - 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 List<BackendPolicies Bucket Cdn Policy Negative Caching Policy> - 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 intStale - 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 intCache Max Age Sec - 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 []BackendOn Request Headers Bucket Cdn Policy Bypass Cache On Request Header - 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 BackendPolicy Bucket Cdn Policy Cache Key Policy - The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
- Cache
Mode 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
. - 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 []BackendPolicies Bucket Cdn Policy Negative Caching Policy - 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 intStale - 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 intCache Max Age Sec - 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 List<BackendOn Request Headers Bucket Cdn Policy Bypass Cache On Request Header> - 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 BackendPolicy Bucket Cdn Policy Cache Key Policy - The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
- cache
Mode 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
. - client
Ttl Integer - Specifies the maximum allowed TTL for cached content served by this origin.
- default
Ttl 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).
- max
Ttl Integer - Specifies the maximum allowed TTL for cached content served by this origin.
- negative
Caching Boolean - Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
- negative
Caching List<BackendPolicies Bucket Cdn Policy Negative Caching Policy> - 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 Boolean - If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
- serve
While IntegerStale - 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 IntegerCache Max Age Sec - 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 BackendOn Request Headers Bucket Cdn Policy Bypass Cache On Request Header[] - 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 BackendPolicy Bucket Cdn Policy Cache Key Policy - The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
- cache
Mode 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
. - client
Ttl number - Specifies the maximum allowed TTL for cached content served by this origin.
- default
Ttl 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).
- max
Ttl number - Specifies the maximum allowed TTL for cached content served by this origin.
- negative
Caching boolean - Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
- negative
Caching BackendPolicies Bucket Cdn Policy Negative Caching Policy[] - 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 boolean - If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
- serve
While numberStale - 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 numberCache Max Age Sec - 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_ Sequence[Backendon_ request_ headers Bucket Cdn Policy Bypass Cache On Request Header] - 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_ Backendpolicy Bucket Cdn Policy Cache Key Policy - 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_ Sequence[Backendpolicies Bucket Cdn Policy Negative Caching Policy] - 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_ intstale - 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_ intcache_ max_ age_ sec - 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 List<Property Map>On Request Headers - 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 Property MapPolicy - The CacheKeyPolicy for this CdnPolicy. Structure is documented below.
- cache
Mode 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
. - client
Ttl Number - Specifies the maximum allowed TTL for cached content served by this origin.
- default
Ttl 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).
- max
Ttl Number - Specifies the maximum allowed TTL for cached content served by this origin.
- negative
Caching Boolean - Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
- negative
Caching List<Property Map>Policies - 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 Boolean - If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
- serve
While NumberStale - 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 NumberCache Max Age Sec - 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
- Header
Name string - The header field name to match on when bypassing cache. Values are case-insensitive.
- Header
Name string - The header field name to match on when bypassing cache. Values are case-insensitive.
- header
Name String - The header field name to match on when bypassing cache. Values are case-insensitive.
- header
Name 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.
- header
Name String - The header field name to match on when bypassing cache. Values are case-insensitive.
BackendBucketCdnPolicyCacheKeyPolicy, BackendBucketCdnPolicyCacheKeyPolicyArgs
- Include
Http List<string>Headers - Allows HTTP request headers (by name) to be used in the cache key.
- Query
String List<string>Whitelists - 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 []stringHeaders - Allows HTTP request headers (by name) to be used in the cache key.
- Query
String []stringWhitelists - 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 List<String>Headers - Allows HTTP request headers (by name) to be used in the cache key.
- query
String List<String>Whitelists - 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 string[]Headers - Allows HTTP request headers (by name) to be used in the cache key.
- query
String string[]Whitelists - 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_ Sequence[str]headers - Allows HTTP request headers (by name) to be used in the cache key.
- query_
string_ Sequence[str]whitelists - 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 List<String>Headers - Allows HTTP request headers (by name) to be used in the cache key.
- query
String List<String>Whitelists - 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.