az apim api schema

管理 Azure API 管理 API 架構。

命令

名稱 Description 類型 狀態
az apim api schema create

建立API 管理 API 架構。

核心 GA
az apim api schema delete

刪除API 管理 API 架構。

核心 GA
az apim api schema get-etag

取得API 管理 API 架構的 etag。

核心 GA
az apim api schema list

列出 API 架構API 管理。

核心 GA
az apim api schema show

顯示API 管理 API 架構的詳細資料。

核心 GA
az apim api schema wait

將 CLI 置於等候狀態,直到符合 apim API 架構的條件為止。

核心 GA

az apim api schema create

建立API 管理 API 架構。

az apim api schema create --api-id
                          --resource-group
                          --schema-id
                          --schema-type
                          --service-name
                          [--no-wait]
                          [--resource-type]
                          [--schema-content]
                          [--schema-name]
                          [--schema-path]

範例

建立 API 架構。

az apim api schema create --service-name MyApim -g MyResourceGroup --api-id MyApi --schema-id schemaId --schema-type schemaType --schema-path schemaFilePath

必要參數

--api-id

需要建立架構之 API 的唯一名稱。

API 修訂識別碼。 在目前API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為尾碼,其中 n 是修訂編號。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--schema-id

要建立之 API 架構的唯一名稱。

架構識別碼。 在目前API 管理服務實例中必須是唯一的。

--schema-type

架構類型(例如 application/json、application/vnd.ms-azure-apim.graphql.schema)。

必須是 Content-Type 標頭中使用的有效媒體類型,如 RFC 2616 中所定義。 架構檔的媒體類型。

--service-name -n

API 管理服務實例的名稱。

選擇性參數

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--resource-type

資源的型別。 例如「Microsoft.Compute/virtualMachines」 或 「Microsoft」。儲存體/storageAccounts」。

--schema-content

定義代表架構之檔的 Json 逸出字串。

指定 --schema-path 或 --schema-content,而不是兩者。

--schema-name

架構資源的名稱。

--schema-path

指定匯入 API 架構的檔案路徑。

指定 --schema-path 或 --schema-content,而不是兩者。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az apim api schema delete

刪除API 管理 API 架構。

az apim api schema delete --api-id
                          --resource-group
                          --schema-id
                          --service-name
                          [--if-match]
                          [--no-wait]
                          [--yes]

範例

刪除 API 架構。

az apim api schema delete --service-name MyApim -g MyResourceGroup --api-id MyApi --schema-id schemaId

必要參數

--api-id

API 識別碼。 在目前API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為尾碼,其中 n 是修訂編號。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--schema-id

架構識別碼。 在目前API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為尾碼,其中 n 是修訂編號。

--service-name -n

API 管理服務實例的名稱。

選擇性參數

--if-match

實體的 ETag。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az apim api schema get-etag

取得API 管理 API 架構的 etag。

az apim api schema get-etag --api-id
                            --resource-group
                            --schema-id
                            --service-name

範例

取得架構實體標記。

az apim api schema get-etag --service-name MyApim -g MyResourceGroup --api-id MyApi --schema-id schemaId

必要參數

--api-id

API 識別碼。 在目前API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為尾碼,其中 n 是修訂編號。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--schema-id

架構識別碼。 在目前API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為尾碼,其中 n 是修訂編號。

--service-name -n

API 管理服務實例的名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az apim api schema list

列出 API 架構API 管理。

az apim api schema list --api-id
                        --resource-group
                        --service-name
                        [--filter-display-name]
                        [--skip]
                        [--top]

範例

取得與 API 識別碼相關聯的架構清單。

az apim api schema list --service-name MyApim -g MyResourceGroup --api-id MyApi

必要參數

--api-id

API 識別碼。 在目前API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為尾碼,其中 n 是修訂編號。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--service-name -n

API 管理服務實例的名稱。

選擇性參數

--filter-display-name

依 displayName 篩選 API。

--skip

要略過的記錄數目。

--top

要傳回的記錄筆數。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az apim api schema show

顯示API 管理 API 架構的詳細資料。

az apim api schema show --api-id
                        --resource-group
                        --schema-id
                        --service-name

範例

取得 API 架構。

az apim api schema show --service-name MyApim -g MyResourceGroup --api-id MyApi --schema-id schemaId

必要參數

--api-id

API 識別碼。 在目前API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為尾碼,其中 n 是修訂編號。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--schema-id

架構識別碼。 在目前API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為尾碼,其中 n 是修訂編號。

--service-name -n

API 管理服務實例的名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az apim api schema wait

將 CLI 置於等候狀態,直到符合 apim API 架構的條件為止。

az apim api schema wait --api-id
                        --name
                        --resource-group
                        --schema-id
                        [--created]
                        [--custom]
                        [--deleted]
                        [--exists]
                        [--interval]
                        [--timeout]
                        [--updated]

範例

將 CLI 置於等候狀態,直到符合 apim API 架構的條件為止。

az apim api schema wait --created --api-id MyApi --name MyApim --schema-id schemaId -g MyResourceGroup

必要參數

--api-id

API 修訂識別碼。 在目前API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為尾碼,其中 n 是修訂編號。 必要。

--name -n

API 管理服務實例的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--schema-id

架構識別碼識別碼。 在目前API 管理服務實例中必須是唯一的。 必要。

選擇性參數

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

預設值: False
--custom

等到條件符合自訂 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到刪除為止。

預設值: False
--exists

等候資源存在。

預設值: False
--interval

輪詢間隔以秒為單位。

預設值: 30
--timeout

以秒為單位的等候上限。

預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。