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/web/2016-06-01/customapis
Documentation
The customapis
SDK allows for interaction with the Azure Resource Manager Service web
(API Version 2016-06-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/web/2016-06-01/customapis"
Client Initialization
client := customapis.NewCustomAPIsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: CustomAPIsClient.CreateOrUpdate
ctx := context.TODO()
id := customapis.NewCustomApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customApiValue")
payload := customapis.CustomApiDefinition{
// ...
}
read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CustomAPIsClient.Delete
ctx := context.TODO()
id := customapis.NewCustomApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customApiValue")
read, err := client.Delete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CustomAPIsClient.ExtractApiDefinitionFromWsdl
ctx := context.TODO()
id := customapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")
payload := customapis.WsdlDefinition{
// ...
}
read, err := client.ExtractApiDefinitionFromWsdl(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CustomAPIsClient.Get
ctx := context.TODO()
id := customapis.NewCustomApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customApiValue")
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: CustomAPIsClient.List
ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
read, err := client.List(ctx, id, customapis.DefaultListOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CustomAPIsClient.ListByResourceGroup
ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
read, err := client.ListByResourceGroup(ctx, id, customapis.DefaultListByResourceGroupOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CustomAPIsClient.ListWsdlInterfaces
ctx := context.TODO()
id := customapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")
payload := customapis.WsdlDefinition{
// ...
}
read, err := client.ListWsdlInterfaces(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CustomAPIsClient.Move
ctx := context.TODO()
id := customapis.NewCustomApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customApiValue")
payload := customapis.CustomApiReference{
// ...
}
read, err := client.Move(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CustomAPIsClient.Update
ctx := context.TODO()
id := customapis.NewCustomApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customApiValue")
payload := customapis.CustomApiDefinition{
// ...
}
read, err := client.Update(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}