import_data_files
Creates, updates, deletes, gets or lists an import_data_files
resource.
Overview
Name | import_data_files |
Type | Resource |
Id | google.migrationcenter.import_data_files |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The name of the file. |
createTime | string (google-datetime) | Output only. The timestamp when the file was created. |
displayName | string | User-friendly display name. Maximum length is 63 characters. |
format | string | Required. The payload format. |
state | string | Output only. The state of the import data file. |
uploadFileInfo | object | Information about a file that is uploaded to a storage service. (id: UploadFileInfo) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The name of the file. |
createTime | string (google-datetime) | Output only. The timestamp when the file was created. |
displayName | string | User-friendly display name. Maximum length is 63 characters. |
format | string | Required. The payload format. |
state | string | Output only. The state of the import data file. |
uploadFileInfo | object | Information about a file that is uploaded to a storage service. (id: UploadFileInfo) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , importJobsId , importDataFilesId | Gets an import data file. | |
list | select | projectsId , locationsId , importJobsId | pageSize , pageToken , filter , orderBy | List import data files. |
create | insert | projectsId , locationsId , importJobsId | importDataFileId , requestId | Creates an import data file. |
delete | delete | projectsId , locationsId , importJobsId , importDataFilesId | requestId | Delete an import data file. |
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 |
---|---|---|
importDataFilesId | string | |
importJobsId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
importDataFileId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string |
SELECT
examples
- get
- list
Gets an import data file.
SELECT
name,
createTime,
displayName,
format,
state,
uploadFileInfo
FROM google.migrationcenter.import_data_files
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND importJobsId = '{{ importJobsId }}' -- required
AND importDataFilesId = '{{ importDataFilesId }}' -- required;
List import data files.
SELECT
name,
createTime,
displayName,
format,
state,
uploadFileInfo
FROM google.migrationcenter.import_data_files
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND importJobsId = '{{ importJobsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates an import data file.
INSERT INTO google.migrationcenter.import_data_files (
data__displayName,
data__format,
data__uploadFileInfo,
projectsId,
locationsId,
importJobsId,
importDataFileId,
requestId
)
SELECT
'{{ displayName }}',
'{{ format }}',
'{{ uploadFileInfo }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ importJobsId }}',
'{{ importDataFileId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: import_data_files
props:
- name: projectsId
value: string
description: Required parameter for the import_data_files resource.
- name: locationsId
value: string
description: Required parameter for the import_data_files resource.
- name: importJobsId
value: string
description: Required parameter for the import_data_files resource.
- name: displayName
value: string
description: >
User-friendly display name. Maximum length is 63 characters.
- name: format
value: string
description: >
Required. The payload format.
valid_values: ['IMPORT_JOB_FORMAT_UNSPECIFIED', 'IMPORT_JOB_FORMAT_RVTOOLS_XLSX', 'IMPORT_JOB_FORMAT_RVTOOLS_CSV', 'IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV', 'IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV', 'IMPORT_JOB_FORMAT_STRATOZONE_CSV', 'IMPORT_JOB_FORMAT_DATABASE_ZIP']
- name: uploadFileInfo
value: object
description: >
Information about a file that is uploaded to a storage service.
- name: importDataFileId
value: string
- name: requestId
value: string
DELETE
examples
- delete
Delete an import data file.
DELETE FROM google.migrationcenter.import_data_files
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND importJobsId = '{{ importJobsId }}' --required
AND importDataFilesId = '{{ importDataFilesId }}' --required
AND requestId = '{{ requestId }}';