チームの資格証明の作成
post
/api/v2/teams/{id}/credentials/
次の資格証明フィールドを指定してこのリソースに対してPOSTリクエストを行って、このチームに関連付けられる新しい資格証明を作成します。
name
: この資格証明の名前。(文字列、必須)description
: この資格証明のオプションの説明。(文字列、デフォルト=""
)-
credential_type
: 作成する資格証明のタイプを指定します。 各タイプの詳細は、Ansible Towerのドキュメントを参照してください。(id、必須) -
inputs
: JSONまたはYAML構文を使用して入力を入力します。 構文例は、Ansible Towerのドキュメントを参照してください。(json、デフォルト={}
)
リクエスト
サポートされているメディア・タイプ
- application/json
パス・パラメータ
ルート・スキーマ : schema
例:
{
"credential_type":1,
"inputs":{
"username":"someusername"
},
"name":"Some name",
"team":1
}
レスポンス
サポートされているメディア・タイプ
- application/json
201レスポンス
レスポンスの例(application/json)
{
"cloud":false,
"created":"2018-02-01T08:00:00.000000Z",
"credential_type":1,
"description":"",
"id":1,
"inputs":{
"username":"someusername"
},
"kind":"ssh",
"kubernetes":false,
"managed_by_tower":false,
"modified":"2018-02-01T08:00:00.000000Z",
"name":"Some name",
"related":{
"access_list":"/api/v2/credentials/1/access_list/",
"activity_stream":"/api/v2/credentials/1/activity_stream/",
"copy":"/api/v2/credentials/1/copy/",
"credential_type":"/api/v2/credential_types/1/",
"input_sources":"/api/v2/credentials/1/input_sources/",
"object_roles":"/api/v2/credentials/1/object_roles/",
"organization":"/api/v2/organizations/1/",
"owner_teams":"/api/v2/credentials/1/owner_teams/",
"owner_users":"/api/v2/credentials/1/owner_users/"
},
"summary_fields":{
"credential_type":{
"description":"",
"id":1,
"name":"Machine"
},
"object_roles":{
"admin_role":{
"description":"Can manage all aspects of the credential",
"id":18,
"name":"Admin"
},
"read_role":{
"description":"May view settings for the credential",
"id":20,
"name":"Read"
},
"use_role":{
"description":"Can use the credential in a job template",
"id":19,
"name":"Use"
}
},
"organization":{
"description":"test-org-desc",
"id":1,
"name":"test-org"
},
"owners":[
{
"description":"test-org-desc",
"id":1,
"name":"test-org",
"type":"organization",
"url":"/api/v2/organizations/1/"
},
{
"description":"",
"id":1,
"name":"test-team",
"type":"team",
"url":"/api/v2/teams/1/"
}
],
"user_capabilities":{
"copy":false,
"delete":true,
"edit":true,
"use":true
}
},
"type":"credential",
"url":"/api/v2/credentials/1/"
}