az apic integration create
Note
此參考是 Azure CLI 的 apic-extension 延伸 模組的一部分(2.57.0 版或更高版本)。 擴充功能會在您第一次執行 az apic integration create 命令時自動安裝
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az apic integration create apim |
將 Azure APIM 新增為 API 來源。 |
Extension | GA |
| az apic integration create aws |
將 Amazon API 閘道新增為 API 來源。 |
Extension | GA |
az apic integration create apim
將 Azure APIM 新增為 API 來源。
az apic integration create apim --azure-apim
--integration-name
--resource-group
--service-name
[--import-specification {always, never, ondemand}]
[--msi-resource-id]
[--target-environment-id]
[--target-lifecycle-stage {deprecated, design, development, preview, production, retired, testing}]
範例
在與 Azure API 中心實例相同的資源群組中新增 Azure APIM 作為 API 來源
az apic integration create apim -g contoso-resources -n contoso -i sync-from-my-apim --azure-apim myapim
將另一個資源群組中的 Azure APIM 新增為 API 來源
az apic integration create apim -g contoso-resources -n contoso -i sync-from-my-apim --azure-apim /subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/samplegroup/providers/Microsoft.ApiManagement/service/sampleapim
必要參數
來源 APIM 實例的名稱或資源識別碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | AzureApiManagementSource Arguments |
整合的名稱。
Azure API 中心資源群組的名稱。 您可以使用 az configure --defaults group=<name>來設定預設群組。
Azure API 中心服務的名稱。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
指出是否應該與元數據一起匯入規格。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 預設值: | always |
| 接受的值: | always, never, ondemand |
可存取 API 管理實例之受控識別的資源識別碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | AzureApiManagementSource Arguments |
目標環境資源標識碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
目標生命周期階段。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | deprecated, design, development, preview, production, retired, testing |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az apic integration create aws
將 Amazon API 閘道新增為 API 來源。
az apic integration create aws --aws-access-key-reference
--aws-region-name
--aws-secret-access-key-reference
--integration-name
--resource-group
--service-name
[--import-specification {always, never, ondemand}]
[--msi-resource-id]
[--target-environment-id]
[--target-lifecycle-stage {deprecated, design, development, preview, production, retired, testing}]
範例
將 Amazon API 閘道新增為 API 來源
az apic integration create aws -g contoso-resources -n contoso -i sync-from-my-amazon-api-gateway -a https://{keyvaultName}.vault.azure.net/secrets/{secretName1} -s https://{keyvaultName}.vault.azure.net/secrets/{secretName2} -r us-east-2
必要參數
Amazon API 閘道存取金鑰。 必須是 Azure Key Vault 秘密參考。
| 屬性 | 值 |
|---|---|
| 參數群組: | AmazonApiGatewaySource Arguments |
Amazon API 閘道區域(例如 us-east-2)。
| 屬性 | 值 |
|---|---|
| 參數群組: | AmazonApiGatewaySource Arguments |
Amazon API 閘道秘密存取金鑰。 必須是 Azure Key Vault 秘密參考。
| 屬性 | 值 |
|---|---|
| 參數群組: | AmazonApiGatewaySource Arguments |
整合的名稱。
Azure API 中心資源群組的名稱。 您可以使用 az configure --defaults group=<name>來設定預設群組。
Azure API 中心服務的名稱。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
指出是否應該與元數據一起匯入規格。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 預設值: | always |
| 接受的值: | always, never, ondemand |
可存取 Azure Key Vault 之受控識別的資源標識碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | AmazonApiGatewaySource Arguments |
目標環境資源標識碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
目標生命周期階段。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | deprecated, design, development, preview, production, retired, testing |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |