Share via


Subscription - Cancel

The operation to cancel a subscription

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel?api-version=2021-10-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

Subscription Id.

api-version
query True

string

Version of the API to be used with the client request. Current version is 2021-10-01

Responses

Name Type Description
200 OK

CanceledSubscriptionId

OK. The request has succeeded.

Other Status Codes

ErrorResponseBody

Describes the error if the operation is not successful.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

cancelSubscription

Sample request

POST https://management.azure.com/subscriptions/83aa47df-e3e9-49ff-877b-94304bf3d3ad/providers/Microsoft.Subscription/cancel?api-version=2021-10-01

Sample response

{
  "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad"
}

Definitions

Name Description
CanceledSubscriptionId

The ID of the canceled subscription

ErrorResponse

Describes the format of Error response.

ErrorResponseBody

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

CanceledSubscriptionId

The ID of the canceled subscription

Name Type Description
subscriptionId

string

The ID of the canceled subscription

ErrorResponse

Describes the format of Error response.

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

ErrorResponseBody

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
code

string

Error code

error

ErrorResponse

The details of the error.

message

string

Error message indicating why the operation failed.