Skip to main content

assets

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

Overview

Nameassets
TypeResource
Idgoogle.migrationcenter.assets

Fields

NameDatatypeDescription
namestringOutput only. The full name of the asset.
assignedGroupsarrayOutput only. The list of groups that the asset is assigned to.
attributesobjectGeneric asset attributes.
createTimestringOutput only. The timestamp when the asset was created.
insightListobjectMessage containing insights list.
labelsobjectLabels as key value pairs.
machineDetailsobjectDetails of a machine.
performanceDataobjectPerformance data for an asset.
sourcesarrayOutput only. The list of sources contributing to the asset.
updateTimestringOutput only. The timestamp when the asset was last updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTassetsId, locationsId, projectsIdGets the details of an asset.
listSELECTlocationsId, projectsIdLists all the assets in a given project and location.
batch_deleteDELETElocationsId, projectsIdDeletes list of Assets.
deleteDELETEassetsId, locationsId, projectsIdDeletes an asset.
batch_updateUPDATElocationsId, projectsIdUpdates the parameters of a list of assets.
patchUPDATEassetsId, locationsId, projectsIdUpdates the parameters of an asset.
aggregate_valuesEXEClocationsId, projectsIdAggregates the requested fields based on provided function.
report_asset_framesEXEClocationsId, projectsIdReports a set of frames.

SELECT examples

Lists all the assets in a given project and location.

SELECT
name,
assignedGroups,
attributes,
createTime,
insightList,
labels,
machineDetails,
performanceData,
sources,
updateTime
FROM google.migrationcenter.assets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

UPDATE example

Updates a assets resource.

/*+ update */
UPDATE google.migrationcenter.assets
SET
requests = '{{ requests }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified assets resource.

/*+ delete */
DELETE FROM google.migrationcenter.assets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';