Create Trust#
トラストを作成します。
APIエンドポイント#
| リージョン | APIエンドポイント |
|---|---|
| 西日本リージョン3の場合 | https://identity.jp-west-3.cloud.global.fujitsu.com |
| 東日本リージョン3の場合 | https://identity.jp-east-3.cloud.global.fujitsu.com |
HTTPメソッドとURI#
POST
/v3/OS-TRUST/trusts
HTTPステータスコード#
正常時:201
エラー時:400, 401, 403, 404, 405, 409, 415, 503
リクエストパラメータの説明#
| 名前 | In | Type | デフォルト値 /必須指定 |
Description |
|---|---|---|---|---|
| trust | body | object | 必須 | トラストオブジェクト |
| expires_at | body | string | 必須 | トラストの有効期限 "YYYY-MM-DD-Thh:mm:ss.uuuuuuZ"の形式で入力します。 例:"2015-02-27T18:30:59.999999Z" |
| impersonation | body | boolean | 必須 | 委譲設定 「true」の場合は、トラストが委譲者の情報で認証されます。 「false」の場合は、受託者の情報で認証されます。 |
| project_id | body | string | 必須 | 委譲するロールが割り当てられているプロジェクトID |
| roles | body | array | 必須 | ロールオブジェクトのリスト |
| name | body | string | 必須 | 委譲するロール名 |
| trustee_user_id | body | string | 必須 | 受託者のユーザーID |
| trustor_user_id | body | string | 必須 | 委譲者のユーザーID 本APIの実行者のユーザIDを指定する必要があります。 |
レスポンスボディ(正常系)の説明#
| 名前 | Type | Description |
|---|---|---|
| trust | object | トラストオブジェクト |
| impersonation | boolean | 委譲設定 「true」の場合は、トラストが委譲者の情報で認証されます。 「false」の場合は、受託者の情報で認証されます。 |
| roles_link | object | トラストのロールへのリンクURL |
| trustor_user_id | string | 委譲者のユーザーID |
| links | object | トラストへのリンクURL |
| roles | object | ロールオブジェクトのリスト |
| id | string | 委譲するロールID |
| links | object | ロールへのリンクURL |
| name | string | 委譲するロール名 |
| remaining_users | string | トークンを取得できる回数 |
| expires_at | string | トラストの有効期限 "YYYY-MM-DD-Thh:mm:ss.uuuuuuZ"の形式で表示されます。 例:"2015-02-27T18:30:59.999999Z" |
| trustee_user_id | string | 受託者のユーザーID |
| project_id | string | 委譲するロールが割り当てられているプロジェクトID |
| id | string | トラストID |
リクエスト例#
{ "trust": { "expires_at": "2015-02-27T18:30:59.999999Z", "impersonation": true, "project_id": "--project-id--", "roles": [ { "name": "--role-name--" } ], "trustee_user_id": "--trustee-user-id--", "trustor_user_id": "--trustor-user-id--" } }
レスポンス例#
{ "trust": { "impersonation": true, "roles_links": { "self": "http://identity.jp-east-1.cloud.global.fujitsu.com/v3/OS-TRUST/trusts/--trust_id--/roles", "previous": null, "next": null }, "trustor_user_id": "--trustor_user_id--", "links": { "self": "http://identity.jp-east-1.cloud.global.fujitsu.com/v3/OS-TRUST/trusts/--trust_id--" }, "roles": [ { "id": "--role_id--", "links": { "self": "http://identity.jp-east-1.cloud.global.fujitsu.com/v3/roles/--role_id--" }, "name": "--role_name--" } ], "remaining_uses": "5", "expires_at": "2015-02-27T18:30:59.999999Z", "trustee_user_id": "--trustee_user_id--", "project_id": "--project_id--", "id": "--trust_id--" } }