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/compute/2021-11-01/virtualmachineextensions
Documentation
The virtualmachineextensions
SDK allows for interaction with the Azure Resource Manager Service compute
(API Version 2021-11-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/compute/2021-11-01/virtualmachineextensions"
Client Initialization
client := virtualmachineextensions.NewVirtualMachineExtensionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: VirtualMachineExtensionsClient.CreateOrUpdate
ctx := context.TODO()
id := virtualmachineextensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineValue", "extensionValue")
payload := virtualmachineextensions.VirtualMachineExtension{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualMachineExtensionsClient.Delete
ctx := context.TODO()
id := virtualmachineextensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineValue", "extensionValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VirtualMachineExtensionsClient.Get
ctx := context.TODO()
id := virtualmachineextensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineValue", "extensionValue")
read, err := client.Get(ctx, id, virtualmachineextensions.DefaultGetOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: VirtualMachineExtensionsClient.List
ctx := context.TODO()
id := virtualmachineextensions.NewVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineValue")
read, err := client.List(ctx, id, virtualmachineextensions.DefaultListOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: VirtualMachineExtensionsClient.Update
ctx := context.TODO()
id := virtualmachineextensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineValue", "extensionValue")
payload := virtualmachineextensions.VirtualMachineExtensionUpdate{
// ...
}
if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
# Functions
No description provided by the author
No description provided by the author
NewExtensionID returns a new ExtensionId struct.
No description provided by the author
NewVirtualMachineID returns a new VirtualMachineId struct.
ParseExtensionID parses 'input' into a ExtensionId.
ParseExtensionIDInsensitively parses 'input' case-insensitively into a ExtensionId note: this method should only be used for API response data and not user input.
ParseVirtualMachineID parses 'input' into a VirtualMachineId.
ParseVirtualMachineIDInsensitively parses 'input' case-insensitively into a VirtualMachineId note: this method should only be used for API response data and not user input.
No description provided by the author
ValidateExtensionID checks that 'input' can be parsed as a Extension ID.
ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
ExtensionId is a struct representing the Resource ID for a Extension.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
VirtualMachineId is a struct representing the Resource ID for a Virtual Machine.
# Type aliases
No description provided by the author