Azure 在动态创建的web应用服务中添加自定义域的SSL绑定
我已经使用RESTAPI创建了azure web应用程序。我想将SSL证书添加到我的web应用程序。我的web应用程序是使用azure api动态创建的。因此,在创建web应用程序时,还需要为每个web应用程序绑定SSL。是否有使用rest api自定义域SSL绑定的选项 我正在使用通配符SSL 是否有使用rest api自定义域SSL绑定的选项 是,您可以使用RESTAPI将现有SSL绑定添加到Azure web应用程序Azure 在动态创建的web应用服务中添加自定义域的SSL绑定,azure,ssl-certificate,azure-web-app-service,Azure,Ssl Certificate,Azure Web App Service,我已经使用RESTAPI创建了azure web应用程序。我想将SSL证书添加到我的web应用程序。我的web应用程序是使用azure api动态创建的。因此,在创建web应用程序时,还需要为每个web应用程序绑定SSL。是否有使用rest api自定义域SSL绑定的选项 我正在使用通配符SSL 是否有使用rest api自定义域SSL绑定的选项 是,您可以使用RESTAPI将现有SSL绑定添加到Azure web应用程序 Url: https://management.azure.com/su
Url: https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{snapshotName}?api-version={api-version}
Method: PUT
Parameter:
subscriptionId The identifier of your subscription where the snapshot is being created.
resourceGroup The name of the resource group that will contain the snapshot.
WebappName The name of the WebappName.
api-version The version of the API to use.
Request content:
{
"properties": {
"HostNameSslStates": [
{
"SslState": "the SSL state",
"ToUpdate": "True",
"Thumbprint": "The Thumbprint of the certificate, you could find it in the portal",
"Name": "yourwebsitename"
}
]
},
"kind": "app",
"location": "yourlocation",
"tags": {
"hidden-related:/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.Web/serverfarms/{yourserviceplan}": "empty"
}
}
更多详细信息,请参考以下C#代码:
首先,在本地计算机中创建一个Josn.txt
,以存储要设置的属性:
{
"properties": {
"HostNameSslStates": [
{
"SslState": "1",
"ToUpdate": "True",
"Thumbprint": "BE58B05C5CADE03628D0D58B369D0DA6F535B0FA",
"Name": "example.com" //your custom domain
}
]
},
"kind": "app",
"location": "East Asia",
"tags": {
"hidden-related:/subscriptions/xxxxxxxxxxxxxxxx/resourcegroups/xxxxxxxxxxxxx/providers/Microsoft.Web/serverfarms/BrandoTestServicePlan": "empty"
}
}
C#代码:
输出:
有关更多详细信息,请参阅此
顺便说一句,正如Jayendran所说,您也可以使用C代码而不是RESTAPI。你可以参考这个
希望对你有帮助
是否有使用rest api自定义域SSL绑定的选项
是,您可以使用RESTAPI将现有SSL绑定添加到Azure web应用程序
Url: https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{snapshotName}?api-version={api-version}
Method: PUT
Parameter:
subscriptionId The identifier of your subscription where the snapshot is being created.
resourceGroup The name of the resource group that will contain the snapshot.
WebappName The name of the WebappName.
api-version The version of the API to use.
Request content:
{
"properties": {
"HostNameSslStates": [
{
"SslState": "the SSL state",
"ToUpdate": "True",
"Thumbprint": "The Thumbprint of the certificate, you could find it in the portal",
"Name": "yourwebsitename"
}
]
},
"kind": "app",
"location": "yourlocation",
"tags": {
"hidden-related:/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.Web/serverfarms/{yourserviceplan}": "empty"
}
}
更多详细信息,请参考以下C#代码:
首先,在本地计算机中创建一个Josn.txt
,以存储要设置的属性:
{
"properties": {
"HostNameSslStates": [
{
"SslState": "1",
"ToUpdate": "True",
"Thumbprint": "BE58B05C5CADE03628D0D58B369D0DA6F535B0FA",
"Name": "example.com" //your custom domain
}
]
},
"kind": "app",
"location": "East Asia",
"tags": {
"hidden-related:/subscriptions/xxxxxxxxxxxxxxxx/resourcegroups/xxxxxxxxxxxxx/providers/Microsoft.Web/serverfarms/BrandoTestServicePlan": "empty"
}
}
C#代码:
输出:
有关更多详细信息,请参阅此
顺便说一句,正如Jayendran所说,您也可以使用C代码而不是RESTAPI。你可以参考这个
希望能对您有所帮助。请详细说明您的要求以及您当前的研究报告……。@Jinesh您能看一下吗请详细说明您的要求以及您当前的研究报告……。@Jinesh您能看一下吗谢谢,但我收到了错误“错误请求”appname是指完整地址还是仅指姓名?abc.azurewerbsite.com是我的网络应用程序。那么什么是appname?只需使用abc就可以了。好的,然后是“Name”:“test.azureclubs.com”你能告诉我这些名称值是什么吗?不。你的自定义域名。比如
example.com
。位置是webapp的。没有任何许可。谢谢,但我收到错误“错误请求”appname是指完整地址还是仅指姓名?abc.azurewerbsite.com是我的网络应用程序。那么什么是appname?只需使用abc就可以了。好的,然后是“Name”:“test.azureclubs.com”你能告诉我这些名称值是什么吗?不。你的自定义域名。比如example.com
。位置是webapp的。没有任何许可。