Google Cloud v8.21.0 published on Wednesday, Mar 5, 2025 by Pulumi
gcp.compute.getBackendBucket
Explore with Pulumi AI
Get information about a BackendBucket.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_backend_bucket = gcp.compute.getBackendBucket({
    name: "my-backend",
});
import pulumi
import pulumi_gcp as gcp
my_backend_bucket = gcp.compute.get_backend_bucket(name="my-backend")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.LookupBackendBucket(ctx, &compute.LookupBackendBucketArgs{
			Name: "my-backend",
		}, nil)
		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 my_backend_bucket = Gcp.Compute.GetBackendBucket.Invoke(new()
    {
        Name = "my-backend",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetBackendBucketArgs;
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) {
        final var my-backend-bucket = ComputeFunctions.getBackendBucket(GetBackendBucketArgs.builder()
            .name("my-backend")
            .build());
    }
}
variables:
  my-backend-bucket:
    fn::invoke:
      function: gcp:compute:getBackendBucket
      arguments:
        name: my-backend
Using getBackendBucket
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBackendBucket(args: GetBackendBucketArgs, opts?: InvokeOptions): Promise<GetBackendBucketResult>
function getBackendBucketOutput(args: GetBackendBucketOutputArgs, opts?: InvokeOptions): Output<GetBackendBucketResult>def get_backend_bucket(name: Optional[str] = None,
                       project: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetBackendBucketResult
def get_backend_bucket_output(name: Optional[pulumi.Input[str]] = None,
                       project: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetBackendBucketResult]func LookupBackendBucket(ctx *Context, args *LookupBackendBucketArgs, opts ...InvokeOption) (*LookupBackendBucketResult, error)
func LookupBackendBucketOutput(ctx *Context, args *LookupBackendBucketOutputArgs, opts ...InvokeOption) LookupBackendBucketResultOutput> Note: This function is named LookupBackendBucket in the Go SDK.
public static class GetBackendBucket 
{
    public static Task<GetBackendBucketResult> InvokeAsync(GetBackendBucketArgs args, InvokeOptions? opts = null)
    public static Output<GetBackendBucketResult> Invoke(GetBackendBucketInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBackendBucketResult> getBackendBucket(GetBackendBucketArgs args, InvokeOptions options)
public static Output<GetBackendBucketResult> getBackendBucket(GetBackendBucketArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:compute/getBackendBucket:getBackendBucket
  arguments:
    # arguments dictionaryThe following arguments are supported:
getBackendBucket Result
The following output properties are available:
- BucketName string
- CdnPolicies List<GetBackend Bucket Cdn Policy> 
- CompressionMode string
- CreationTimestamp string
- CustomResponse List<string>Headers 
- Description string
- EdgeSecurity stringPolicy 
- EnableCdn bool
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- SelfLink string
- Project string
- BucketName string
- CdnPolicies []GetBackend Bucket Cdn Policy 
- CompressionMode string
- CreationTimestamp string
- CustomResponse []stringHeaders 
- Description string
- EdgeSecurity stringPolicy 
- EnableCdn bool
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- SelfLink string
- Project string
- bucketName String
- cdnPolicies List<GetBackend Bucket Cdn Policy> 
- compressionMode String
- creationTimestamp String
- customResponse List<String>Headers 
- description String
- edgeSecurity StringPolicy 
- enableCdn Boolean
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- selfLink String
- project String
- bucketName string
- cdnPolicies GetBackend Bucket Cdn Policy[] 
- compressionMode string
- creationTimestamp string
- customResponse string[]Headers 
- description string
- edgeSecurity stringPolicy 
- enableCdn boolean
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- selfLink string
- project string
- bucket_name str
- cdn_policies Sequence[GetBackend Bucket Cdn Policy] 
- compression_mode str
- creation_timestamp str
- custom_response_ Sequence[str]headers 
- description str
- edge_security_ strpolicy 
- enable_cdn bool
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- self_link str
- project str
- bucketName String
- cdnPolicies List<Property Map>
- compressionMode String
- creationTimestamp String
- customResponse List<String>Headers 
- description String
- edgeSecurity StringPolicy 
- enableCdn Boolean
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- selfLink String
- project String
Supporting Types
GetBackendBucketCdnPolicy    
- BypassCache List<GetOn Request Headers Backend 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.
- CacheKey List<GetPolicies Backend Bucket Cdn Policy Cache Key Policy> 
- The CacheKeyPolicy for this CdnPolicy.
- 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: ["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.
- NegativeCaching List<GetPolicies Backend 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.
- RequestCoalescing bool
- If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
- ServeWhile 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.
- SignedUrl 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.
- BypassCache []GetOn Request Headers Backend 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.
- CacheKey []GetPolicies Backend Bucket Cdn Policy Cache Key Policy 
- The CacheKeyPolicy for this CdnPolicy.
- 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: ["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.
- NegativeCaching []GetPolicies Backend 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.
- RequestCoalescing bool
- If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
- ServeWhile 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.
- SignedUrl 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.
- bypassCache List<GetOn Request Headers Backend 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.
- cacheKey List<GetPolicies Backend Bucket Cdn Policy Cache Key Policy> 
- The CacheKeyPolicy for this CdnPolicy.
- 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: ["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.
- negativeCaching List<GetPolicies Backend 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.
- requestCoalescing Boolean
- If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
- serveWhile 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.
- signedUrl 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.
- bypassCache GetOn Request Headers Backend 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.
- cacheKey GetPolicies Backend Bucket Cdn Policy Cache Key Policy[] 
- The CacheKeyPolicy for this CdnPolicy.
- 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: ["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.
- negativeCaching GetPolicies Backend 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.
- requestCoalescing boolean
- If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
- serveWhile 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.
- signedUrl 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[Geton_ request_ headers Backend 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.
- cache_key_ Sequence[Getpolicies Backend Bucket Cdn Policy Cache Key Policy] 
- The CacheKeyPolicy for this CdnPolicy.
- 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: ["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[Getpolicies Backend 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.
- 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.
- bypassCache 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.
- cacheKey List<Property Map>Policies 
- The CacheKeyPolicy for this CdnPolicy.
- 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: ["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.
- negativeCaching 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.
- requestCoalescing Boolean
- If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
- serveWhile 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.
- signedUrl 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.
GetBackendBucketCdnPolicyBypassCacheOnRequestHeader         
- 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.
GetBackendBucketCdnPolicyCacheKeyPolicy       
- IncludeHttp List<string>Headers 
- Allows HTTP request headers (by name) to be used in the cache key.
- QueryString 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.
- IncludeHttp []stringHeaders 
- Allows HTTP request headers (by name) to be used in the cache key.
- QueryString []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.
- includeHttp List<String>Headers 
- Allows HTTP request headers (by name) to be used in the cache key.
- queryString 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.
- includeHttp string[]Headers 
- Allows HTTP request headers (by name) to be used in the cache key.
- queryString 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.
- includeHttp List<String>Headers 
- Allows HTTP request headers (by name) to be used in the cache key.
- queryString 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.
GetBackendBucketCdnPolicyNegativeCachingPolicy       
- 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.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.