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.Actions.Versions.DeployAsync(
actionId: "actionId",
id: "id",
request: new DeployActionVersionRequestContent()
);
}
}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.DeployActionVersionRequestBodyParams{}
mgmt.Actions.Versions.Deploy(
context.TODO(),
"actionId",
"id",
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import java.util.Optional;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.actions().versions().deploy(
"actionId",
"id",
Optional.empty()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Types\DeployActionVersionRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->actions->versions->deploy(
'actionId',
'id',
new DeployActionVersionRequestContent([]),
);
from auth0.management import ManagementClient, DeployActionVersionRequestContent
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.actions.versions.deploy(
action_id="actionId",
id="id",
request=DeployActionVersionRequestContent(),
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.actions.versions.deploy(
action_id: "actionId",
id: "id",
request: {}
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.actions.versions.deploy("actionId", "id", {});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.actions.versions.deploy("actionId", "id", {});
}
main();
curl --request POST \
--url https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions/{id}/deploy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"update_draft": false
}
'{
"action": {
"all_changes_deployed": false,
"created_at": "2021-01-01T00:00:00.000Z",
"id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"name": "my-action",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
},
"action_id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"built_at": "2021-01-01T00:00:00.000Z",
"code": "module.exports = () => {}",
"created_at": "2021-01-01T00:00:00.000Z",
"dependencies": [
{
"name": "<string>",
"registry_url": "<string>",
"version": "<string>"
}
],
"deployed": true,
"errors": [
{
"id": "<string>",
"msg": "<string>",
"url": "<string>"
}
],
"id": "12a3b9e6-06e6-4a29-96bf-90c82fe79a0d",
"modules": [
{
"module_id": "<string>",
"module_name": "<string>",
"module_version_id": "<string>",
"module_version_number": 123
}
],
"number": 1,
"runtime": "node22",
"secrets": [
{
"name": "mySecret",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"status": "built",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
}ドラフトバージョンをデプロイ
Action を指定した以前のバージョンにロールバックするのと同等の処理を実行します。指定したバージョンと同一の、新しいデプロイ済み Action バージョンが作成されます。この Action が現在トリガーにバインドされている場合、システムは新しく作成されたバージョンの実行を直ちに開始します。
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.Actions.Versions.DeployAsync(
actionId: "actionId",
id: "id",
request: new DeployActionVersionRequestContent()
);
}
}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.DeployActionVersionRequestBodyParams{}
mgmt.Actions.Versions.Deploy(
context.TODO(),
"actionId",
"id",
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import java.util.Optional;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.actions().versions().deploy(
"actionId",
"id",
Optional.empty()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Types\DeployActionVersionRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->actions->versions->deploy(
'actionId',
'id',
new DeployActionVersionRequestContent([]),
);
from auth0.management import ManagementClient, DeployActionVersionRequestContent
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.actions.versions.deploy(
action_id="actionId",
id="id",
request=DeployActionVersionRequestContent(),
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.actions.versions.deploy(
action_id: "actionId",
id: "id",
request: {}
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.actions.versions.deploy("actionId", "id", {});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.actions.versions.deploy("actionId", "id", {});
}
main();
curl --request POST \
--url https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions/{id}/deploy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"update_draft": false
}
'{
"action": {
"all_changes_deployed": false,
"created_at": "2021-01-01T00:00:00.000Z",
"id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"name": "my-action",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
},
"action_id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"built_at": "2021-01-01T00:00:00.000Z",
"code": "module.exports = () => {}",
"created_at": "2021-01-01T00:00:00.000Z",
"dependencies": [
{
"name": "<string>",
"registry_url": "<string>",
"version": "<string>"
}
],
"deployed": true,
"errors": [
{
"id": "<string>",
"msg": "<string>",
"url": "<string>"
}
],
"id": "12a3b9e6-06e6-4a29-96bf-90c82fe79a0d",
"modules": [
{
"module_id": "<string>",
"module_name": "<string>",
"module_version_id": "<string>",
"module_version_number": 123
}
],
"number": 1,
"runtime": "node22",
"secrets": [
{
"name": "mySecret",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"status": "built",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
}承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ボディ
元に戻したバージョンで action の下書きを更新する場合は true。
レスポンス
Action バージョンを作成するリクエストは受理されました。
このバージョンが属するアクション。
Show child attributes
Show child attributes
このバージョンが属する action の ID。
このバージョンのビルドが正常に完了した時刻。
この action の特定のバージョンのソースコード。
このバージョンが作成された時刻。
この特定のバージョンが依存するサードパーティ製 npm モジュールとそのバージョンの一覧。
Show child attributes
Show child attributes
この特定のバージョンが現在デプロイされているバージョンかどうかを示します。
このバージョンのビルド中に発生したエラー。
Show child attributes
Show child attributes
アクションバージョンの一意の ID。
このアクションバージョンで使用される Action Module とそのバージョンの一覧。
Show child attributes
Show child attributes
action のバージョン一覧におけるこのバージョンのインデックス。
Node ランタイム。例: node22
action またはそのバージョンに含まれるシークレットの一覧。
Show child attributes
Show child attributes
このバージョン固有のビルドステータス。
pending, building, packaged, built, retrying, failed このバージョンがサポートするトリガーの一覧。現時点では、1 つのバージョンで対象にできるトリガーは同時に 1 つだけです。
1Show child attributes
Show child attributes
バージョンが更新された時刻。バージョンが外部から更新されることはありません。Auth0 がアクションバージョンをビルド中にのみ更新します。