共用方式為


Product - Delete

刪除產品。

DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}?api-version=2021-08-01
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}?deleteSubscriptions={deleteSubscriptions}&api-version=2021-08-01

URI 參數

名稱 位於 必要 類型 Description
productId
path True

string

minLength: 1
maxLength: 256

產品標識碼。 目前 API 管理服務實例中必須是唯一的。

resourceGroupName
path True

string

資源群組的名稱。

serviceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

API 管理服務的名稱。

subscriptionId
path True

string

可唯一識別Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶標識碼會形成每個服務呼叫 URI 的一部分。

api-version
query True

string

要與用戶端要求搭配使用的 API 版本。

deleteSubscriptions
query

boolean

刪除與產品相關聯的現有訂閱。

要求標頭

名稱 必要 類型 Description
If-Match True

string

實體的 ETag。 ETag 應符合 GET 要求的標頭回應中目前的實體狀態,或應為 * 進行無條件更新。

回應

名稱 類型 Description
200 OK

已成功移除產品。

204 No Content

產品已由先前的要求成功移除,或不存在。

Other Status Codes

ErrorResponse

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

ApiManagementDeleteProduct

範例要求

DELETE https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct?deleteSubscriptions=True&api-version=2021-08-01

範例回覆

定義

名稱 Description
ErrorFieldContract

錯誤欄位合約。

ErrorResponse

錯誤回應。

ErrorFieldContract

錯誤欄位合約。

名稱 類型 Description
code

string

屬性層級錯誤碼。

message

string

人類可讀取的屬性層級錯誤表示法。

target

string

屬性名稱。

ErrorResponse

錯誤回應。

名稱 類型 Description
error.code

string

服務定義的錯誤碼。 此程式代碼可作為回應中所指定 HTTP 錯誤碼的子狀態。

error.details

ErrorFieldContract[]

要求中傳送無效欄位的清單,以防驗證錯誤。

error.message

string

人類可讀取的錯誤表示法。