Skip to content

Create a log stream

Request

OAuth 2.0 scope:
  • okta.logStreams.manage

Creates a new log stream object

Bodyapplication/jsonrequired
namestring(LogStreamName)required

Unique name for the log stream object

Example:"My AWS EventBridge log stream"
typestring(LogStreamType)required

Specifies the streaming provider used

Supported providers:

Select the provider type to see provider-specific configurations in the settings property:

Enum:"aws_eventbridge""splunk_cloud_logstreaming"
Discriminator
settingsobject(LogStreamSettingsAws)required

Specifies the configuration for the aws_eventbridge log stream type. This configuration can't be modified after creation.

curl -i -X POST \
  https://subdomain.okta.com/api/v1/logStreams \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "aws_eventbridge",
    "name": "Example AWS EventBridge",
    "settings": {
      "eventSourceName": "your-event-source-name",
      "accountId": "123456789012",
      "region": "us-east-2"
    }
  }'

Responses

Success

Bodyapplication/json
createdstring, (date-time)read-onlyrequired

Timestamp when the log stream object was created

Example:"2022-10-21T16:59:59.000Z"
idstringread-onlyrequired

Unique identifier for the log stream

Example:"0oa1orzg0CHSgPcjZ0g4"
lastUpdatedstring, (date-time)read-onlyrequired

Timestamp when the log stream object was last updated

Example:"2022-10-21T17:15:10.000Z"
namestring(LogStreamName)required

Unique name for the log stream object

Example:"My AWS EventBridge log stream"
statusstringread-onlyrequired

Lifecycle status of the log stream object

Enum:"ACTIVE""INACTIVE"
typestring(LogStreamType)required

Specifies the streaming provider used

Supported providers:

Select the provider type to see provider-specific configurations in the settings property:

Enum:"aws_eventbridge""splunk_cloud_logstreaming"
Discriminator
settingsobject(LogStreamSettingsAws)required

Specifies the configuration for the aws_eventbridge log stream type. This configuration can't be modified after creation.

Response
{ "id": "0oa1orqUGCIoCGNxf0g4", "type": "aws_eventbridge", "name": "Example AWS EventBridge", "lastUpdated": "2023-03-24T21:02:43.000Z", "created": "2023-03-24T21:02:43.000Z", "status": "ACTIVE", "settings": { "accountId": "123456789012", "eventSourceName": "your-event-source-name", "region": "us-east-2" }, "_links": { "self": { … }, "deactivate": { … } } }