az apic integration create
Note
此参考是 Azure CLI(版本 2.57.0 或更高版本)的 apic-extension 扩展的一部分。 该扩展将在首次运行 az apic integration create 命令时自动安装。 了解更多关于扩展的信息。
命令
| 名称 | 说明 | 类型 | Status | 
|---|---|---|---|
| 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 APIM 添加到与 Azure API 中心实例相同的资源组中作为 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 实例的名称或资源 ID。
| 属性 | 值 | 
|---|---|
| Parameter group: | AzureApiManagementSource Arguments | 
集成的名称。
Azure API 中心资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
Azure API 中心服务的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指示是否应随元数据一起导入规范。
| 属性 | 值 | 
|---|---|
| Parameter group: | Properties Arguments | 
| 默认值: | always | 
| 接受的值: | always, never, ondemand | 
有权访问 API 管理实例的托管标识的资源 ID。
| 属性 | 值 | 
|---|---|
| Parameter group: | AzureApiManagementSource Arguments | 
目标环境资源 ID。
| 属性 | 值 | 
|---|---|
| Parameter group: | Properties Arguments | 
目标生命周期阶段。
| 属性 | 值 | 
|---|---|
| Parameter group: | Properties Arguments | 
| 接受的值: | deprecated, design, development, preview, production, retired, testing | 
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 | 
|---|---|
| 默认值: | False | 
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 | 
|---|---|
| 默认值: | False | 
输出格式。
| 属性 | 值 | 
|---|---|
| 默认值: | json | 
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc | 
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 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 机密引用。
| 属性 | 值 | 
|---|---|
| Parameter group: | AmazonApiGatewaySource Arguments | 
Amazon API 网关区域(例如 us-east-2)。
| 属性 | 值 | 
|---|---|
| Parameter group: | AmazonApiGatewaySource Arguments | 
Amazon API 网关机密访问密钥。 必须是 Azure Key Vault 机密引用。
| 属性 | 值 | 
|---|---|
| Parameter group: | AmazonApiGatewaySource Arguments | 
集成的名称。
Azure API 中心资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
Azure API 中心服务的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指示是否应随元数据一起导入规范。
| 属性 | 值 | 
|---|---|
| Parameter group: | Properties Arguments | 
| 默认值: | always | 
| 接受的值: | always, never, ondemand | 
有权访问 Azure Key Vault 的托管标识的资源 ID。
| 属性 | 值 | 
|---|---|
| Parameter group: | AmazonApiGatewaySource Arguments | 
目标环境资源 ID。
| 属性 | 值 | 
|---|---|
| Parameter group: | Properties Arguments | 
目标生命周期阶段。
| 属性 | 值 | 
|---|---|
| Parameter group: | Properties Arguments | 
| 接受的值: | deprecated, design, development, preview, production, retired, testing | 
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 | 
|---|---|
| 默认值: | False | 
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 | 
|---|---|
| 默认值: | False | 
输出格式。
| 属性 | 值 | 
|---|---|
| 默认值: | json | 
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc | 
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 | 
|---|---|
| 默认值: | False |