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/redis/2024-03-01/redis Documentation

The redis SDK allows for interaction with the Azure Resource Manager Service redis (API Version 2024-03-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/redis/2024-03-01/redis"

Client Initialization

client := redis.NewRedisClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RedisClient.AccessPolicyAssignmentCreateUpdate

ctx := context.TODO()
id := redis.NewAccessPolicyAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "accessPolicyAssignmentValue")

payload := redis.RedisCacheAccessPolicyAssignment{
	// ...
}


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

Example Usage: RedisClient.AccessPolicyAssignmentDelete

ctx := context.TODO()
id := redis.NewAccessPolicyAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "accessPolicyAssignmentValue")

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

Example Usage: RedisClient.AccessPolicyAssignmentGet

ctx := context.TODO()
id := redis.NewAccessPolicyAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "accessPolicyAssignmentValue")

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

Example Usage: RedisClient.AccessPolicyAssignmentList

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

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

Example Usage: RedisClient.AccessPolicyCreateUpdate

ctx := context.TODO()
id := redis.NewAccessPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "accessPolicyValue")

payload := redis.RedisCacheAccessPolicy{
	// ...
}


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

Example Usage: RedisClient.AccessPolicyDelete

ctx := context.TODO()
id := redis.NewAccessPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "accessPolicyValue")

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

Example Usage: RedisClient.AccessPolicyGet

ctx := context.TODO()
id := redis.NewAccessPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "accessPolicyValue")

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

Example Usage: RedisClient.AccessPolicyList

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

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

Example Usage: RedisClient.CheckNameAvailability

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

payload := redis.CheckNameAvailabilityParameters{
	// ...
}


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

Example Usage: RedisClient.Create

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

payload := redis.RedisCreateParameters{
	// ...
}


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

Example Usage: RedisClient.Delete

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

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

Example Usage: RedisClient.ExportData

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

payload := redis.ExportRDBParameters{
	// ...
}


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

Example Usage: RedisClient.FirewallRulesCreateOrUpdate

ctx := context.TODO()
id := redis.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "firewallRuleValue")

payload := redis.RedisFirewallRule{
	// ...
}


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

Example Usage: RedisClient.FirewallRulesDelete

ctx := context.TODO()
id := redis.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "firewallRuleValue")

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

Example Usage: RedisClient.FirewallRulesGet

ctx := context.TODO()
id := redis.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "firewallRuleValue")

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

Example Usage: RedisClient.FirewallRulesList

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

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

Example Usage: RedisClient.FlushCache

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

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

Example Usage: RedisClient.ForceReboot

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

payload := redis.RedisRebootParameters{
	// ...
}


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

Example Usage: RedisClient.Get

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

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: RedisClient.ImportData

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

payload := redis.ImportRDBParameters{
	// ...
}


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

Example Usage: RedisClient.LinkedServerCreate

ctx := context.TODO()
id := redis.NewLinkedServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "linkedServerValue")

payload := redis.RedisLinkedServerCreateParameters{
	// ...
}


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

Example Usage: RedisClient.LinkedServerDelete

ctx := context.TODO()
id := redis.NewLinkedServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "linkedServerValue")

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

Example Usage: RedisClient.LinkedServerGet

ctx := context.TODO()
id := redis.NewLinkedServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "linkedServerValue")

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

Example Usage: RedisClient.LinkedServerList

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

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

Example Usage: RedisClient.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: RedisClient.ListBySubscription

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

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

Example Usage: RedisClient.ListKeys

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

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

Example Usage: RedisClient.ListUpgradeNotifications

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

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

Example Usage: RedisClient.PatchSchedulesCreateOrUpdate

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

payload := redis.RedisPatchSchedule{
	// ...
}


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

Example Usage: RedisClient.PatchSchedulesDelete

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

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

Example Usage: RedisClient.PatchSchedulesGet

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

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

Example Usage: RedisClient.PatchSchedulesListByRedisResource

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

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

Example Usage: RedisClient.RegenerateKey

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

payload := redis.RedisRegenerateKeyParameters{
	// ...
}


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

Example Usage: RedisClient.Update

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

payload := redis.RedisUpdateParameters{
	// ...
}


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

# Functions

No description provided by the author
NewAccessPolicyAssignmentID returns a new AccessPolicyAssignmentId struct.
NewAccessPolicyID returns a new AccessPolicyId struct.
NewFirewallRuleID returns a new FirewallRuleId struct.
NewLinkedServerID returns a new LinkedServerId struct.
NewRediID returns a new RediId struct.
No description provided by the author
ParseAccessPolicyAssignmentID parses 'input' into a AccessPolicyAssignmentId.
ParseAccessPolicyAssignmentIDInsensitively parses 'input' case-insensitively into a AccessPolicyAssignmentId note: this method should only be used for API response data and not user input.
ParseAccessPolicyID parses 'input' into a AccessPolicyId.
ParseAccessPolicyIDInsensitively parses 'input' case-insensitively into a AccessPolicyId note: this method should only be used for API response data and not user input.
ParseFirewallRuleID parses 'input' into a FirewallRuleId.
ParseFirewallRuleIDInsensitively parses 'input' case-insensitively into a FirewallRuleId note: this method should only be used for API response data and not user input.
ParseLinkedServerID parses 'input' into a LinkedServerId.
ParseLinkedServerIDInsensitively parses 'input' case-insensitively into a LinkedServerId note: this method should only be used for API response data and not user input.
ParseRediID parses 'input' into a RediId.
ParseRediIDInsensitively parses 'input' case-insensitively into a RediId 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
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
ValidateAccessPolicyAssignmentID checks that 'input' can be parsed as a Access Policy Assignment ID.
ValidateAccessPolicyID checks that 'input' can be parsed as a Access Policy ID.
ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID.
ValidateLinkedServerID checks that 'input' can be parsed as a Linked Server ID.
ValidateRediID checks that 'input' can be parsed as a Redi 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
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
AccessPolicyAssignmentId is a struct representing the Resource ID for a Access Policy Assignment.
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
AccessPolicyId is a struct representing the Resource ID for a Access Policy.
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
FirewallRuleId is a struct representing the Resource ID for a Firewall Rule.
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
LinkedServerId is a struct representing the Resource ID for a Linked Server.
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
RediId is a struct representing the Resource ID for a Redi.
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
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