Class LogStreamsClient
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
public class LogStreamsClient : ILogStreamsClient
- Inheritance
-
LogStreamsClient
- Implements
- Inherited Members
- Extension Methods
Methods
CreateAsync(CreateLogStreamRequestContent, RequestOptions?, CancellationToken)
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"
}
}
Response:
{
"id": "string",
"name": "string",
"type": "http",
"status": "active",
"sink": {
"httpEndpoint": "string",
"httpContentType": "string",
"httpContentFormat": "JSONLINES|JSONARRAY",
"httpAuthorization": "string"
}
}
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"
}
}
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"
}
}
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"
}
}
Response:
{
"id": "string",
"name": "string",
"type": "http",
"status": "active",
"sink": {
"azureSubscriptionId": "string",
"azureResourceGroup": "string",
"azureRegion": "string",
"azurePartnerTopic": "string"
}
}
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"
}
}
Response:
{
"id": "string",
"name": "string",
"type": "datadog",
"status": "active",
"sink": {
"datadogRegion": "string",
"datadogApiKey": "string"
}
}
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"
}
}
Response:
{
"id": "string",
"name": "string",
"type": "splunk",
"status": "active",
"sink": {
"splunkDomain": "string",
"splunkToken": "string",
"splunkPort": "string",
"splunkSecure": "boolean"
}
}
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"
}
}
Response:
{
"id": "string",
"name": "string",
"type": "sumo",
"status": "active",
"sink": {
"sumoSourceAddress": "string"
}
}
public WithRawResponseTask<CreateLogStreamResponseContent> CreateAsync(CreateLogStreamRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestCreateLogStreamRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.LogStreams.CreateAsync(
new CreateLogStreamHttpRequestBody
{
Type = LogStreamHttpEnum.Http,
Sink = new LogStreamHttpSink { HttpEndpoint = "httpEndpoint" },
}
);
DeleteAsync(string, RequestOptions?, CancellationToken)
Delete a log stream.
public Task DeleteAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.LogStreams.DeleteAsync("id");
GetAsync(string, RequestOptions?, CancellationToken)
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"
}
}
HTTP Log Stream
{
"id": "string",
"name": "string",
"type": "http",
"status": "active|paused|suspended",
"sink": {
"httpContentFormat": "JSONLINES|JSONARRAY",
"httpContentType": "string",
"httpEndpoint": "string",
"httpAuthorization": "string"
}
}
Datadog Log Stream
{
"id": "string",
"name": "string",
"type": "datadog",
"status": "active|paused|suspended",
"sink": {
"datadogRegion": "string",
"datadogApiKey": "string"
}
}
Mixpanel
Request:
{
"name": "string",
"type": "mixpanel",
"sink": {
"mixpanelRegion": "string",
"mixpanelProjectId": "string",
"mixpanelServiceAccountUsername": "string",
"mixpanelServiceAccountPassword": "string"
}
}
Response:
{
"id": "string",
"name": "string",
"type": "mixpanel",
"status": "active",
"sink": {
"mixpanelRegion": "string",
"mixpanelProjectId": "string",
"mixpanelServiceAccountUsername": "string",
"mixpanelServiceAccountPassword": "string"
}
}
Segment
Request:
{
"name": "string",
"type": "segment",
"sink": {
"segmentWriteKey": "string"
}
}
Response:
{
"id": "string",
"name": "string",
"type": "segment",
"status": "active",
"sink": {
"segmentWriteKey": "string"
}
}
Splunk Log Stream
{
"id": "string",
"name": "string",
"type": "splunk",
"status": "active|paused|suspended",
"sink": {
"splunkDomain": "string",
"splunkToken": "string",
"splunkPort": "string",
"splunkSecure": "boolean"
}
}
Sumo Logic Log Stream
{
"id": "string",
"name": "string",
"type": "sumo",
"status": "active|paused|suspended",
"sink": {
"sumoSourceAddress": "string"
}
}
Status
The status of a log stream maybe any of the following:
active- Stream is currently enabled.paused- Stream is currently user disabled and will not attempt log delivery.suspended- Stream is currently disabled because of errors and will not attempt log delivery.
public WithRawResponseTask<GetLogStreamResponseContent> GetAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.LogStreams.GetAsync("id");
ListAsync(RequestOptions?, CancellationToken)
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"
}
}]
public WithRawResponseTask<IEnumerable<LogStreamResponseSchema>> ListAsync(RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.LogStreams.ListAsync();
UpdateAsync(string, UpdateLogStreamRequestContent, RequestOptions?, CancellationToken)
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"
}
Update the name of a log stream
{
"name": "string"
}
Update the sink properties of a stream of type http
{
"sink": {
"httpEndpoint": "string",
"httpContentType": "string",
"httpContentFormat": "JSONARRAY|JSONLINES",
"httpAuthorization": "string"
}
}
Update the sink properties of a stream of type datadog
{
"sink": {
"datadogRegion": "string",
"datadogApiKey": "string"
}
}
Update the sink properties of a stream of type splunk
{
"sink": {
"splunkDomain": "string",
"splunkToken": "string",
"splunkPort": "string",
"splunkSecure": "boolean"
}
}
Update the sink properties of a stream of type sumo
{
"sink": {
"sumoSourceAddress": "string"
}
}
public WithRawResponseTask<UpdateLogStreamResponseContent> UpdateAsync(string id, UpdateLogStreamRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringrequestUpdateLogStreamRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.LogStreams.UpdateAsync("id", new UpdateLogStreamRequestContent());