Update an Existing Site
Applies To: Windows Azure Pack
Updates an existing site.
Replace {ServiceMgmt} with your Service Management API endpoint address. Replace {Port} with either 30005 for the tenant API or 30006 for the Public Tenant API. Replace {SUBSCRIPTIONID} with the required subscription identifier. Replace {WEBSPACENAME}, and {NAME} with the corresponding values for your website.
Method | Request URI | HTTP version |
|---|---|---|
PUT | https://<ServiceMgmt>:<Port>/{SUBSCRIPTIONID}/services/webspaces/{WEBSPACENAME}/sites/{NAME}?skipDnsRegistration={SKIPDNSREGISTRATION} | HTTP/1.1 |
URI parameter | Description |
|---|---|
skipDnsRegistration | Always specify skipDnsRegistration=true. |
The following table describes required and optional request headers.
Request header | Description |
|---|---|
x-ms-version | Required. Specifies the version of the operation to use for this request. This header should be set to 2012-10-10 or the current version. |
Content-Length | Required. |
Content-Type: application/json; charset=utf-8 | Required if the request body is sent in JSON format. |
accept: application/json | Optional. Use this header to receive the response in JSON format. |
The example code shows the format of the request body.
{
"AdminEnabled":true,
"AvailabilityState":0,
"Cers":[{
"CerBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"ExpirationDate":"\/Date(928174800000-0700)\/",
"FriendlyName":"String content",
"HostNames":["String content"],
"IssueDate":"\/Date(928174800000-0700)\/",
"Issuer":"String content",
"Password":"String content",
"PfxBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"PublicKeyHash":"String content",
"SelfLink":"http:\/\/www.example.com\/",
"SiteName":"String content",
"SubjectName":"String content",
"Thumbprint":"String content",
"ToDelete":true,
"Valid":true
}],
"ComputeMode":0,
"ContentAvailabilityState":0,
"Csrs":[{
"CsrString":"String content",
"DistinguishedName":"String content",
"HostNames":["String content"],
"Password":"String content",
"PfxBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"PublicKeyHash":"String content",
"SelfLink":"http:\/\/www.example.com\/",
"SiteName":"String content",
"ToDelete":true,
"Valid":true
}],
"Enabled":true,
"EnabledHostNames":["String content"],
"HostNameSslStates":[{
"IpBasedSslResult":"String content",
"Name":"String content",
"SslState":0,
"Thumbprint":"String content",
"ToUpdate":true,
"ToUpdateIpBasedSsl":true,
"VirtualIP":"String content"
}],
"HostNames":["String content"],
"LastModifiedTimeUtc":"\/Date(928174800000-0700)\/",
"Name":"String content",
"Owner":"String content",
"RepositorySiteName":"String content",
"RuntimeAvailabilityState":0,
"SSLCertificates":[{
"CerBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"ExpirationDate":"\/Date(928174800000-0700)\/",
"FriendlyName":"String content",
"HostNames":["String content"],
"IssueDate":"\/Date(928174800000-0700)\/",
"Issuer":"String content",
"Password":"String content",
"PfxBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"PublicKeyHash":"String content",
"SelfLink":"http:\/\/www.example.com\/",
"SiteName":"String content",
"SubjectName":"String content",
"Thumbprint":"String content",
"ToDelete":true,
"Valid":true
}],
"SelfLink":"http:\/\/www.example.com\/",
"ServerFarm":"String content",
"SiteMode":"String content",
"SiteProperties":{
"AppSettings":[{
"Name":"String content",
"Value":"String content"
}],
"Metadata":[{
"Name":"String content",
"Value":"String content"
}],
"Properties":[{
"Name":"String content",
"Value":"String content"
}]
},
"State":"String content",
"StorageRecoveryDefaultState":"String content",
"UsageState":0,
"WebSpace":"String content"
}
The following table describes the key elements of the request body.
Element name | Description | ||
|---|---|---|---|
HostNames | Required. The fully qualified domain name for a website. Only one host name can be specified in the azurewebsites.net domain. The host name should match the name of the website. Custom domains can only be specified for Shared or Standard websites. | ||
Name | Required. The name of the website. This name should match the host name in the default domain. | ||
ComputeMode | This value should be Shared for the Free or Paid Shared offerings, or Dedicated for the Standard offering. The default value is Shared. If you set the ComputeMode value to Dedicated, you must specify a value for the ServerFarm property. | ||
ServerFarm | The name of the server farm associated with this website. This is a required value for Standard mode. | ||
SiteMode | This value is Limited for the Free offering Basic for the Paid Shared offering. The default value is Limited.
| ||
WebspaceToCreate.GeoRegion | Required. The geographical region of the webspace to be created. See Quick Reference - Web Sites Service REST API for possible values. | ||
WebspaceToCreate.Name | Required. The name of the webspace. | ||
WebspaceToCreate.Plan | Required. This value must be VirtualDedicatedPlan. |
The response includes an HTTP status code, a set of response headers, and a response body.
A successful operation returns status code 200 (OK).
For information about status codes, see Error Codes (Web Sites Service REST API).
The response for this operation includes the following headers. The response can also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
Response header | Description |
|---|---|
x-ms-request-id | A value that uniquely identifies the request that is made against the management service. |
The code example shows the format of the response body.
{
"AdminEnabled":true,
"AvailabilityState":0,
"Cers":[{
"CerBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"ExpirationDate":"\/Date(928174800000-0700)\/",
"FriendlyName":"String content",
"HostNames":["String content"],
"IssueDate":"\/Date(928174800000-0700)\/",
"Issuer":"String content",
"Password":"String content",
"PfxBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"PublicKeyHash":"String content",
"SelfLink":"http:\/\/www.example.com\/",
"SiteName":"String content",
"SubjectName":"String content",
"Thumbprint":"String content",
"ToDelete":true,
"Valid":true
}],
"ComputeMode":0,
"ContentAvailabilityState":0,
"Csrs":[{
"CsrString":"String content",
"DistinguishedName":"String content",
"HostNames":["String content"],
"Password":"String content",
"PfxBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"PublicKeyHash":"String content",
"SelfLink":"http:\/\/www.example.com\/",
"SiteName":"String content",
"ToDelete":true,
"Valid":true
}],
"Enabled":true,
"EnabledHostNames":["String content"],
"HostNameSslStates":[{
"IpBasedSslResult":"String content",
"Name":"String content",
"SslState":0,
"Thumbprint":"String content",
"ToUpdate":true,
"ToUpdateIpBasedSsl":true,
"VirtualIP":"String content"
}],
"HostNames":["String content"],
"LastModifiedTimeUtc":"\/Date(928174800000-0700)\/",
"Name":"String content",
"Owner":"String content",
"RepositorySiteName":"String content",
"RuntimeAvailabilityState":0,
"SSLCertificates":[{
"CerBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"ExpirationDate":"\/Date(928174800000-0700)\/",
"FriendlyName":"String content",
"HostNames":["String content"],
"IssueDate":"\/Date(928174800000-0700)\/",
"Issuer":"String content",
"Password":"String content",
"PfxBlob":[81,
109,
70,
122,
90,
83,
65,
50,
78,
67,
66,
84,
100,
72,
74,
108,
89,
87,
48,
61],
"PublicKeyHash":"String content",
"SelfLink":"http:\/\/www.example.com\/",
"SiteName":"String content",
"SubjectName":"String content",
"Thumbprint":"String content",
"ToDelete":true,
"Valid":true
}],
"SelfLink":"http:\/\/www.example.com\/",
"ServerFarm":"String content",
"SiteMode":"String content",
"SiteProperties":{
"AppSettings":[{
"Name":"String content",
"Value":"String content"
}],
"Metadata":[{
"Name":"String content",
"Value":"String content"
}],
"Properties":[{
"Name":"String content",
"Value":"String content"
}]
},
"State":"String content",
"StorageRecoveryDefaultState":"String content",
"UsageState":0,
"WebSpace":"String content"
}
See the preceding table that describes the request body for descriptions of the key elements of the response body.
