Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何通过C#创建Azure API管理实例?_Azure_Azure Api Management - Fatal编程技术网

如何通过C#创建Azure API管理实例?

如何通过C#创建Azure API管理实例?,azure,azure-api-management,Azure,Azure Api Management,我一直在使用Microsoft.Azure.Management.Fluent软件包创建一个工具,该工具将构建我的环境并进行一些额外的设置。现在,我需要添加一个API管理实例。我在Fluent SDK中没有看到任何与API管理相关的内容。我假设没有SDK包装器,其余的调用我自己来完成。我在找一本指南。你可以用REST来做: 您必须在请求正文中将链接传递给您的: { "properties": { "templateLink": {

我一直在使用Microsoft.Azure.Management.Fluent软件包创建一个工具,该工具将构建我的环境并进行一些额外的设置。现在,我需要添加一个API管理实例。我在Fluent SDK中没有看到任何与API管理相关的内容。我假设没有SDK包装器,其余的调用我自己来完成。我在找一本指南。

你可以用REST来做:

您必须在请求正文中将链接传递给您的:

{
  "properties": {
    "templateLink": {
      "uri": "https://example.com/exampleTemplate.json"
    },
    "parameters": {},
    "mode": "Complete",
    "onErrorDeployment": {
      "type": "SpecificDeployment",
      "deploymentName": "name-of-deployment-to-use"
     }
   }
}
您可以将ARM模板存储在Blob存储中,并在主体中引用它


请在

上找到API管理ARM模板示例。您可以使用REST进行此操作:

您必须在请求正文中将链接传递给您的:

{
  "properties": {
    "templateLink": {
      "uri": "https://example.com/exampleTemplate.json"
    },
    "parameters": {},
    "mode": "Complete",
    "onErrorDeployment": {
      "type": "SpecificDeployment",
      "deploymentName": "name-of-deployment-to-use"
     }
   }
}
您可以将ARM模板存储在Blob存储中,并在主体中引用它


请在

上查找API管理ARM模板示例当前,
Fluent API
中不支持
API管理
。这里有一个关于这个的例子

相反,还有另一个包,您可以使用它创建
API管理实例
。代码如下所示:

        // you should provide the real credentialhere.
        ApiManagementClient client = new ApiManagementClient(the_credential);

        //provide the neccesary parameters to create the APIM instance.
        client.ApiManagementService.CreateOrUpdate(the_parameters);

创建
API管理的另一种方法是使用以下API:
。您可以阅读api文档了解其用法和示例。

目前,
Fluent api
中不支持
api管理。这里有一个关于这个的例子

相反,还有另一个包,您可以使用它创建
API管理实例
。代码如下所示:

        // you should provide the real credentialhere.
        ApiManagementClient client = new ApiManagementClient(the_credential);

        //provide the neccesary parameters to create the APIM instance.
        client.ApiManagementService.CreateOrUpdate(the_parameters);

创建
API管理的另一种方法是使用以下API:
。您可以阅读api文档了解其用法和示例。

谢谢,是的,这对我使用IAzure.fluent api运行ARM模板很有效,但我现在的问题是无法检查其存在性,因此我可能不得不在blob存储中使用ARM模板。谢谢,是的,这对我使用IAzure.API运行ARM模板很有效,但是我现在遇到了无法检查是否存在的问题,因此我可能不得不在blob存储中使用ARM模板。预览包很好。我将转换为这个,因为它简化了API管理器创建后需要执行的一系列配置。谢谢。预览包很好。我将转换为这个,因为它简化了API管理器创建后需要执行的一系列配置。谢谢你。