The Delete Certificate operation deletes the specified certificate object for the specified subscription ID.
Request
The Delete Certificate request may be specified
as follows. Replace <subscription-id>
with your
subscription ID and <certificate-id>
with your
certificate ID
Method | Request URI | HTTP Version |
---|---|---|
DELETE |
|
HTTP/1.1 |
URI Parameters
None.
Request Headers
The following table describes request headers.
Request Header | Description |
---|---|
Authorization |
Specifies the credentials for this request. The value of this header must be set Negotiate <token>. |
Request Body
None
Response
The response includes an HTTP status code, a set of response headers, and a response body.
Status Code
The status code is embedded in the response for this operation; if successful, it will be status code 200 (OK).
Response Headers
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 |
---|---|
None |
None |
Response Body
None.
Example
Delete a certificate.
Copy Code | |
---|---|
public void DeleteCert(string tenantServiceEndpoint, string subscriptionid, string thumbprint) { HttpClient httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("BASIC", Convert.ToBase64String(UnicodeEncoding.Unicode.GetBytes("TenantPortal:" + ”password”))))); string subscriptionEndpoint = tenantServiceEndpoint + "subscriptions/" + subscriptionid + "/certificates/" + thumbprint; var response = httpClient.DeleteAsync(subscriptionEndpoint); var resultsStr = response.Result.Content.ReadAsStringAsync().Result; Console.WriteLine(resultsStr + "\n Successfully deleted Certificate"); } |