import_jobs
Creates, updates, deletes, gets or lists an import_jobs resource.
Overview
| Name | import_jobs |
| Type | Resource |
| Id | sumologic.content.import_jobs |
Fields
The following fields are returned by SELECT queries:
- get
The status of the import job.
| Name | Datatype | Description |
|---|---|---|
error | object | |
status | string | Whether or not the request is in progress (InProgress), has completed successfully (Success), or has completed with an error (Failed). |
status_message | string | Additional status message generated if the status is not Failed. (wire: statusMessage) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | folder_id, job_id, region | is_admin_mode | Get the status of a content import job for the given job identifier. |
start | exec | folderId, region, name, type | isAdminMode, overwrite | Schedule an asynchronous import of content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the overwrite parameter to true to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. |
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 |
|---|---|---|
folderId | string | The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. |
folder_id | string | The identifier of the folder to import into. (wire: folderId) |
job_id | string | The identifier of the import request. (wire: jobId) |
region | string | Sumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT) |
isAdminMode | string | Set this to "true" if you want to perform the request as a Content Administrator. |
is_admin_mode | string | Set this to "true" if you want to perform the request as a Content Administrator. (wire: isAdminMode) |
overwrite | boolean | Set this to "true" to overwrite a content item if the name already exists. |
SELECT examples
- get
Get the status of a content import job for the given job identifier.
SELECT
error,
status,
status_message
FROM sumologic.content.import_jobs
WHERE folder_id = '{{ folder_id }}' -- required
AND job_id = '{{ job_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND is_admin_mode = '{{ is_admin_mode }}'
;
Lifecycle Methods
EXEC variables use wire (API) names.
- start
Schedule an asynchronous import of content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the overwrite parameter to true to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less.
EXEC sumologic.content.import_jobs.start
@folderId='{{ folderId }}' --required,
@region='{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set,
@isAdminMode='{{ isAdminMode }}',
@overwrite={{ overwrite }}
@@json=
'{
"type": "{{ type }}",
"name": "{{ name }}"
}'
;