Back to Node Auth0

Class LogStreamsClient

docs/classes/management.SDK.LogStreamsClient.html

5.9.115.0 KB
Original Source

Class LogStreamsClient

Index

Constructors

constructor

Methods

listcreategetdeleteupdate

Properties

_options

Constructors

constructor

new LogStreamsClient(options: BaseClientOptions): LogStreamsClient

Parameters

Returns LogStreamsClient

Methods

list

list(
requestOptions?: LogStreamsClient.RequestOptions,
): HttpResponsePromise<LogStreamResponseSchema[]>

Retrieve details on log streams.

Sample Response

[{ "id": "string", "name": "string", "type": "eventbridge", "status": "active|paused|suspended", "sink": { "awsAccountId": "string", "awsRegion": "string", "awsPartnerEventSource": "string" }}, { "id": "string", "name": "string", "type": "http", "status": "active|paused|suspended", "sink": { "httpContentFormat": "JSONLINES|JSONARRAY", "httpContentType": "string", "httpEndpoint": "string", "httpAuthorization": "string" }},{ "id": "string", "name": "string", "type": "eventgrid", "status": "active|paused|suspended", "sink": { "azureSubscriptionId": "string", "azureResourceGroup": "string", "azureRegion": "string", "azurePartnerTopic": "string" }},{ "id": "string", "name": "string", "type": "splunk", "status": "active|paused|suspended", "sink": { "splunkDomain": "string", "splunkToken": "string", "splunkPort": "string", "splunkSecure": "boolean" }},{ "id": "string", "name": "string", "type": "sumo", "status": "active|paused|suspended", "sink": { "sumoSourceAddress": "string" }},{ "id": "string", "name": "string", "type": "datadog", "status": "active|paused|suspended", "sink": { "datadogRegion": "string", "datadogApiKey": "string" }}]Copy

Parameters

Request-specific configuration.

Returns HttpResponsePromise<LogStreamResponseSchema[]>

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.logStreams.list()Copy

create

create(
request: CreateLogStreamRequestContent,
requestOptions?: LogStreamsClient.RequestOptions,
): HttpResponsePromise<CreateLogStreamResponseContent>

Create a log stream.

Log Stream Types

The type of log stream being created determines the properties required in the sink payload.

HTTP Stream

For an http Stream, the sink properties are listed in the payload below.

Request:

{ "name": "string", "type": "http", "sink": { "httpEndpoint": "string", "httpContentType": "string", "httpContentFormat": "JSONLINES|JSONARRAY", "httpAuthorization": "string" }}Copy

Response:

{ "id": "string", "name": "string", "type": "http", "status": "active", "sink": { "httpEndpoint": "string", "httpContentType": "string", "httpContentFormat": "JSONLINES|JSONARRAY", "httpAuthorization": "string" }}Copy

Amazon EventBridge Stream

For an eventbridge Stream, the sink properties are listed in the payload below.

Request:

{ "name": "string", "type": "eventbridge", "sink": { "awsRegion": "string", "awsAccountId": "string" }}Copy

The response will include an additional field awsPartnerEventSource in the sink:

Response:

{ "id": "string", "name": "string", "type": "eventbridge", "status": "active", "sink": { "awsAccountId": "string", "awsRegion": "string", "awsPartnerEventSource": "string" }}Copy

Azure Event Grid Stream

For an Azure Event Grid Stream, the sink properties are listed in the payload below.

Request:

{ "name": "string", "type": "eventgrid", "sink": { "azureSubscriptionId": "string", "azureResourceGroup": "string", "azureRegion": "string" }}Copy

Response:

{ "id": "string", "name": "string", "type": "http", "status": "active", "sink": { "azureSubscriptionId": "string", "azureResourceGroup": "string", "azureRegion": "string", "azurePartnerTopic": "string" }}Copy

Datadog Stream

For a Datadog Stream, the sink properties are listed in the payload below.

Request:

{ "name": "string", "type": "datadog", "sink": { "datadogRegion": "string", "datadogApiKey": "string" }}Copy

Response:

{ "id": "string", "name": "string", "type": "datadog", "status": "active", "sink": { "datadogRegion": "string", "datadogApiKey": "string" }}Copy

Splunk Stream

For a Splunk Stream, the sink properties are listed in the payload below.

Request:

{ "name": "string", "type": "splunk", "sink": { "splunkDomain": "string", "splunkToken": "string", "splunkPort": "string", "splunkSecure": "boolean" }}Copy

Response:

{ "id": "string", "name": "string", "type": "splunk", "status": "active", "sink": { "splunkDomain": "string", "splunkToken": "string", "splunkPort": "string", "splunkSecure": "boolean" }}Copy

