Skip to main content

log_streams

Creates, updates, deletes, gets or lists a log_streams resource.

Overview

Namelog_streams
TypeResource
Idokta.logstreams.log_streams

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique identifier for the log stream (example: 0oa1orzg0CHSgPcjZ0g4)
namestringUnique name for the log stream object (example: My AWS EventBridge log stream)
_linksobjectSpecifies link relations (see Web Linking) available for the current status of an application using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
createdstring (date-time)Timestamp when the log stream object was created (example: 2022-10-21T16:59:59.000Z)
lastUpdatedstring (date-time)Timestamp when the log stream object was last updated (example: 2022-10-21T17:15:10.000Z)
statusstringLifecycle status of the log stream object
typestringSpecifies the streaming provider used Supported providers: * aws_eventbridge (AWS EventBridge) * splunk_cloud_logstreaming (Splunk Cloud) Select the provider type to see provider-specific configurations in the settings property:

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_log_streamsselectsubdomainafter, limit, filterLists all log stream objects in your org. You can request a paginated list or a subset of log streams that match a supported filter expression.
get_log_streamselectsubdomainRetrieves a log stream object by ID
create_log_streaminsertsubdomain, data__created, data__id, data__lastUpdated, data__name, data__status, data__type, data___linksCreates a new log stream object
replace_log_streamreplacesubdomain, data__name, data__typeReplaces the log stream object properties for a given ID.

This operation is typically used to update the configuration of a log stream.
Depending on the type of log stream you want to update, certain properties can't be modified after the log stream is initially created.
Use the Retrieve the log stream schema for the schema type request to determine which properties you can update for the specific log stream type.
Log stream properties with the "writeOnce" : true attribute can't be updated after creation.
You must still specify these writeOnce properties in the request body with the original values in the PUT request.

> Note: You don't have to specify properties that have both the "writeOnce": true and the "writeOnly": true attributes in the PUT request body. These property values are ignored even if you add them in the PUT request body.
delete_log_streamdeletesubdomainDeletes a log stream object from your org by ID
activate_log_streamexecsubdomainActivates a log stream by logStreamId
deactivate_log_streamexecsubdomainDeactivates a log stream by logStreamId

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
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)
afterstringThe cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination.
filterstringAn expression that [filters]https://developer.okta.com/docs/api#filter the returned objects. You can only use the eq operator on either the status or type properties in the filter expression.
limitintegerA limit on the number of objects to return

SELECT examples

Lists all log stream objects in your org. You can request a paginated list or a subset of log streams that match a supported filter expression.

SELECT
id,
name,
_links,
created,
lastUpdated,
status,
type
FROM okta.logstreams.log_streams
WHERE subdomain = '{{ subdomain }}' -- required
AND after = '{{ after }}'
AND limit = '{{ limit }}'
AND filter = '{{ filter }}';

INSERT examples

Creates a new log stream object

INSERT INTO okta.logstreams.log_streams (
data__name,
data__type,
subdomain
)
SELECT
'{{ name }}' --required,
'{{ type }}' --required,
'{{ subdomain }}'
RETURNING
id,
name,
_links,
created,
lastUpdated,
status,
type
;

REPLACE examples

Replaces the log stream object properties for a given ID.

This operation is typically used to update the configuration of a log stream.
Depending on the type of log stream you want to update, certain properties can't be modified after the log stream is initially created.
Use the Retrieve the log stream schema for the schema type request to determine which properties you can update for the specific log stream type.
Log stream properties with the "writeOnce" : true attribute can't be updated after creation.
You must still specify these writeOnce properties in the request body with the original values in the PUT request.

> Note: You don't have to specify properties that have both the "writeOnce": true and the "writeOnly": true attributes in the PUT request body. These property values are ignored even if you add them in the PUT request body.

REPLACE okta.logstreams.log_streams
SET
data__name = '{{ name }}',
data__type = '{{ type }}'
WHERE
subdomain = '{{ subdomain }}' --required
AND data__name = '{{ name }}' --required
AND data__type = '{{ type }}' --required
RETURNING
id,
name,
_links,
created,
lastUpdated,
status,
type;

DELETE examples

Deletes a log stream object from your org by ID

DELETE FROM okta.logstreams.log_streams
WHERE subdomain = '{{ subdomain }}' --required;

Lifecycle Methods

Activates a log stream by logStreamId

EXEC okta.logstreams.log_streams.activate_log_stream 
@subdomain='{{ subdomain }}' --required;