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:

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 withRFC1035. 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](?:[-a-z0-9]{0,61}[a-z0-9])?)
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. (AUTOMATIC, DISABLED)
creationTimestampstring[Output Only] Creation timestamp inRFC3339 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.
kindstringOutput only. Type 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. (EXTERNAL_MANAGED, INTERNAL_MANAGED)
paramsobjectInput only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. (id: BackendBucketParams)
regionstringOutput only. [Output Only] URL of the region where the regional backend bucket resides. This field is not applicable to global backend buckets. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
selfLinkstring[Output Only] Server-defined URL for the resource.
usedByarrayOutput only. [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.
listselectprojectreturnPartialSuccess, orderBy, filter, maxResults, pageTokenRetrieves the list of BackendBucket resources available to the specified
project.
aggregated_listselectprojectreturnPartialSuccess, includeAllScopes, orderBy, filter, serviceProjectNumber, maxResults, pageTokenRetrieves the list of all BackendBucket resources, regional and global,
available to the specified project.

To prevent failure, it is recommended that you set the
returnPartialSuccess parameter to true.
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 supportsPATCH
semantics and uses theJSON 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
includeAllScopesboolean
maxResultsinteger (uint32)
orderBystring
pageTokenstring
requestIdstring
returnPartialSuccessboolean
serviceProjectNumberstring (int64)

SELECT examples

Returns the specified BackendBucket resource.

SELECT
id,
name,
bucketName,
cdnPolicy,
compressionMode,
creationTimestamp,
customResponseHeaders,
description,
edgeSecurityPolicy,
enableCdn,
kind,
loadBalancingScheme,
params,
region,
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__customResponseHeaders,
data__loadBalancingScheme,
data__description,
data__compressionMode,
data__id,
data__selfLink,
data__name,
data__params,
data__cdnPolicy,
data__edgeSecurityPolicy,
data__creationTimestamp,
data__enableCdn,
data__bucketName,
project,
requestId
)
SELECT
'{{ customResponseHeaders }}',
'{{ loadBalancingScheme }}',
'{{ description }}',
'{{ compressionMode }}',
'{{ id }}',
'{{ selfLink }}',
'{{ name }}',
'{{ params }}',
'{{ cdnPolicy }}',
'{{ edgeSecurityPolicy }}',
'{{ creationTimestamp }}',
{{ enableCdn }},
'{{ bucketName }}',
'{{ project }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
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 supportsPATCH
semantics and uses theJSON merge
patch format and processing rules.

UPDATE google.compute.backend_buckets
SET
data__customResponseHeaders = '{{ customResponseHeaders }}',
data__loadBalancingScheme = '{{ loadBalancingScheme }}',
data__description = '{{ description }}',
data__compressionMode = '{{ compressionMode }}',
data__id = '{{ id }}',
data__selfLink = '{{ selfLink }}',
data__name = '{{ name }}',
data__params = '{{ params }}',
data__cdnPolicy = '{{ cdnPolicy }}',
data__edgeSecurityPolicy = '{{ edgeSecurityPolicy }}',
data__creationTimestamp = '{{ creationTimestamp }}',
data__enableCdn = {{ enableCdn }},
data__bucketName = '{{ bucketName }}'
WHERE
project = '{{ project }}' --required
AND backendBucket = '{{ backendBucket }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
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__customResponseHeaders = '{{ customResponseHeaders }}',
data__loadBalancingScheme = '{{ loadBalancingScheme }}',
data__description = '{{ description }}',
data__compressionMode = '{{ compressionMode }}',
data__id = '{{ id }}',
data__selfLink = '{{ selfLink }}',
data__name = '{{ name }}',
data__params = '{{ params }}',
data__cdnPolicy = '{{ cdnPolicy }}',
data__edgeSecurityPolicy = '{{ edgeSecurityPolicy }}',
data__creationTimestamp = '{{ creationTimestamp }}',
data__enableCdn = {{ enableCdn }},
data__bucketName = '{{ bucketName }}'
WHERE
project = '{{ project }}' --required
AND backendBucket = '{{ backendBucket }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
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=
'{
"keyValue": "{{ keyValue }}",
"keyName": "{{ keyName }}"
}'
;