Skip to main content

restore_channels

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

Overview

Namerestore_channels
TypeResource
Idgoogle.gkebackup.restore_channels

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The fully qualified name of the RestoreChannel. projects/*/locations/*/restoreChannels/*
createTimestring (google-datetime)Output only. The timestamp when this RestoreChannel was created.
descriptionstringOptional. User specified descriptive string for this RestoreChannel.
destinationProjectstringRequired. Immutable. The project into which the backups will be restored. The format is projects/{projectId} or projects/{projectNumber}.
destinationProjectIdstringOutput only. The project_id where backups will be restored. 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 RestoreChannel from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform RestoreChannel updates in order to avoid race conditions: An etag is returned in the response to GetRestoreChannel, and systems are expected to put that etag in the request to UpdateRestoreChannel or DeleteRestoreChannel 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 RestoreChannel was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, restoreChannelsIdRetrieve the details of a single RestoreChannel.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists RestoreChannels in a given location.
createinsertprojectsId, locationsIdrestoreChannelIdCreates a new RestoreChannel in a given location.
patchupdateprojectsId, locationsId, restoreChannelsIdupdateMaskUpdate a RestoreChannel.
deletedeleteprojectsId, locationsId, restoreChannelsIdetagDeletes an existing RestoreChannel.

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

SELECT examples

Retrieve the details of a single RestoreChannel.

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

INSERT examples

Creates a new RestoreChannel in a given location.

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

UPDATE examples

Update a RestoreChannel.

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

DELETE examples

Deletes an existing RestoreChannel.

DELETE FROM google.gkebackup.restore_channels
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND restoreChannelsId = '{{ restoreChannelsId }}' --required
AND etag = '{{ etag }}';