Skip to main content

assets_export_jobs

Creates, updates, deletes, gets or lists an assets_export_jobs resource.

Overview

Nameassets_export_jobs
TypeResource
Idgoogle.migrationcenter.assets_export_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. Identifier. Resource name.
conditionobjectOptional. Conditions for selecting assets to export. (id: AssetsExportJobExportCondition)
createTimestring (google-datetime)Output only. Resource creation time.
inventoryobjectExport asset inventory details. (id: AssetsExportJobInventory)
labelsobjectOptional. Labels as key value pairs. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
networkDependenciesobjectExport data regarding asset network dependencies. (id: AssetsExportJobNetworkDependencies)
performanceDataobjectExport asset with performance data. (id: AssetsExportJobPerformanceData)
recentExecutionsarrayOutput only. Recent non expired executions of the job.
showHiddenbooleanOptional. When this value is set to 'true' the response will include all assets, including those that are hidden.
signedUriDestinationobjectExport to Cloud Storage files downloadable using signed URIs. (id: SignedUriDestination)
updateTimestring (google-datetime)Output only. Resource update time.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, assetsExportJobsIdGets the details of an assets export job.
listselectprojectsId, locationsIdpageToken, pageSizeLists all the assets export jobs in a given project and location.
createinsertprojectsId, locationsIdassetsExportJobId, requestIdCreates a new assets export job.
deletedeleteprojectsId, locationsId, assetsExportJobsIdDeletes an assets export job.
runexecprojectsId, locationsId, assetsExportJobsIdRuns an assets export job, returning an AssetsExportJobExecution.

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
assetsExportJobsIdstring
locationsIdstring
projectsIdstring
assetsExportJobIdstring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples

Gets the details of an assets export job.

SELECT
name,
condition,
createTime,
inventory,
labels,
networkDependencies,
performanceData,
recentExecutions,
showHidden,
signedUriDestination,
updateTime
FROM google.migrationcenter.assets_export_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND assetsExportJobsId = '{{ assetsExportJobsId }}' -- required
;

INSERT examples

Creates a new assets export job.

INSERT INTO google.migrationcenter.assets_export_jobs (
data__networkDependencies,
data__inventory,
data__showHidden,
data__condition,
data__signedUriDestination,
data__labels,
data__performanceData,
projectsId,
locationsId,
assetsExportJobId,
requestId
)
SELECT
'{{ networkDependencies }}',
'{{ inventory }}',
{{ showHidden }},
'{{ condition }}',
'{{ signedUriDestination }}',
'{{ labels }}',
'{{ performanceData }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ assetsExportJobId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples

Deletes an assets export job.

DELETE FROM google.migrationcenter.assets_export_jobs
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND assetsExportJobsId = '{{ assetsExportJobsId }}' --required
;

Lifecycle Methods

Runs an assets export job, returning an AssetsExportJobExecution.

EXEC google.migrationcenter.assets_export_jobs.run
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@assetsExportJobsId='{{ assetsExportJobsId }}' --required
@@json=
'{
"requestId": "{{ requestId }}"
}'
;