Skip to main content

backend_buckets

Creates, updates, deletes, gets or lists a backend_buckets resource.

Overview

Namebackend_buckets
TypeResource
Idgoogle.compute.backend_buckets

Fields

NameDatatypeDescription
idstring[Output Only] Unique identifier for the resource; defined by the server.
namestringName 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]([-a-z0-9]*[a-z0-9])? 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.
descriptionstringAn optional textual description of the resource; provided by the client when the resource is created.
bucketNamestringCloud Storage bucket name.
cdnPolicyobjectMessage containing Cloud CDN configuration for a backend bucket.
compressionModestringCompress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
customResponseHeadersarrayHeaders that the Application Load Balancer should add to proxied responses.
edgeSecurityPolicystring[Output Only] The resource URL for the edge security policy associated with this backend bucket.
enableCdnbooleanIf true, enable Cloud CDN for this BackendBucket.
kindstringType of the resource.
selfLinkstring[Output Only] Server-defined URL for the resource.
usedByarray[Output Only] List of resources referencing that backend bucket.

Methods

NameAccessible byRequired ParamsDescription
getSELECTbackendBucket, projectReturns the specified BackendBucket resource.
listSELECTprojectRetrieves the list of BackendBucket resources available to the specified project.
insertINSERTprojectCreates a BackendBucket resource in the specified project using the data included in the request.
deleteDELETEbackendBucket, projectDeletes the specified BackendBucket resource.
patchUPDATEbackendBucket, projectUpdates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
updateREPLACEbackendBucket, projectUpdates the specified BackendBucket resource with the data included in the request.
set_edge_security_policyEXECbackendBucket, projectSets the edge security policy for the specified backend bucket.

SELECT examples

Retrieves the list of BackendBucket resources available to the specified project.

SELECT
id,
name,
description,
bucketName,
cdnPolicy,
compressionMode,
creationTimestamp,
customResponseHeaders,
edgeSecurityPolicy,
enableCdn,
kind,
selfLink,
usedBy
FROM google.compute.backend_buckets
WHERE project = '{{ project }}';

INSERT example

Use the following StackQL query and manifest file to create a new backend_buckets resource.

/*+ create */
INSERT INTO google.compute.backend_buckets (
project,
name,
description,
bucketName,
enableCdn,
cdnPolicy,
customResponseHeaders,
edgeSecurityPolicy,
compressionMode,
usedBy
)
SELECT
'{{ project }}',
'{{ name }}',
'{{ description }}',
'{{ bucketName }}',
{{ enableCdn }},
'{{ cdnPolicy }}',
'{{ customResponseHeaders }}',
'{{ edgeSecurityPolicy }}',
'{{ compressionMode }}',
'{{ usedBy }}'
;

UPDATE example

Updates a backend_buckets resource.

/*+ update */
UPDATE google.compute.backend_buckets
SET
name = '{{ name }}',
description = '{{ description }}',
bucketName = '{{ bucketName }}',
enableCdn = true|false,
cdnPolicy = '{{ cdnPolicy }}',
customResponseHeaders = '{{ customResponseHeaders }}',
edgeSecurityPolicy = '{{ edgeSecurityPolicy }}',
compressionMode = '{{ compressionMode }}',
usedBy = '{{ usedBy }}'
WHERE
backendBucket = '{{ backendBucket }}'
AND project = '{{ project }}';

REPLACE example

Replaces all fields in the specified backend_buckets resource.

/*+ update */
REPLACE google.compute.backend_buckets
SET
name = '{{ name }}',
description = '{{ description }}',
bucketName = '{{ bucketName }}',
enableCdn = true|false,
cdnPolicy = '{{ cdnPolicy }}',
customResponseHeaders = '{{ customResponseHeaders }}',
edgeSecurityPolicy = '{{ edgeSecurityPolicy }}',
compressionMode = '{{ compressionMode }}',
usedBy = '{{ usedBy }}'
WHERE
backendBucket = '{{ backendBucket }}'
AND project = '{{ project }}';

DELETE example

Deletes the specified backend_buckets resource.

/*+ delete */
DELETE FROM google.compute.backend_buckets
WHERE backendBucket = '{{ backendBucket }}'
AND project = '{{ project }}';