Skip to content

Replace a log stream

Request

OAuth 2.0 scope:
  • okta.logStreams.manage

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.

Path
logStreamIdstringrequired

Unique identifier for the log stream

Example:0oa1orzg0CHSgPcjZ0g4
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 PUT \
  https://subdomain.okta.com/api/v1/logStreams/0oa1orzg0CHSgPcjZ0g4 \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "aws_eventbridge",
    "name": "Updated AWS EventBridge",
    "settings": {
      "eventSourceName": "your-event-source-name",
      "accountId": "123456789012",
      "region": "us-east-2"
    }
  }'

Responses

OK

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": "Updated AWS EventBridge", "lastUpdated": "2023-03-24T21:12: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": { … } } }