package
0.20240125.1100331
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/applicationgateways
Documentation
The applicationgateways
SDK allows for interaction with the Azure Resource Manager Service network
(API Version 2023-04-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-sdk/resource-manager/network/2023-04-01/applicationgateways"
Client Initialization
client := applicationgateways.NewApplicationGatewaysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ApplicationGatewaysClient.BackendHealth
ctx := context.TODO()
id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue")
if err := client.BackendHealthThenPoll(ctx, id, applicationgateways.DefaultBackendHealthOperationOptions()); err != nil {
// handle the error
}
Example Usage: ApplicationGatewaysClient.BackendHealthOnDemand
ctx := context.TODO()
id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue")
payload := applicationgateways.ApplicationGatewayOnDemandProbe{
// ...
}
if err := client.BackendHealthOnDemandThenPoll(ctx, id, payload, applicationgateways.DefaultBackendHealthOnDemandOperationOptions()); err != nil {
// handle the error
}
Example Usage: ApplicationGatewaysClient.CreateOrUpdate
ctx := context.TODO()
id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue")
payload := applicationgateways.ApplicationGateway{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ApplicationGatewaysClient.Delete
ctx := context.TODO()
id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ApplicationGatewaysClient.Get
ctx := context.TODO()
id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue")
read, err := client.Get(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ApplicationGatewaysClient.GetSslPredefinedPolicy
ctx := context.TODO()
id := applicationgateways.NewPredefinedPolicyID("12345678-1234-9876-4563-123456789012", "predefinedPolicyValue")
read, err := client.GetSslPredefinedPolicy(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ApplicationGatewaysClient.List
ctx := context.TODO()
id := applicationgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ApplicationGatewaysClient.ListAll
ctx := context.TODO()
id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination
items, err := client.ListAllComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ApplicationGatewaysClient.ListAvailableRequestHeaders
ctx := context.TODO()
id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
read, err := client.ListAvailableRequestHeaders(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ApplicationGatewaysClient.ListAvailableResponseHeaders
ctx := context.TODO()
id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
read, err := client.ListAvailableResponseHeaders(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ApplicationGatewaysClient.ListAvailableServerVariables
ctx := context.TODO()
id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
read, err := client.ListAvailableServerVariables(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ApplicationGatewaysClient.ListAvailableSslOptions
ctx := context.TODO()
id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
read, err := client.ListAvailableSslOptions(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies
ctx := context.TODO()
id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
// alternatively `client.ListAvailableSslPredefinedPolicies(ctx, id)` can be used to do batched pagination
items, err := client.ListAvailableSslPredefinedPoliciesComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ApplicationGatewaysClient.ListAvailableWafRuleSets
ctx := context.TODO()
id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
read, err := client.ListAvailableWafRuleSets(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ApplicationGatewaysClient.Start
ctx := context.TODO()
id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue")
if err := client.StartThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ApplicationGatewaysClient.Stop
ctx := context.TODO()
id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue")
if err := client.StopThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ApplicationGatewaysClient.UpdateTags
ctx := context.TODO()
id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue")
payload := applicationgateways.TagsObject{
// ...
}
read, err := client.UpdateTags(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}