Azure APIM导入GraphQl API
Azure APIM现在支持GraphQl PassThrough(最后构建中的GA)。这很好,但仍然没有关于如何通过编程导入的文档。一旦Terraform创建了APIM,我们将通过门户手动进行操作。我们看了CLI,但尚无支持,如下命令所示。
az apim api import --path
--resource-group
--service-name
--specification-format {OpenApi, OpenApiJson, Swagger, Wadl, Wsdl}
有什么办法可以通过Terraform导入它?通过PS脚本本地执行。
Azure APIM now support graphql passthrough (GA in last Build). This is fine but still no documentation on how it can be imported programmatically. We are doing it manually via Portal once Terraform has created the APIM. We had a look at cli but no support yet as shown in below command.
az apim api import --path
--resource-group
--service-name
--specification-format {OpenApi, OpenApiJson, Swagger, Wadl, Wsdl}
Is there any way we can import this via terraform ? local-exec through ps script.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们需要将GraphQl规范 - Format添加到 https://learn.microsoft.com/en-us/cli/azure/apim/api?view= azure-cli-cli-latest#az-apim-apim-api-import
我们确实支持使用以下方法在CLI中创建GraphQl API和GraphQl架构的上传,这可以用作解决方案。
APIM API创建-Service-name myapim -g myResourceGroup -api-id mygraphqlapi -path'/mygraphqlapi'/mygraphqlapi' - display-name'my graphql api'-api-type'-api-type
AZ APIM API架构创建-Service-name myapim -g myResourceGroup -api-id myapi -schema-id graphQl -schema-type-schema-type application/vnd.ms-aim-aim-aim-aim-aigure-apim。 graphql.schema -schema-path c:\ path \ to \ schema.gql
we'll need to add the Graphql specification-format to the https://learn.microsoft.com/en-us/cli/azure/apim/api?view=azure-cli-latest#az-apim-api-import
we do support the creation of a GraphQL Api and the upload of a GraphQL Schema in cli using the below method, which may serve as a work around.
az apim api create --service-name MyApim -g MyResourceGroup --api-id MyGraphqlApi --path '/mygraphqlapi' --display-name 'My GraphQL API' --api-type graphql
az apim api schema create --service-name MyApim -g MyResourceGroup --api-id MyApi --schema-id graphql --schema-type application/vnd.ms-azure-apim.graphql.schema --schema-path c:\path\to\schema.gql