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/storagecache/2023-05-01/caches Documentation

The caches SDK allows for interaction with the Azure Resource Manager Service storagecache (API Version 2023-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/storagecache/2023-05-01/caches"

Client Initialization

client := caches.NewCachesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CachesClient.CreateOrUpdate

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

payload := caches.Cache{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: CachesClient.DebugInfo

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.DebugInfoThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.Delete

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.Flush

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.FlushThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.Get

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

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

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// 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: CachesClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: CachesClient.PausePrimingJob

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

payload := caches.PrimingJobIdParameter{
	// ...
}


if err := client.PausePrimingJobThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: CachesClient.ResumePrimingJob

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

payload := caches.PrimingJobIdParameter{
	// ...
}


if err := client.ResumePrimingJobThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: CachesClient.SpaceAllocation

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")
var payload []StorageTargetSpaceAllocation

if err := client.SpaceAllocationThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: CachesClient.Start

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.StartThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.StartPrimingJob

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

payload := caches.PrimingJob{
	// ...
}


if err := client.StartPrimingJobThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: CachesClient.Stop

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.StopThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.StopPrimingJob

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

payload := caches.PrimingJobIdParameter{
	// ...
}


if err := client.StopPrimingJobThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: CachesClient.Update

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

payload := caches.Cache{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: CachesClient.UpgradeFirmware

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.UpgradeFirmwareThenPoll(ctx, id); err != nil {
	// handle the error
}

# Functions

NewCacheID returns a new CacheId struct.
No description provided by the author
ParseCacheID parses 'input' into a CacheId.
ParseCacheIDInsensitively parses 'input' case-insensitively into a CacheId note: this method should only be used for API response data and not user input.
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
ValidateCacheID checks that 'input' can be parsed as a Cache ID.

# Constants

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
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
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
No description provided by the author

# Structs

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
CacheId is a struct representing the Resource ID for a Cache.
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
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
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

# Type aliases

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