Cluster IAMアクセスの作成

Prev Next

VPC環境で利用できます。

入力された情報で作成されたクラスタの IAMアクセスを作成します。

リクエスト

リクエスト形式を説明します。リクエスト形式は次の通りです。

メソッド URI
POST /clusters/{uuid}/access-entries

リクエストヘッダ

Ncloud Kubernetes Service APIリクエストで共通して使用されるヘッダの詳細は、Ncloud Kubernetes Serviceの共通リクエストヘッダをご参照ください。

リクエスト構文

リクエスト構文は次の通りです。

{
  "type": "string",
  "entry": "string",
  "groups": [
    "string"
  ],
  "policies": [
    {
      "type": "string",
      "scope": "string",
      "namespaces": [
        "string"
      ]
    }
  ]
}

リクエストボディ

リクエストボディの説明は次の通りです。

フィールド タイプ 必須の有無 説明
type String Required IAMアクセスタイプ
  • USER
  • ROLE
entry String Required IAM USER、ROLE別 NRN情報
groups[] Array Optional グループ名
policies[] Array Optional 追加対象のポリシーリスト
policies[].type String Conditional ポリシーのタイプ
  • policies[]入力時、必須
  • NKSClusterAdminPolicy
  • NKSAdminPolicy
  • NKSEditPolicy
  • NKSViewPolicy
policies[].scope String Conditional ポリシーの範囲
  • policies[]入力時、必須
  • cluster
  • namespace
policies[].namespaces Array Conditional ネームスペース
  • policies[].scope設定がnamespaceの場合、必須

リクエスト例

リクエストのサンプルコードは次の通りです。

curl --location --request POST 'https://nks.apigw.ntruss.com/vnks/v2/clusters/****a20e-e0fb-4dc9-af1b-97fd3f8d****/access-entries' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Sub Account Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json'
--data '{
  "type": "USER",
  "entry": "string",
  "groups": [
    "string"
  ],
  "policies": [
    {
      "type": "string",
      "scope": "string",
      "namespaces": [
        "string"
      ]
    }
  ]
}'

レスポンス

レスポンス形式を説明します。

レスポンス構文

レスポンス構文は次の通りです。

{
    "uuid": "string"
}

レスポンスボディ

レスポンスボディの説明は次の通りです。

フィールド タイプ 必須の有無 説明
uuid String - クラスタの UUID

レスポンスステータスコード

Ncloud Kubernetes Service APIで共通して使用されるレスポンスステータスコードの詳細は、Ncloud Kubernetes Serviceのレスポンスステータスコードをご参照ください。

レスポンス例

レスポンスのサンプルコードは次の通りです。

{
    "uuid": "****a20e-e0fb-4dc9-af1b-97fd3f8d****"
}