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

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstring (uint64)[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. (pattern: a-z?)
bucketNamestringCloud Storage bucket name.
cdnPolicyobjectCloud CDN configuration for this BackendBucket. (id: BackendBucketCdnPolicy)
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.
descriptionstringAn optional textual description of the resource; provided by the client when the resource is created.
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. (default: compute#backendBucket)
loadBalancingSchemestringThe value can only be INTERNAL_MANAGED for cross-region internal layer 7 load balancer. If loadBalancingScheme is not specified, the backend bucket can be used by classic global external load balancers, or global application external load balancers, or both.
paramsobjectInput only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. (id: BackendBucketParams)
selfLinkstring[Output Only] Server-defined URL for the resource.
usedByarray[Output Only] List of resources referencing that backend bucket.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject, backendBucketReturns the specified BackendBucket resource.
listselectprojectfilter, maxResults, orderBy, pageToken, returnPartialSuccessRetrieves the list of BackendBucket resources available to the specified project.
insertinsertprojectrequestIdCreates a BackendBucket resource in the specified project using the data included in the request.
patchupdateproject, backendBucketrequestIdUpdates 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.
updatereplaceproject, backendBucketrequestIdUpdates the specified BackendBucket resource with the data included in the request.
deletedeleteproject, backendBucketrequestIdDeletes the specified BackendBucket resource.
add_signed_url_keyexecproject, backendBucketrequestIdAdds a key for validating requests with signed URLs for this backend bucket.
delete_signed_url_keyexecproject, backendBucket, keyNamerequestIdDeletes a key for validating requests with signed URLs for this backend bucket.
set_edge_security_policyexecproject, backendBucketrequestIdSets the edge security policy for the specified backend bucket.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
backendBucketstring
keyNamestring
projectstring
filterstring
maxResultsinteger (uint32)
orderBystring
pageTokenstring
requestIdstring
returnPartialSuccessboolean

SELECT examples

Returns the specified BackendBucket resource.

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

INSERT examples

Creates a BackendBucket resource in the specified project using the data included in the request.

INSERT INTO google.compute.backend_buckets (
data__kind,
data__id,
data__creationTimestamp,
data__name,
data__description,
data__selfLink,
data__bucketName,
data__enableCdn,
data__cdnPolicy,
data__customResponseHeaders,
data__edgeSecurityPolicy,
data__compressionMode,
data__loadBalancingScheme,
data__params,
data__usedBy,
project,
requestId
)
SELECT
'{{ kind }}',
'{{ id }}',
'{{ creationTimestamp }}',
'{{ name }}',
'{{ description }}',
'{{ selfLink }}',
'{{ bucketName }}',
{{ enableCdn }},
'{{ cdnPolicy }}',
'{{ customResponseHeaders }}',
'{{ edgeSecurityPolicy }}',
'{{ compressionMode }}',
'{{ loadBalancingScheme }}',
'{{ params }}',
'{{ usedBy }}',
'{{ project }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;

UPDATE examples

Updates 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.

UPDATE google.compute.backend_buckets
SET
data__kind = '{{ kind }}',
data__id = '{{ id }}',
data__creationTimestamp = '{{ creationTimestamp }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__selfLink = '{{ selfLink }}',
data__bucketName = '{{ bucketName }}',
data__enableCdn = {{ enableCdn }},
data__cdnPolicy = '{{ cdnPolicy }}',
data__customResponseHeaders = '{{ customResponseHeaders }}',
data__edgeSecurityPolicy = '{{ edgeSecurityPolicy }}',
data__compressionMode = '{{ compressionMode }}',
data__loadBalancingScheme = '{{ loadBalancingScheme }}',
data__params = '{{ params }}',
data__usedBy = '{{ usedBy }}'
WHERE
project = '{{ project }}' --required
AND backendBucket = '{{ backendBucket }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;

REPLACE examples

Updates the specified BackendBucket resource with the data included in the request.

REPLACE google.compute.backend_buckets
SET
data__kind = '{{ kind }}',
data__id = '{{ id }}',
data__creationTimestamp = '{{ creationTimestamp }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__selfLink = '{{ selfLink }}',
data__bucketName = '{{ bucketName }}',
data__enableCdn = {{ enableCdn }},
data__cdnPolicy = '{{ cdnPolicy }}',
data__customResponseHeaders = '{{ customResponseHeaders }}',
data__edgeSecurityPolicy = '{{ edgeSecurityPolicy }}',
data__compressionMode = '{{ compressionMode }}',
data__loadBalancingScheme = '{{ loadBalancingScheme }}',
data__params = '{{ params }}',
data__usedBy = '{{ usedBy }}'
WHERE
project = '{{ project }}' --required
AND backendBucket = '{{ backendBucket }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;

DELETE examples

Deletes the specified BackendBucket resource.

DELETE FROM google.compute.backend_buckets
WHERE project = '{{ project }}' --required
AND backendBucket = '{{ backendBucket }}' --required
AND requestId = '{{ requestId }}';

Lifecycle Methods

Adds a key for validating requests with signed URLs for this backend bucket.

EXEC google.compute.backend_buckets.add_signed_url_key 
@project='{{ project }}' --required,
@backendBucket='{{ backendBucket }}' --required,
@requestId='{{ requestId }}'
@@json=
'{
"keyName": "{{ keyName }}",
"keyValue": "{{ keyValue }}"
}';