log_saved_searches
Creates, updates, deletes, gets or lists a log_saved_searches resource.
Overview​
| Name | log_saved_searches |
| Type | Resource |
| Id | oci.logging.log_saved_searches |
Fields​
The following fields are returned by SELECT queries:
- get
- list
Successfully retrieved LogSavedSearch.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the resource. |
name | string | The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information. |
compartmentId | string | The OCID of the compartment that the resource belongs to. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
description | string | Description for this resource. |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The state of the LogSavedSearch (CREATING, ACTIVE, UPDATING, INACTIVE, DELETING, FAILED) (x-obmcs-top-level-enum: #/definitions/LogSavedSearchLifecycleState) |
query | string | The search query that is saved. |
timeCreated | string (date-time) | Time the resource was created. |
timeLastModified | string (date-time) | Time the resource was last modified. |
Successfully retrieved list of LogSavedSearch summary entities.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the resource. |
name | string | The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information. |
compartmentId | string | The OCID of the compartment that the resource belongs to. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
description | string | Description for this resource. |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The state of the LogSavedSearch (CREATING, ACTIVE, UPDATING, INACTIVE, DELETING, FAILED) (x-obmcs-top-level-enum: #/definitions/LogSavedSearchLifecycleState) |
query | string | The search query that is saved. |
timeCreated | string (date-time) | Time the resource was created. |
timeLastModified | string (date-time) | Time the resource was last modified. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | logSavedSearchId, region | opc-request-id | Retrieves a LogSavedSearch. |
list | select | compartmentId, region | logSavedSearchId, name, page, limit, sortBy, sortOrder, opc-request-id | Lists LogSavedSearches for this compartment.<br /> |
create | insert | region, compartmentId, name, query | opc-retry-token, opc-request-id | Creates a new LogSavedSearch.<br /> |
update | update | logSavedSearchId, region | if-match, opc-request-id | Updates an existing LogSavedSearch.<br /> |
delete | delete | logSavedSearchId, region | if-match, opc-request-id | Deletes the specified LogSavedSearch. |
change_compartment | exec | logSavedSearchId, region, compartmentId | opc-retry-token, if-match, opc-request-id | Moves a saved search into a different compartment within the same tenancy. For information about moving<br />resources between compartments, see [Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<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 |
|---|---|---|
compartmentId | string | Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal. |
logSavedSearchId | string | OCID of the logSavedSearch. |
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) |
if-match | string | For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. |
limit | integer | When setting the page limit, specifies the maximum number of unfiltered records that can be fetched from the data store in one request. Filtering happens after the records are retrieved. Subsequent pages might include results that match the query criteria. |
logSavedSearchId | string | OCID of the LogSavedSearch. |
name | string | Resource name. |
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. |
opc-retry-token | string | A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). |
page | string | For list pagination. The value of the opc-next-page or opc-previous-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
sortBy | string | The field to sort by (one column only). Default sort order is ascending exception of timeCreated and timeLastModified columns (descending). |
sortOrder | string | The sort order to use, whether 'asc' or 'desc'. |
SELECT examples​
- get
- list
Retrieves a LogSavedSearch.
SELECT
id,
name,
compartmentId,
definedTags,
description,
freeformTags,
lifecycleState,
query,
timeCreated,
timeLastModified
FROM oci.logging.log_saved_searches
WHERE logSavedSearchId = '{{ logSavedSearchId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Lists LogSavedSearches for this compartment.<br />
SELECT
id,
name,
compartmentId,
definedTags,
description,
freeformTags,
lifecycleState,
query,
timeCreated,
timeLastModified
FROM oci.logging.log_saved_searches
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND logSavedSearchId = '{{ logSavedSearchId }}'
AND name = '{{ name }}'
AND page = '{{ page }}'
AND limit = '{{ limit }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND opc-request-id = '{{ opc-request-id }}'
;
INSERT examples​
- create
- Manifest
Creates a new LogSavedSearch.<br />
INSERT INTO oci.logging.log_saved_searches (
compartmentId,
definedTags,
description,
freeformTags,
name,
query,
region,
opc-retry-token,
opc-request-id
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ description }}',
'{{ freeformTags }}',
'{{ name }}' /* required */,
'{{ query }}' /* required */,
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
name,
compartmentId,
definedTags,
description,
freeformTags,
lifecycleState,
query,
timeCreated,
timeLastModified
;
# Description fields are for documentation purposes
- name: log_saved_searches
props:
- name: region
value: "{{ region }}"
description: Required parameter for the log_saved_searches resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The OCID of the compartment that the resource belongs to.
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined tags for this resource. Each key is predefined and scoped to a
namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
Example: `{"Operations": {"CostCenter": "42"}}`
- name: description
value: "{{ description }}"
description: |
Description for this resource.
- name: freeformTags
value: "{{ freeformTags }}"
description: |
Free-form tags for this resource. Each tag is a simple key-value pair with no
predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
- name: name
value: "{{ name }}"
description: |
The user-friendly display name. This must be unique within the enclosing resource,
and it's changeable. Avoid entering confidential information.
- name: query
value: "{{ query }}"
description: |
The search query that is saved.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
UPDATE examples​
- update
Updates an existing LogSavedSearch.<br />
UPDATE oci.logging.log_saved_searches
SET
definedTags = '{{ definedTags }}',
description = '{{ description }}',
freeformTags = '{{ freeformTags }}',
name = '{{ name }}',
query = '{{ query }}'
WHERE
logSavedSearchId = '{{ logSavedSearchId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
name,
compartmentId,
definedTags,
description,
freeformTags,
lifecycleState,
query,
timeCreated,
timeLastModified;
DELETE examples​
- delete
Deletes the specified LogSavedSearch.
DELETE FROM oci.logging.log_saved_searches
WHERE logSavedSearchId = '{{ logSavedSearchId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;
Lifecycle Methods​
- change_compartment
Moves a saved search into a different compartment within the same tenancy. For information about moving<br />resources between compartments, see [Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br />
EXEC oci.logging.log_saved_searches.change_compartment
@logSavedSearchId='{{ logSavedSearchId }}' --required,
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;