Skip to main content

backup_channels

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

Overview

Namebackup_channels
TypeResource
Idgoogle.gkebackup.backup_channels

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The fully qualified name of the BackupChannel. projects/*/locations/*/backupChannels/*
createTimestring (google-datetime)Output only. The timestamp when this BackupChannel resource was created.
descriptionstringOptional. User specified descriptive string for this BackupChannel.
destinationProjectstringRequired. Immutable. The project where Backups are allowed to be stored. The format is projects/{projectId} or projects/{projectNumber}.
destinationProjectIdstringOutput only. The project_id where Backups are allowed to be stored. Example Project ID: "my-project-id". This will be an OUTPUT_ONLY field to return the project_id of the destination project.
etagstringOutput only. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a BackupChannel from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupChannel updates in order to avoid race conditions: An etag is returned in the response to GetBackupChannel, and systems are expected to put that etag in the request to UpdateBackupChannel or DeleteBackupChannel to ensure that their change will be applied to the same version of the resource.
labelsobjectOptional. A set of custom labels supplied by user.
uidstringOutput only. Server generated global unique identifier of UUID format.
updateTimestring (google-datetime)Output only. The timestamp when this BackupChannel resource was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, backupChannelsIdRetrieve the details of a single BackupChannel.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists BackupChannels in a given location.
createinsertprojectsId, locationsIdbackupChannelIdCreates a new BackupChannel in a given location.
patchupdateprojectsId, locationsId, backupChannelsIdupdateMaskUpdate a BackupChannel.
deletedeleteprojectsId, locationsId, backupChannelsIdetag, forceDeletes an existing BackupChannel.

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
backupChannelsIdstring
locationsIdstring
projectsIdstring
backupChannelIdstring
etagstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieve the details of a single BackupChannel.

SELECT
name,
createTime,
description,
destinationProject,
destinationProjectId,
etag,
labels,
uid,
updateTime
FROM google.gkebackup.backup_channels
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupChannelsId = '{{ backupChannelsId }}' -- required;

INSERT examples

Creates a new BackupChannel in a given location.

INSERT INTO google.gkebackup.backup_channels (
data__name,
data__destinationProject,
data__labels,
data__description,
projectsId,
locationsId,
backupChannelId
)
SELECT
'{{ name }}',
'{{ destinationProject }}',
'{{ labels }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backupChannelId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update a BackupChannel.

UPDATE google.gkebackup.backup_channels
SET
data__name = '{{ name }}',
data__destinationProject = '{{ destinationProject }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupChannelsId = '{{ backupChannelsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes an existing BackupChannel.

DELETE FROM google.gkebackup.backup_channels
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupChannelsId = '{{ backupChannelsId }}' --required
AND etag = '{{ etag }}'
AND force = '{{ force }}';