メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
keys
/
encryption
Go
package example

import (
    client "github.com/auth0/go-auth0/management/client"
    option "github.com/auth0/go-auth0/management/option"
    context "context"
    keys "github.com/auth0/go-auth0/management/keys"
    management "github.com/auth0/go-auth0/management"
)

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Keys.Encryption.Create(
        context.TODO(),
        &keys.CreateEncryptionKeyRequestContent{
            Type: management.CreateEncryptionKeyTypeCustomerProvidedRootKey,
        },
    )
}
{
  "kid": "<string>",
  "type": "customer-provided-root-key",
  "state": "pre-activation",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "parent_kid": "<string>",
  "public_key": "<string>"
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

ボディ

type
enum<string>
必須

Type of the encryption key to be created.

利用可能なオプション:
customer-provided-root-key,
tenant-encryption-key

レスポンス

The key was successfully created.

Encryption key

kid
string
必須

Key ID

type
enum<string>
必須

Key type

利用可能なオプション:
customer-provided-root-key,
environment-root-key,
tenant-master-key,
tenant-encryption-key
state
enum<string>
必須

Key state

利用可能なオプション:
pre-activation,
active,
deactivated,
destroyed
created_at
string<date-time>
必須

Key creation timestamp

updated_at
string<date-time>
必須

Key update timestamp

parent_kid
string | null

ID of parent wrapping key

public_key
string | null

Public key in PEM format