The Delete Resource Provider operation deletes the specified resource provider object.

Request

The Delete Resource Provider request may be specified as follows. Replace <resource-provider-id> with your resource provider ID

Method Request URI HTTP Version

DELETE

https://admin-management.contoso.net/resourceproviders/<resource-provider-ID>

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 resource provider.

  Copy Code
public void DeleteResourceProvider(string adminServiceEndpoint, string rpname)
{
	HttpClient httpClient = new HttpClient();
	httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("BASIC", Convert.ToBase64String(UnicodeEncoding.Unicode.GetBytes("AdminPortal:" + ”password”)))));

	string subscriptionEndpoint = adminServiceEndpoint + "resourceproviders/" + rpname;
	var response = httpClient.DeleteAsync(subscriptionEndpoint);
	var resultsStr = response.Result.Content.ReadAsStringAsync().Result;
	Console.WriteLine(resultsStr + "\n Successfully deleted Resource Provider");
}