Swap Deployment
Mis à jour: juillet 2011
The Swap Deployment operation initiates a virtual IP swap between the staging and production deployment environments for a service. If the service is currently running in the staging environment, it will be swapped to the production environment. If it is running in the production environment, it will be swapped to staging. For more information on this type of upgrade, see Échanger les adresses IP virtuelles d'un service.
The Swap Deployment operation is an asynchronous operation. To determine whether the Management service has finished processing the request, call Get Operation Status. For more information on asynchronous operations, see Tracking Asynchronous Service Management Requests.
The Swap Deployment request may be specified as follows. Replace <subscription-id> with your subscription ID, and <service-name> with your service name:
| Method | Request URI | HTTP Version |
|---|---|---|
|
POST |
|
HTTP/1.1 |
None.
The following table describes required and optional request headers.
| Request Header | Description |
|---|---|
|
Content-Type |
Required. Set this header to application/xml. |
|
x-ms-version |
Required. Specifies the version of the operation to use for this request. This header should be set to 2009-10-01 or later. For more information about versioning headers, see Service Management Versioning. |
The format of the request body is as follows:
<?xml version="1.0" encoding="utf-8"?> <Swap xmlns="http://schemas.microsoft.com/windowsazure"> <Production>production-deployment-name</Production> <SourceDeployment>deployment-name-to-be-swapped-with-production</SourceDeployment> </Swap>
Important |
|---|
| The order of the elements in the request body is significant. If an element is required, it must appear in the XML in the order shown above. |
The following table describes the key elements of the request body:
| Element name | Description |
|---|---|
|
Production |
Required. The name of the production deployment. |
|
SourceDeployment |
Required. The name of the source deployment. |
The response includes an HTTP status code and a set of response headers.
Because Swap Deployment is an asynchronous operation, it always returns status code 202 (Accepted). To determine the status code for the operation once it is complete, call Get Operation Status. The status code is embedded in the response for this operation; if successful, it will be status code 200 (OK).
For information about status codes, see Service Management Status and Error Codes.
The response for this operation includes the following headers. The response may 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 a request made against the management service. For an asynchronous operation, you can call get operation status with the value of the header to determine whether the operation is complete, has failed, or is still in progress. See Tracking Asynchronous Service Management Requests for more information. |
None.
Any management certificate associated with the subscription specified by <subscription-id> can be used to authenticate this operation. For additional details, see Authenticating Service Management Requests.
If the Swap Deployment operation is specified with deployment names that don’t match what is currently in production and staging, status code 409 (Conflict) is returned.
Voir aussi
Important