C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Actions;
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.Actions.Modules.UpdateAsync(
id: "id",
request: new UpdateActionModuleRequestContent()
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.actions.types.UpdateActionModuleRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.actions().modules().update(
"id",
UpdateActionModuleRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Actions\Modules\Requests\UpdateActionModuleRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->actions->modules->update(
'id',
new UpdateActionModuleRequestContent([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.actions.modules.update(
id="id",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.actions.modules.update(id: "id")
curl --request PATCH \
--url https://{tenantDomain}/api/v2/actions/modules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"secrets": [
{
"name": "<string>",
"value": "<string>"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
dependencies: [{name: '<string>', version: '<string>'}],
secrets: [{name: '<string>', value: '<string>'}]
})
};
fetch('https://{tenantDomain}/api/v2/actions/modules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/actions/modules/{id}"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"dependencies\": [\n {\n \"name\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"secrets\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"actions_using_module_total": 123,
"all_changes_published": true,
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"id": "<string>",
"latest_version": {
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"id": "<string>",
"secrets": [
{
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"version_number": 123
},
"latest_version_number": 123,
"name": "<string>",
"secrets": [
{
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}Action Module を更新
既存の Actions Module のプロパティ(コード、依存関係、シークレットなど)を更新します。
PATCH
https://{tenantDomain}/api/v2
/
actions
/
modules
/
{id}
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Actions;
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.Actions.Modules.UpdateAsync(
id: "id",
request: new UpdateActionModuleRequestContent()
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.actions.types.UpdateActionModuleRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.actions().modules().update(
"id",
UpdateActionModuleRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Actions\Modules\Requests\UpdateActionModuleRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->actions->modules->update(
'id',
new UpdateActionModuleRequestContent([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.actions.modules.update(
id="id",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.actions.modules.update(id: "id")
curl --request PATCH \
--url https://{tenantDomain}/api/v2/actions/modules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"secrets": [
{
"name": "<string>",
"value": "<string>"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
dependencies: [{name: '<string>', version: '<string>'}],
secrets: [{name: '<string>', value: '<string>'}]
})
};
fetch('https://{tenantDomain}/api/v2/actions/modules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/actions/modules/{id}"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"dependencies\": [\n {\n \"name\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"secrets\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"actions_using_module_total": 123,
"all_changes_published": true,
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"id": "<string>",
"latest_version": {
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"id": "<string>",
"secrets": [
{
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"version_number": 123
},
"latest_version_number": 123,
"name": "<string>",
"secrets": [
{
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
更新する Action Module の ID。
ボディ
application/jsonapplication/x-www-form-urlencoded
レスポンス
Action Module が更新されました。
このモジュールを使用しているデプロイ済み Actions の数。
すべてのドラフトでの変更がバージョンとして公開済みかどうか。
モジュールのドラフトバージョンのソースコード。
モジュールが作成された日時。
モジュールのドラフトバージョンの npm dependencies。
Show child attributes
Show child attributes
モジュールの一意の ID。
参照オブジェクトとしての最新の公開済みバージョン。公開済みのバージョンがない場合は省略されます。
Show child attributes
Show child attributes
最新の公開済みバージョンのバージョン番号。公開済みバージョンがない場合は省略されます。
モジュール名。
モジュールのドラフトバージョンの secrets(名前とタイムスタンプのみで、値は返されません)。
Show child attributes
Show child attributes
モジュールが最後に更新された日時。
⌘I