Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Application Insights WebTests SDK
var resourceGroup = "RESOURCE_GROUP_NAME";
var resource = new WebTestResource(...);
var identity = resource.ResourceIdentity;
using (var client = new ResourceManagementClient(credentials))
var result = client.Resources.CreateOrUpdateAsync(resourceGroup, identity, resource).ConfigureAwait(false);
if (result.StatusCode != HttpStatusCode.Ok && result.StatusCode != HttpStatusCode.Created)
throw new HttpResponseException(result.StatusCode);
return result.Resource;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.