assets
Creates, updates, deletes, gets or lists an assets
resource.
Overview
Name | assets |
Type | Resource |
Id | google.migrationcenter.assets |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the asset. |
assignedGroups | array | Output only. The list of groups that the asset is assigned to. |
attributes | object | Generic asset attributes. |
createTime | string (google-datetime) | Output only. The timestamp when the asset was created. |
databaseDeploymentDetails | object | Output only. Asset information specific for database deployments. (id: DatabaseDeploymentDetails) |
databaseDetails | object | Output only. Asset information specific for logical databases. (id: DatabaseDetails) |
hidden | boolean | Optional. Indicates if the asset is hidden. |
hideReason | string | Optional. An optional reason for marking this asset as hidden. |
hideTime | string (google-datetime) | Output only. The timestamp when the asset was marked as hidden. |
insightList | object | Output only. The list of insights associated with the asset. (id: InsightList) |
labels | object | Labels as key value pairs. |
machineDetails | object | Output only. Asset information specific for virtual and physical machines. (id: MachineDetails) |
performanceData | object | Output only. Performance data for the asset. (id: AssetPerformanceData) |
sources | array | Output only. The list of sources contributing to the asset. |
title | string | Output only. Server generated human readable name of the asset. |
updateTime | string (google-datetime) | Output only. The timestamp when the asset was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the asset. |
assignedGroups | array | Output only. The list of groups that the asset is assigned to. |
attributes | object | Generic asset attributes. |
createTime | string (google-datetime) | Output only. The timestamp when the asset was created. |
databaseDeploymentDetails | object | Output only. Asset information specific for database deployments. (id: DatabaseDeploymentDetails) |
databaseDetails | object | Output only. Asset information specific for logical databases. (id: DatabaseDetails) |
hidden | boolean | Optional. Indicates if the asset is hidden. |
hideReason | string | Optional. An optional reason for marking this asset as hidden. |
hideTime | string (google-datetime) | Output only. The timestamp when the asset was marked as hidden. |
insightList | object | Output only. The list of insights associated with the asset. (id: InsightList) |
labels | object | Labels as key value pairs. |
machineDetails | object | Output only. Asset information specific for virtual and physical machines. (id: MachineDetails) |
performanceData | object | Output only. Performance data for the asset. (id: AssetPerformanceData) |
sources | array | Output only. The list of sources contributing to the asset. |
title | string | Output only. Server generated human readable name of the asset. |
updateTime | string (google-datetime) | Output only. The timestamp when the asset was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , assetsId | view | Gets the details of an asset. |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy , view , showHidden | Lists all the assets in a given project and location. |
patch | update | projectsId , locationsId , assetsId | updateMask , requestId | Updates the parameters of an asset. |
batch_update | update | projectsId , locationsId | Updates the parameters of a list of assets. | |
delete | delete | projectsId , locationsId , assetsId | requestId | Deletes an asset. |
batch_delete | delete | projectsId , locationsId | Deletes list of Assets. | |
report_asset_frames | exec | projectsId , locationsId | source | Reports a set of frames. |
aggregate_values | exec | projectsId , locationsId | Aggregates the requested fields based on provided function. |
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.
Name | Datatype | Description |
---|---|---|
assetsId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
showHidden | boolean | |
source | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT
examples
- get
- list
Gets the details of an asset.
SELECT
name,
assignedGroups,
attributes,
createTime,
databaseDeploymentDetails,
databaseDetails,
hidden,
hideReason,
hideTime,
insightList,
labels,
machineDetails,
performanceData,
sources,
title,
updateTime
FROM google.migrationcenter.assets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND assetsId = '{{ assetsId }}' -- required
AND view = '{{ view }}';
Lists all the assets in a given project and location.
SELECT
name,
assignedGroups,
attributes,
createTime,
databaseDeploymentDetails,
databaseDetails,
hidden,
hideReason,
hideTime,
insightList,
labels,
machineDetails,
performanceData,
sources,
title,
updateTime
FROM google.migrationcenter.assets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}'
AND showHidden = '{{ showHidden }}';
UPDATE
examples
- patch
- batch_update
Updates the parameters of an asset.
UPDATE google.migrationcenter.assets
SET
data__labels = '{{ labels }}',
data__attributes = '{{ attributes }}',
data__hidden = {{ hidden }},
data__hideReason = '{{ hideReason }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND assetsId = '{{ assetsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
assignedGroups,
attributes,
createTime,
databaseDeploymentDetails,
databaseDetails,
hidden,
hideReason,
hideTime,
insightList,
labels,
machineDetails,
performanceData,
sources,
title,
updateTime;
Updates the parameters of a list of assets.
UPDATE google.migrationcenter.assets
SET
data__requests = '{{ requests }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
RETURNING
assets;
DELETE
examples
- delete
- batch_delete
Deletes an asset.
DELETE FROM google.migrationcenter.assets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND assetsId = '{{ assetsId }}' --required
AND requestId = '{{ requestId }}';
Deletes list of Assets.
DELETE FROM google.migrationcenter.assets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required;
Lifecycle Methods
- report_asset_frames
- aggregate_values
Reports a set of frames.
EXEC google.migrationcenter.assets.report_asset_frames
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@source='{{ source }}'
@@json=
'{
"framesData": "{{ framesData }}"
}';
Aggregates the requested fields based on provided function.
EXEC google.migrationcenter.assets.aggregate_values
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"aggregations": "{{ aggregations }}",
"filter": "{{ filter }}",
"showHidden": {{ showHidden }}
}';