Skip to main content

relations

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

Overview​

Namerelations
TypeResource
Idgoogle.migrationcenter.relations

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. Identifier. The identifier of the relation.
createTimestring (google-datetime)Output only. The timestamp when the relation was created.
dstAssetstringOutput only. The destination asset name in the relation.
srcAssetstringOutput only. The source asset name in the relation.
typestringOptional. The type of the relation. (TYPE_UNSPECIFIED, LOGICAL_DATABASE, DATABASE_DEPLOYMENT_HOSTING_SERVER)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, relationsIdGets the details of an relation.
listselectprojectsId, locationsIdfilter, orderBy, pageSize, pageTokenLists all the relations in a given project and location.

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
relationsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples​

Gets the details of an relation.

SELECT
name,
createTime,
dstAsset,
srcAsset,
type
FROM google.migrationcenter.relations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND relationsId = '{{ relationsId }}' -- required
;