Sumo Logic Stream

For a Sumo Logic Stream, the sink properties are listed in the payload below.

Request:

{ "name": "string", "type": "sumo", "sink": { "sumoSourceAddress": "string" }}Copy

Response:

{ "id": "string", "name": "string", "type": "sumo", "status": "active", "sink": { "sumoSourceAddress": "string" }}Copy

Parameters

Request-specific configuration.

Returns HttpResponsePromise<CreateLogStreamResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.logStreams.create({ type: "http", sink: { httpEndpoint: "httpEndpoint" } })Copy

get

get(
id: string,
requestOptions?: LogStreamsClient.RequestOptions,
): HttpResponsePromise<GetLogStreamResponseContent>

Retrieve a log stream configuration and status.

Sample responses

Amazon EventBridge Log Stream

{ "id": "string", "name": "string", "type": "eventbridge", "status": "active|paused|suspended", "sink": { "awsAccountId": "string", "awsRegion": "string", "awsPartnerEventSource": "string" }}Copy

HTTP Log Stream

{ "id": "string", "name": "string", "type": "http", "status": "active|paused|suspended", "sink": { "httpContentFormat": "JSONLINES|JSONARRAY", "httpContentType": "string", "httpEndpoint": "string", "httpAuthorization": "string" }}Copy

Datadog Log Stream

{ "id": "string", "name": "string", "type": "datadog", "status": "active|paused|suspended", "sink": { "datadogRegion": "string", "datadogApiKey": "string" }}Copy

Mixpanel

Request:

{ "name": "string", "type": "mixpanel", "sink": { "mixpanelRegion": "string", "mixpanelProjectId": "string", "mixpanelServiceAccountUsername": "string", "mixpanelServiceAccountPassword": "string" }}Copy

Response:

{ "id": "string", "name": "string", "type": "mixpanel", "status": "active", "sink": { "mixpanelRegion": "string", "mixpanelProjectId": "string", "mixpanelServiceAccountUsername": "string", "mixpanelServiceAccountPassword": "string" }}Copy

Segment

Request:

{ "name": "string", "type": "segment", "sink": { "segmentWriteKey": "string" }}Copy

Response:

{ "id": "string", "name": "string", "type": "segment", "status": "active", "sink": { "segmentWriteKey": "string" }}Copy

Splunk Log Stream

{ "id": "string", "name": "string", "type": "splunk", "status": "active|paused|suspended", "sink": { "splunkDomain": "string", "splunkToken": "string", "splunkPort": "string", "splunkSecure": "boolean" }}Copy

Sumo Logic Log Stream

{ "id": "string", "name": "string", "type": "sumo", "status": "active|paused|suspended", "sink": { "sumoSourceAddress": "string" }}Copy

Status

The status of a log stream maybe any of the following:

  1. active - Stream is currently enabled.
  2. paused - Stream is currently user disabled and will not attempt log delivery.
  3. suspended - Stream is currently disabled because of errors and will not attempt log delivery.

Parameters

  • id: string

The id of the log stream to get

Request-specific configuration.

Returns HttpResponsePromise<GetLogStreamResponseContent>

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.logStreams.get("id")Copy

delete

delete(
id: string,
requestOptions?: LogStreamsClient.RequestOptions,
): HttpResponsePromise<void>

Delete a log stream.

Parameters

  • id: string

The id of the log stream to delete

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.logStreams.delete("id")Copy

update

update(
id: string,
request?: UpdateLogStreamRequestContent,
requestOptions?: LogStreamsClient.RequestOptions,
): HttpResponsePromise<UpdateLogStreamResponseContent>

Update a log stream.

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:

  • name
  • status
  • sink

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

Update the status of a log stream

{ "status": "active|paused"}Copy

Update the name of a log stream

{ "name": "string"}Copy

Update the sink properties of a stream of type http

{ "sink": { "httpEndpoint": "string", "httpContentType": "string", "httpContentFormat": "JSONARRAY|JSONLINES", "httpAuthorization": "string" }}Copy

Update the sink properties of a stream of type datadog

{ "sink": { "datadogRegion": "string", "datadogApiKey": "string" }}Copy

Update the sink properties of a stream of type splunk

{ "sink": { "splunkDomain": "string", "splunkToken": "string", "splunkPort": "string", "splunkSecure": "boolean" }}Copy

Update the sink properties of a stream of type sumo

{ "sink": { "sumoSourceAddress": "string" }}Copy

Parameters

  • id: string

The id of the log stream to get

Request-specific configuration.

Returns HttpResponsePromise<UpdateLogStreamResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.logStreams.update("id")Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Methods listcreategetdeleteupdate Properties _options