package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/webtestsapis
Documentation
The webtestsapis
SDK allows for interaction with the Azure Resource Manager Service applicationinsights
(API Version 2015-05-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/webtestsapis"
Client Initialization
client := webtestsapis.NewWebTestsAPIsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: WebTestsAPIsClient.WebTestsCreateOrUpdate
ctx := context.TODO()
id := webtestsapis.NewWebTestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "webTestValue")
payload := webtestsapis.WebTest{
// ...
}
read, err := client.WebTestsCreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WebTestsAPIsClient.WebTestsDelete
ctx := context.TODO()
id := webtestsapis.NewWebTestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "webTestValue")
read, err := client.WebTestsDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WebTestsAPIsClient.WebTestsGet
ctx := context.TODO()
id := webtestsapis.NewWebTestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "webTestValue")
read, err := client.WebTestsGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WebTestsAPIsClient.WebTestsList
ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
// alternatively `client.WebTestsList(ctx, id)` can be used to do batched pagination
items, err := client.WebTestsListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: WebTestsAPIsClient.WebTestsListByComponent
ctx := context.TODO()
id := webtestsapis.NewComponentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "componentValue")
// alternatively `client.WebTestsListByComponent(ctx, id)` can be used to do batched pagination
items, err := client.WebTestsListByComponentComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: WebTestsAPIsClient.WebTestsListByResourceGroup
ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
// alternatively `client.WebTestsListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.WebTestsListByResourceGroupComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: WebTestsAPIsClient.WebTestsUpdateTags
ctx := context.TODO()
id := webtestsapis.NewWebTestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "webTestValue")
payload := webtestsapis.TagsResource{
// ...
}
read, err := client.WebTestsUpdateTags(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}