Share via


Update the Friendly Name of a Subscription

 

Applies To: Windows Azure Pack

Updates the friendly name of a subscription.

Request

Replace <ServiceMgmt> with your Service Management API endpoint address. Replace <SubscriptionId> with the Subscription identifier for the required Subscription.

Method

Request URI

HTTP version

PATCH

https://<ServiceMgmt>:30005/subscriptions/<SubscriptionId>

HTTP/1.1

URI Parameters

None.

Request Headers

The following table describes required and optional request headers.

Request header

Description

Authorization: Bearer

Required. Authorization bearer token.

x-ms-principal-id:

Required. The principal identifier.

x-ms-client-request-id:

Optional. The client request identifier.

x-ms-client-session-id:

Optional. The client session identifier.

x-ms-principal-liveid:

Optional. The principal Live identifier.

Request Body

The following table describes the elements of the request body.

Element Name

Description

Subscription

A Subscription (Common object) object with the following elements defined:

Element

Description

SubscriptionID

The subscription identifier.

SubscriptionName

The updated subscription name.

Response

The response includes an HTTP status code, a set of response headers, and a response body.

Status Code

A successful operation returns status code 204 (NO CONTENT). 404 if the URI parameters are incorrect. 404 if the URI parameters are incorrect.

For information about status codes, see Status and Error Codes (Windows Azure Pack Service Management).

Response Headers

The response for this operation includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response Body

None.

Example

The following code example shows an Update Subscription Friendly Name request.

PATCH https://<Computer>:30005/subscriptions/1e0a2baf-c455-4613-932a-86d046d0e113 HTTP/1.1
Authorization: <Token>
x-ms-client-request-id: 134e00b3-1d39-4724-b09e-563f1c3c2546-2013-06-28 22:07:33Z
x-ms-client-session-id: fd7d55ae-4ea5-4624-b086-0522a50c87b2
x-ms-principal-id: person@contoso.com
Accept-Language: en-US
x-ms-principal-liveid: person@contoso.com
Content-Type: application/json; charset=utf-8
Host: <Computer>:30005
Content-Length: 410
Expect: 100-continue

{
  "SubscriptionID": "1e0a2baf-c455-4613-932a-86d046d0e113",
  "SubscriptionName": "FirstSubscription",
  "AccountAdminLiveEmailId": null,
  "ServiceAdminLiveEmailId": null,
  "CoAdminNames": null,
  "AddOnReferences": [

  ],
  "AddOns": [

  ],
  "State": 0,
  "QuotaSyncState": 0,
  "ActivationSyncState": 0,
  "PlanId": null,
  "Services": [

  ],
  "LastErrorMessage": null,
  "Features": null,
  "OfferFriendlyName": null,
  "OfferCategory": null,
  "Created": "0001-01-01T00:00:00"
}

See Also

Tenant Subscription Interfaces