using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.LogStreams.CreateAsync(
new CreateLogStreamHttpRequestBody {
Type = LogStreamHttpEnum.Http,
Sink = new LogStreamHttpSink {
HttpEndpoint = "httpEndpoint"
}
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.CreateLogStreamRequestContent{
CreateLogStreamHttpRequestBody: &management.CreateLogStreamHttpRequestBody{
Type: management.LogStreamHttpEnum(
"http",
),
Sink: &management.LogStreamHttpSink{
HttpEndpoint: "httpEndpoint",
},
},
}
mgmt.LogStreams.Create(
context.TODO(),
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.types.CreateLogStreamHttpRequestBody;
import com.auth0.client.mgmt.types.CreateLogStreamRequestContent;
import com.auth0.client.mgmt.types.LogStreamHttpEnum;
import com.auth0.client.mgmt.types.LogStreamHttpSink;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.logStreams().create(
CreateLogStreamRequestContent.of(
CreateLogStreamHttpRequestBody
.builder()
.type(LogStreamHttpEnum.HTTP)
.sink(
LogStreamHttpSink
.builder()
.httpEndpoint("httpEndpoint")
.build()
)
.build()
)
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Types\CreateLogStreamHttpRequestBody;
use Auth0\SDK\API\Management\Types\LogStreamHttpEnum;
use Auth0\SDK\API\Management\Types\LogStreamHttpSink;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->logStreams->create(
new CreateLogStreamHttpRequestBody([
'type' => LogStreamHttpEnum::Http->value,
'sink' => new LogStreamHttpSink([
'httpEndpoint' => 'httpEndpoint',
]),
]),
);
from auth0.management import ManagementClient, CreateLogStreamHttpRequestBody, LogStreamHttpSink
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.log_streams.create(
request=CreateLogStreamHttpRequestBody(
type="http",
sink=LogStreamHttpSink(
http_endpoint="httpEndpoint",
),
),
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.log_streams.create(
type: "http",
sink: {
http_endpoint: "httpEndpoint"
}
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.logStreams.create({
type: "http",
sink: {
httpEndpoint: "httpEndpoint",
},
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.logStreams.create({
type: "http",
sink: {
httpEndpoint: "httpEndpoint",
},
});
}
main();
curl --request POST \
--url https://{tenantDomain}/api/v2/log-streams \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<string>"
}
]
},
"type": "http",
"filters": [
{
"type": "category"
}
],
"isPriority": true,
"name": "<string>",
"startFrom": "2021-03-01T19:57:29.532Z"
}
'{
"filters": [
{
"name": "auth.login.fail",
"type": "category"
}
],
"id": "<string>",
"isPriority": true,
"name": "<string>",
"pii_config": {
"log_fields": [
"first_name"
],
"algorithm": "xxhash",
"method": "mask"
},
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentFormat": "JSONARRAY",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<string>"
}
]
},
"status": "active",
"type": "http"
}ログストリームを作成する
ログストリームを作成します。
ログストリームの種類
作成するログストリームの type によって、sink ペイロードに必要なプロパティが決まります。
HTTP ストリーム
http ストリームの場合、sink のプロパティは以下のペイロードに示すとおりです。
リクエスト:
{
"name": "string",
"type": "http",
"sink": {
"httpEndpoint": "string",
"httpContentType": "string",
"httpContentFormat": "JSONLINES|JSONARRAY",
"httpAuthorization": "string"
}
}
レスポンス:
{
"id": "string",
"name": "string",
"type": "http",
"status": "active",
"sink": {
"httpEndpoint": "string",
"httpContentType": "string",
"httpContentFormat": "JSONLINES|JSONARRAY",
"httpAuthorization": "string"
}
}
Amazon EventBridge ストリーム
eventbridge ストリームの場合、sink のプロパティは以下のペイロードに示すとおりです。
リクエスト:
{
"name": "string",
"type": "eventbridge",
"sink": {
"awsRegion": "string",
"awsAccountId": "string"
}
}
レスポンスの sink には、追加フィールド awsPartnerEventSource が含まれます。
レスポンス:
{
"id": "string",
"name": "string",
"type": "eventbridge",
"status": "active",
"sink": {
"awsAccountId": "string",
"awsRegion": "string",
"awsPartnerEventSource": "string"
}
}
Azure Event Grid ストリーム
Azure Event Grid ストリームの場合、sink のプロパティは以下のペイロードに示すとおりです。
リクエスト:
{
"name": "string",
"type": "eventgrid",
"sink": {
"azureSubscriptionId": "string",
"azureResourceGroup": "string",
"azureRegion": "string"
}
}
レスポンス:
{
"id": "string",
"name": "string",
"type": "http",
"status": "active",
"sink": {
"azureSubscriptionId": "string",
"azureResourceGroup": "string",
"azureRegion": "string",
"azurePartnerTopic": "string"
}
}
Datadog ストリーム
Datadog ストリームの場合、sink のプロパティは以下のペイロードに示すとおりです。
リクエスト:
{
"name": "string",
"type": "datadog",
"sink": {
"datadogRegion": "string",
"datadogApiKey": "string"
}
}
レスポンス:
{
"id": "string",
"name": "string",
"type": "datadog",
"status": "active",
"sink": {
"datadogRegion": "string",
"datadogApiKey": "string"
}
}
Splunk ストリーム
Splunk ストリームの場合、sink のプロパティは以下のペイロードに示すとおりです。
リクエスト:
{
"name": "string",
"type": "splunk",
"sink": {
"splunkDomain": "string",
"splunkToken": "string",
"splunkPort": "string",
"splunkSecure": "boolean"
}
}
レスポンス:
{
"id": "string",
"name": "string",
"type": "splunk",
"status": "active",
"sink": {
"splunkDomain": "string",
"splunkToken": "string",
"splunkPort": "string",
"splunkSecure": "boolean"
}
}
Sumo Logic ストリーム
Sumo Logic ストリームの場合、sink のプロパティは以下のペイロードに示すとおりです。
リクエスト:
{
"name": "string",
"type": "sumo",
"sink": {
"sumoSourceAddress": "string"
}
}
レスポンス:
{
"id": "string",
"name": "string",
"type": "sumo",
"status": "active",
"sink": {
"sumoSourceAddress": "string"
}
}
using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.LogStreams.CreateAsync(
new CreateLogStreamHttpRequestBody {
Type = LogStreamHttpEnum.Http,
Sink = new LogStreamHttpSink {
HttpEndpoint = "httpEndpoint"
}
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.CreateLogStreamRequestContent{
CreateLogStreamHttpRequestBody: &management.CreateLogStreamHttpRequestBody{
Type: management.LogStreamHttpEnum(
"http",
),
Sink: &management.LogStreamHttpSink{
HttpEndpoint: "httpEndpoint",
},
},
}
mgmt.LogStreams.Create(
context.TODO(),
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.types.CreateLogStreamHttpRequestBody;
import com.auth0.client.mgmt.types.CreateLogStreamRequestContent;
import com.auth0.client.mgmt.types.LogStreamHttpEnum;
import com.auth0.client.mgmt.types.LogStreamHttpSink;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.logStreams().create(
CreateLogStreamRequestContent.of(
CreateLogStreamHttpRequestBody
.builder()
.type(LogStreamHttpEnum.HTTP)
.sink(
LogStreamHttpSink
.builder()
.httpEndpoint("httpEndpoint")
.build()
)
.build()
)
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Types\CreateLogStreamHttpRequestBody;
use Auth0\SDK\API\Management\Types\LogStreamHttpEnum;
use Auth0\SDK\API\Management\Types\LogStreamHttpSink;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->logStreams->create(
new CreateLogStreamHttpRequestBody([
'type' => LogStreamHttpEnum::Http->value,
'sink' => new LogStreamHttpSink([
'httpEndpoint' => 'httpEndpoint',
]),
]),
);
from auth0.management import ManagementClient, CreateLogStreamHttpRequestBody, LogStreamHttpSink
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.log_streams.create(
request=CreateLogStreamHttpRequestBody(
type="http",
sink=LogStreamHttpSink(
http_endpoint="httpEndpoint",
),
),
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.log_streams.create(
type: "http",
sink: {
http_endpoint: "httpEndpoint"
}
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.logStreams.create({
type: "http",
sink: {
httpEndpoint: "httpEndpoint",
},
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.logStreams.create({
type: "http",
sink: {
httpEndpoint: "httpEndpoint",
},
});
}
main();
curl --request POST \
--url https://{tenantDomain}/api/v2/log-streams \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<string>"
}
]
},
"type": "http",
"filters": [
{
"type": "category"
}
],
"isPriority": true,
"name": "<string>",
"startFrom": "2021-03-01T19:57:29.532Z"
}
'{
"filters": [
{
"name": "auth.login.fail",
"type": "category"
}
],
"id": "<string>",
"isPriority": true,
"name": "<string>",
"pii_config": {
"log_fields": [
"first_name"
],
"algorithm": "xxhash",
"method": "mask"
},
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentFormat": "JSONARRAY",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<string>"
}
]
},
"status": "active",
"type": "http"
}承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ボディ
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
http ストリームによって配信されるのは、これらのフィルターに一致するログイベントのみです。省略するか空の場合は、すべてのイベントが配信されます。
Show child attributes
Show child attributes
優先ログストリームの場合は true、非優先の場合は false
ログストリーム名
Show child attributes
Show child attributes
ログのストリーミングを開始する日時(ISO 8601、省略可)
レスポンス
ログストリームが作成されました
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
これらのフィルターに一致するログイベントのみがストリームによって配信されます。省略されているか空の場合は、すべてのイベントが配信されます。
Show child attributes
Show child attributes
ログストリームの ID
優先ログストリームの場合は true、非優先の場合は false
ログストリーム名
Show child attributes
Show child attributes
Show child attributes
Show child attributes
ログストリームのステータス。指定可能な値: active、paused、suspended
active, paused, suspended http