Kubernetes - Add
POST https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes?api-version=7.1
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
environment
|
path | True |
integer (int32) |
|
organization
|
path | True |
string |
Azure DevOps 組織的名稱。 |
project
|
path | True |
string |
項目識別碼或項目名稱 |
api-version
|
query | True |
string |
要使用的 API 版本。 這應該設定為 『7.1』 以使用此版本的 API。 |
要求本文
名稱 | 類型 | Description |
---|---|---|
clusterName |
string |
|
name |
string |
|
namespace |
string |
|
tags |
string[] |
kubernetes 資源的標記。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
成功作業 |
安全性
oauth2
類型:
oauth2
Flow:
accessCode
授權 URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
權杖 URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
範圍
名稱 | Description |
---|---|
vso.environment_manage | 提供管理環境的能力 |
定義
名稱 | Description |
---|---|
Environment |
|
Environment |
資源的類型。 |
Identity |
|
Kubernetes |
|
Kubernetes |
|
Reference |
表示 REST 參考連結集合的類別。 |
EnvironmentReference
名稱 | 類型 | Description |
---|---|---|
id |
integer (int32) |
|
name |
string |
EnvironmentResourceType
資源的類型。
值 | Description |
---|---|
generic |
未知的資源類型 |
kubernetes |
Kubernetes 資源類型 |
undefined | |
virtualMachine |
虛擬機資源類型 |
IdentityRef
名稱 | 類型 | Description |
---|---|---|
_links |
此欄位包含圖表主旨的相關零或更多有趣連結。 您可以叫用這些連結,以取得此圖表主題的其他關聯性或更詳細的資訊。 |
|
descriptor |
string |
描述元是在系統執行時參考圖表主旨的主要方式。 此欄位會唯一識別帳戶和組織之間的相同圖表主題。 |
directoryAlias |
string |
已淘汰 - 查詢 IdentityRef “_links” 字典中參考的 Graph 使用者,即可擷取 |
displayName |
string |
這是圖形主體的非唯一顯示名稱。 若要變更此欄位,您必須在來源提供者中變更其值。 |
id |
string |
|
imageUrl |
string |
已淘汰 - 可在 IdentityRef “_links” 字典的 “avatar” 專案中取得 |
inactive |
boolean |
已淘汰 - 可藉由查詢 GraphUser “_links” 字典的 “membershipState” 專案中參考的 Graph 成員資格狀態來擷取 |
isAadIdentity |
boolean |
已淘汰 - 可以從描述元的主體類型推斷 (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) |
isContainer |
boolean |
已淘汰 - 可以從描述元的主體類型推斷 (Descriptor.IsGroupType) |
isDeletedInOrigin |
boolean |
|
profileUrl |
string |
已淘汰 - 未在 ToIdentityRef 的大部分預先存在實作中使用 |
uniqueName |
string |
已淘汰 - 請改用 Domain+PrincipalName |
url |
string |
此 URL 是此圖表主體來源資源的完整路由。 |
KubernetesResource
名稱 | 類型 | Description |
---|---|---|
clusterName |
string |
|
createdBy | ||
createdOn |
string (date-time) |
|
environmentReference | ||
id |
integer (int32) |
|
lastModifiedBy | ||
lastModifiedOn |
string (date-time) |
|
name |
string |
|
namespace |
string |
|
serviceEndpointId |
string (uuid) |
|
tags |
string[] |
環境資源的標記。 |
type |
環境資源類型 |
KubernetesResourceCreateParameters
名稱 | 類型 | Description |
---|---|---|
clusterName |
string |
|
name |
string |
|
namespace |
string |
|
tags |
string[] |
kubernetes 資源的標記。 |
ReferenceLinks
表示 REST 參考連結集合的類別。
名稱 | 類型 | Description |
---|---|---|
links |
object |
連結的只讀檢視。 因為參考連結是只讀的,所以我們只想要將其公開為只讀。 |