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/compute/2021-07-01/virtualmachineimages Documentation

The virtualmachineimages SDK allows for interaction with the Azure Resource Manager Service compute (API Version 2021-07-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-07-01/virtualmachineimages"

Client Initialization

client := virtualmachineimages.NewVirtualMachineImagesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualMachineImagesClient.EdgeZoneGet

ctx := context.TODO()
id := virtualmachineimages.NewOfferSkuVersionID("12345678-1234-9876-4563-123456789012", "locationValue", "edgeZoneValue", "publisherValue", "offerValue", "skuValue", "versionValue")

read, err := client.EdgeZoneGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineImagesClient.EdgeZoneList

ctx := context.TODO()
id := virtualmachineimages.NewOfferSkuID("12345678-1234-9876-4563-123456789012", "locationValue", "edgeZoneValue", "publisherValue", "offerValue", "skuValue")

read, err := client.EdgeZoneList(ctx, id, virtualmachineimages.DefaultEdgeZoneListOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineImagesClient.EdgeZoneListOffers

ctx := context.TODO()
id := virtualmachineimages.NewEdgeZonePublisherID("12345678-1234-9876-4563-123456789012", "locationValue", "edgeZoneValue", "publisherValue")

read, err := client.EdgeZoneListOffers(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineImagesClient.EdgeZoneListPublishers

ctx := context.TODO()
id := virtualmachineimages.NewEdgeZoneID("12345678-1234-9876-4563-123456789012", "locationValue", "edgeZoneValue")

read, err := client.EdgeZoneListPublishers(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineImagesClient.EdgeZoneListSkus

ctx := context.TODO()
id := virtualmachineimages.NewVMImageOfferID("12345678-1234-9876-4563-123456789012", "locationValue", "edgeZoneValue", "publisherValue", "offerValue")

read, err := client.EdgeZoneListSkus(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineImagesClient.Get

ctx := context.TODO()
id := virtualmachineimages.NewSkuVersionID("12345678-1234-9876-4563-123456789012", "locationValue", "publisherValue", "offerValue", "skuValue", "versionValue")

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: VirtualMachineImagesClient.List

ctx := context.TODO()
id := virtualmachineimages.NewSkuID("12345678-1234-9876-4563-123456789012", "locationValue", "publisherValue", "offerValue", "skuValue")

read, err := client.List(ctx, id, virtualmachineimages.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineImagesClient.ListOffers

ctx := context.TODO()
id := virtualmachineimages.NewPublisherID("12345678-1234-9876-4563-123456789012", "locationValue", "publisherValue")

read, err := client.ListOffers(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineImagesClient.ListPublishers

ctx := context.TODO()
id := virtualmachineimages.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

read, err := client.ListPublishers(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineImagesClient.ListSkus

ctx := context.TODO()
id := virtualmachineimages.NewOfferID("12345678-1234-9876-4563-123456789012", "locationValue", "publisherValue", "offerValue")

read, err := client.ListSkus(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}