1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getBackendBucket
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.compute.getBackendBucket

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:compute/getBackendBucket:getBackendBucket
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the resource.


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


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


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


    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    name str
    Name of the resource.


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


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

    getBackendBucket Result

    The following output properties are available:

    BucketName string
    CdnPolicies List<GetBackendBucketCdnPolicy>
    CompressionMode string
    CreationTimestamp string
    CustomResponseHeaders List<string>
    Description string
    EdgeSecurityPolicy string
    EnableCdn bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    SelfLink string
    Project string
    BucketName string
    CdnPolicies []GetBackendBucketCdnPolicy
    CompressionMode string
    CreationTimestamp string
    CustomResponseHeaders []string
    Description string
    EdgeSecurityPolicy string
    EnableCdn bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    SelfLink string
    Project string
    bucketName String
    cdnPolicies List<GetBackendBucketCdnPolicy>
    compressionMode String
    creationTimestamp String
    customResponseHeaders List<String>
    description String
    edgeSecurityPolicy String
    enableCdn Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    selfLink String
    project String
    bucketName string
    cdnPolicies GetBackendBucketCdnPolicy[]
    compressionMode string
    creationTimestamp string
    customResponseHeaders string[]
    description string
    edgeSecurityPolicy string
    enableCdn boolean
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    selfLink string
    project string
    bucketName String
    cdnPolicies List<Property Map>
    compressionMode String
    creationTimestamp String
    customResponseHeaders List<String>
    description String
    edgeSecurityPolicy String
    enableCdn Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    selfLink String
    project String

    Supporting Types

    GetBackendBucketCdnPolicy

    BypassCacheOnRequestHeaders List<GetBackendBucketCdnPolicyBypassCacheOnRequestHeader>
    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.
    CacheKeyPolicies List<GetBackendBucketCdnPolicyCacheKeyPolicy>
    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.
    NegativeCachingPolicies List<GetBackendBucketCdnPolicyNegativeCachingPolicy>
    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.
    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 []GetBackendBucketCdnPolicyBypassCacheOnRequestHeader
    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.
    CacheKeyPolicies []GetBackendBucketCdnPolicyCacheKeyPolicy
    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.
    NegativeCachingPolicies []GetBackendBucketCdnPolicyNegativeCachingPolicy
    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.
    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<GetBackendBucketCdnPolicyBypassCacheOnRequestHeader>
    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.
    cacheKeyPolicies List<GetBackendBucketCdnPolicyCacheKeyPolicy>
    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.
    negativeCachingPolicies List<GetBackendBucketCdnPolicyNegativeCachingPolicy>
    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.
    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 GetBackendBucketCdnPolicyBypassCacheOnRequestHeader[]
    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.
    cacheKeyPolicies GetBackendBucketCdnPolicyCacheKeyPolicy[]
    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.
    negativeCachingPolicies GetBackendBucketCdnPolicyNegativeCachingPolicy[]
    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.
    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[GetBackendBucketCdnPolicyBypassCacheOnRequestHeader]
    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_policies Sequence[GetBackendBucketCdnPolicyCacheKeyPolicy]
    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_policies Sequence[GetBackendBucketCdnPolicyNegativeCachingPolicy]
    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_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.
    cacheKeyPolicies List<Property Map>
    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.
    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.
    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.

    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

    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.

    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-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi