job_logs
Creates, updates, deletes, gets or lists a job_logs resource.
Overview​
| Name | job_logs |
| Type | Resource |
| Id | oci.resource_manager.job_logs |
Fields​
The following fields are returned by SELECT queries:
- get
Log entry for an operation resulting from a job's execution.
| Name | Datatype | Description |
|---|---|---|
level | string | Specifies the severity level of the log entry. (TRACE, DEBUG, INFO, WARN, ERROR, FATAL) |
message | string | The log entry value. |
timestamp | string (date-time) | The date and time of the log entry. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z |
type | string | Specifies the log type for the log entry. (TERRAFORM_CONSOLE) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | jobId, region | opc-request-id, type, levelGreaterThanOrEqualTo, sortOrder, limit, page, timestampGreaterThanOrEqualTo, timestampLessThanOrEqualTo | Returns console log entries for the specified job in JSON format.<br />For more information, see<br />[Getting Logs for a Job](/iaas/Content/ResourceManager/Tasks/get-job-logs.htm).<br /> |
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 |
|---|---|---|
jobId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the job. |
region | string | OCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION) |
levelGreaterThanOrEqualTo | string | A filter that returns only log entries that match a given severity level or greater. |
limit | integer | The number of items returned in a paginated List call. For information about pagination, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
opc-request-id | string | Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
page | string | The value of the opc-next-page response header from the preceding List call. For information about pagination, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
sortOrder | string | The sort order to use when sorting returned resources. Ascending (ASC) or descending (DESC). |
timestampGreaterThanOrEqualTo | string (date-time) | Time stamp specifying the lower time limit for which logs are returned in a query. Format is defined by RFC3339. Example: 2020-01-01T12:00:00.000Z |
timestampLessThanOrEqualTo | string (date-time) | Time stamp specifying the upper time limit for which logs are returned in a query. Format is defined by RFC3339. Example: 2020-02-01T12:00:00.000Z |
type | array | A filter that returns only logs of a specified type. |
SELECT examples​
- get
Returns console log entries for the specified job in JSON format.<br />For more information, see<br />[Getting Logs for a Job](/iaas/Content/ResourceManager/Tasks/get-job-logs.htm).<br />
SELECT
level,
message,
timestamp,
type
FROM oci.resource_manager.job_logs
WHERE jobId = '{{ jobId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND type = '{{ type }}'
AND levelGreaterThanOrEqualTo = '{{ levelGreaterThanOrEqualTo }}'
AND sortOrder = '{{ sortOrder }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND timestampGreaterThanOrEqualTo = '{{ timestampGreaterThanOrEqualTo }}'
AND timestampLessThanOrEqualTo = '{{ timestampLessThanOrEqualTo }}'
;