armredis

package module
v2.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 15 Imported by: 9

README

Azure Cache for Redis Module for Go

PkgGoDev

The armredis module provides operations for working with Azure Cache for Redis.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Cache for Redis module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Cache for Redis. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Cache for Redis module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armredis.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armredis.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewClient()

More sample code

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Cache for Redis label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKeys

type AccessKeys struct {
	// READ-ONLY; The current primary key that clients can use to authenticate with Redis cache.
	PrimaryKey *string

	// READ-ONLY; The current secondary key that clients can use to authenticate with Redis cache.
	SecondaryKey *string
}

AccessKeys - Redis cache access keys.

func (AccessKeys) MarshalJSON

func (a AccessKeys) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccessKeys.

func (*AccessKeys) UnmarshalJSON

func (a *AccessKeys) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccessKeys.

type AsyncOperationStatusClient

type AsyncOperationStatusClient struct {
	// contains filtered or unexported fields
}

AsyncOperationStatusClient contains the methods for the AsyncOperationStatus group. Don't use this type directly, use NewAsyncOperationStatusClient() instead.

func NewAsyncOperationStatusClient

func NewAsyncOperationStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AsyncOperationStatusClient, error)

NewAsyncOperationStatusClient creates a new instance of AsyncOperationStatusClient with the specified values.

  • subscriptionID - Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AsyncOperationStatusClient) Get

Get - For checking the ongoing status of an operation If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • location - The location at which operation was triggered
  • operationID - The ID of asynchronous operation
  • options - AsyncOperationStatusClientGetOptions contains the optional parameters for the AsyncOperationStatusClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheAsyncOperationStatus.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAsyncOperationStatusClient().Get(ctx, "East US", "c7ba2bf5-5939-4d79-b037-2964ccf097da", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.OperationStatus = armredis.OperationStatus{
// 	Name: to.Ptr("c7ba2bf5-5939-4d79-b037-2964ccf097da"),
// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.Cache/locations/East US/asyncOperations/c7ba2bf5-5939-4d79-b037-2964ccf097da"),
// 	Status: to.Ptr("Succeeded"),
// }
Output:

type AsyncOperationStatusClientGetOptions

type AsyncOperationStatusClientGetOptions struct {
}

AsyncOperationStatusClientGetOptions contains the optional parameters for the AsyncOperationStatusClient.Get method.

type AsyncOperationStatusClientGetResponse

type AsyncOperationStatusClientGetResponse struct {
	OperationStatus
}

AsyncOperationStatusClientGetResponse contains the response from method AsyncOperationStatusClient.Get.

type CheckNameAvailabilityParameters

type CheckNameAvailabilityParameters struct {
	// REQUIRED; Resource name.
	Name *string

	// REQUIRED; Resource type. The only legal value of this property for checking redis cache name availability is 'Microsoft.Cache/redis'.
	Type *string
}

CheckNameAvailabilityParameters - Parameters body to pass for resource name availability check.

func (CheckNameAvailabilityParameters) MarshalJSON

func (c CheckNameAvailabilityParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityParameters.

func (*CheckNameAvailabilityParameters) UnmarshalJSON

func (c *CheckNameAvailabilityParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityParameters.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client contains the methods for the Redis group. Don't use this type directly, use NewClient() instead.

func NewClient

func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values.

  • subscriptionID - Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*Client) BeginCreate

func (client *Client) BeginCreate(ctx context.Context, resourceGroupName string, name string, parameters CreateParameters, options *ClientBeginCreateOptions) (*runtime.Poller[ClientCreateResponse], error)

BeginCreate - Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • parameters - Parameters supplied to the Create Redis operation.
  • options - ClientBeginCreateOptions contains the optional parameters for the Client.BeginCreate method.
Example (RedisCacheCreate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginCreate(ctx, "rg1", "cache1", armredis.CreateParameters{
	Location: to.Ptr("West US"),
	Properties: &armredis.CreateProperties{
		EnableNonSSLPort:  to.Ptr(true),
		MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2),
		RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
			MaxmemoryPolicy: to.Ptr("allkeys-lru"),
		},
		RedisVersion:       to.Ptr("4"),
		ReplicasPerPrimary: to.Ptr[int32](2),
		ShardCount:         to.Ptr[int32](2),
		SKU: &armredis.SKU{
			Name:     to.Ptr(armredis.SKUNamePremium),
			Capacity: to.Ptr[int32](1),
			Family:   to.Ptr(armredis.SKUFamilyP),
		},
		StaticIP: to.Ptr("192.168.0.5"),
		SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"),
	},
	Zones: []*string{
		to.Ptr("1")},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ResourceInfo = armredis.ResourceInfo{
// 	Name: to.Ptr("cache1"),
// 	Type: to.Ptr("Microsoft.Cache/Redis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armredis.Properties{
// 		EnableNonSSLPort: to.Ptr(false),
// 		MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2),
// 		RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
// 			Maxclients: to.Ptr("1000"),
// 			MaxmemoryDelta: to.Ptr("50"),
// 			MaxmemoryReserved: to.Ptr("50"),
// 		},
// 		RedisVersion: to.Ptr("4.0.14"),
// 		ReplicasPerMaster: to.Ptr[int32](2),
// 		ReplicasPerPrimary: to.Ptr[int32](2),
// 		SKU: &armredis.SKU{
// 			Name: to.Ptr(armredis.SKUNamePremium),
// 			Capacity: to.Ptr[int32](1),
// 			Family: to.Ptr(armredis.SKUFamilyP),
// 		},
// 		AccessKeys: &armredis.AccessKeys{
// 			PrimaryKey: to.Ptr("<primaryKey>"),
// 			SecondaryKey: to.Ptr("<secondaryKey>"),
// 		},
// 		HostName: to.Ptr("cache1.redis.cache.windows.net"),
// 		Instances: []*armredis.InstanceDetails{
// 			{
// 				IsMaster: to.Ptr(true),
// 				IsPrimary: to.Ptr(true),
// 				NonSSLPort: to.Ptr[int32](13000),
// 				ShardID: to.Ptr[int32](0),
// 				SSLPort: to.Ptr[int32](15000),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13001),
// 				ShardID: to.Ptr[int32](0),
// 				SSLPort: to.Ptr[int32](15001),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13002),
// 				ShardID: to.Ptr[int32](0),
// 				SSLPort: to.Ptr[int32](15002),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(true),
// 				IsPrimary: to.Ptr(true),
// 				NonSSLPort: to.Ptr[int32](13003),
// 				ShardID: to.Ptr[int32](1),
// 				SSLPort: to.Ptr[int32](15003),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13004),
// 				ShardID: to.Ptr[int32](1),
// 				SSLPort: to.Ptr[int32](15004),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13005),
// 				ShardID: to.Ptr[int32](1),
// 				SSLPort: to.Ptr[int32](15005),
// 				Zone: to.Ptr("1"),
// 		}},
// 		Port: to.Ptr[int32](6379),
// 		ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded),
// 		SSLPort: to.Ptr[int32](6380),
// 	},
// 	Zones: []*string{
// 		to.Ptr("1")},
// 	}
Output:

Example (RedisCacheCreateDefaultVersion)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheCreateDefaultVersion.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginCreate(ctx, "rg1", "cache1", armredis.CreateParameters{
	Location: to.Ptr("West US"),
	Properties: &armredis.CreateProperties{
		EnableNonSSLPort:  to.Ptr(true),
		MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2),
		RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
			MaxmemoryPolicy: to.Ptr("allkeys-lru"),
		},
		ReplicasPerPrimary: to.Ptr[int32](2),
		ShardCount:         to.Ptr[int32](2),
		SKU: &armredis.SKU{
			Name:     to.Ptr(armredis.SKUNamePremium),
			Capacity: to.Ptr[int32](1),
			Family:   to.Ptr(armredis.SKUFamilyP),
		},
		StaticIP: to.Ptr("192.168.0.5"),
		SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"),
	},
	Zones: []*string{
		to.Ptr("1")},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ResourceInfo = armredis.ResourceInfo{
// 	Name: to.Ptr("cache1"),
// 	Type: to.Ptr("Microsoft.Cache/Redis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armredis.Properties{
// 		EnableNonSSLPort: to.Ptr(false),
// 		MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2),
// 		RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
// 			Maxclients: to.Ptr("1000"),
// 			MaxmemoryDelta: to.Ptr("50"),
// 			MaxmemoryReserved: to.Ptr("50"),
// 		},
// 		RedisVersion: to.Ptr("6.0.14"),
// 		ReplicasPerMaster: to.Ptr[int32](2),
// 		ReplicasPerPrimary: to.Ptr[int32](2),
// 		SKU: &armredis.SKU{
// 			Name: to.Ptr(armredis.SKUNamePremium),
// 			Capacity: to.Ptr[int32](1),
// 			Family: to.Ptr(armredis.SKUFamilyP),
// 		},
// 		AccessKeys: &armredis.AccessKeys{
// 			PrimaryKey: to.Ptr("<primaryKey>"),
// 			SecondaryKey: to.Ptr("<secondaryKey>"),
// 		},
// 		HostName: to.Ptr("cache1.redis.cache.windows.net"),
// 		Instances: []*armredis.InstanceDetails{
// 			{
// 				IsMaster: to.Ptr(true),
// 				IsPrimary: to.Ptr(true),
// 				NonSSLPort: to.Ptr[int32](13000),
// 				ShardID: to.Ptr[int32](0),
// 				SSLPort: to.Ptr[int32](15000),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13001),
// 				ShardID: to.Ptr[int32](0),
// 				SSLPort: to.Ptr[int32](15001),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13002),
// 				ShardID: to.Ptr[int32](0),
// 				SSLPort: to.Ptr[int32](15002),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(true),
// 				IsPrimary: to.Ptr(true),
// 				NonSSLPort: to.Ptr[int32](13003),
// 				ShardID: to.Ptr[int32](1),
// 				SSLPort: to.Ptr[int32](15003),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13004),
// 				ShardID: to.Ptr[int32](1),
// 				SSLPort: to.Ptr[int32](15004),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13005),
// 				ShardID: to.Ptr[int32](1),
// 				SSLPort: to.Ptr[int32](15005),
// 				Zone: to.Ptr("1"),
// 		}},
// 		Port: to.Ptr[int32](6379),
// 		ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded),
// 		SSLPort: to.Ptr[int32](6380),
// 	},
// 	Zones: []*string{
// 		to.Ptr("1")},
// 	}
Output:

Example (RedisCacheCreateLatestVersion)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheCreateLatestVersion.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginCreate(ctx, "rg1", "cache1", armredis.CreateParameters{
	Location: to.Ptr("West US"),
	Properties: &armredis.CreateProperties{
		EnableNonSSLPort:  to.Ptr(true),
		MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2),
		RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
			MaxmemoryPolicy: to.Ptr("allkeys-lru"),
		},
		RedisVersion:       to.Ptr("Latest"),
		ReplicasPerPrimary: to.Ptr[int32](2),
		ShardCount:         to.Ptr[int32](2),
		SKU: &armredis.SKU{
			Name:     to.Ptr(armredis.SKUNamePremium),
			Capacity: to.Ptr[int32](1),
			Family:   to.Ptr(armredis.SKUFamilyP),
		},
		StaticIP: to.Ptr("192.168.0.5"),
		SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"),
	},
	Zones: []*string{
		to.Ptr("1")},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ResourceInfo = armredis.ResourceInfo{
// 	Name: to.Ptr("cache1"),
// 	Type: to.Ptr("Microsoft.Cache/Redis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armredis.Properties{
// 		EnableNonSSLPort: to.Ptr(false),
// 		MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2),
// 		RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
// 			Maxclients: to.Ptr("1000"),
// 			MaxmemoryDelta: to.Ptr("50"),
// 			MaxmemoryReserved: to.Ptr("50"),
// 		},
// 		RedisVersion: to.Ptr("6.0.14"),
// 		ReplicasPerMaster: to.Ptr[int32](2),
// 		ReplicasPerPrimary: to.Ptr[int32](2),
// 		SKU: &armredis.SKU{
// 			Name: to.Ptr(armredis.SKUNamePremium),
// 			Capacity: to.Ptr[int32](1),
// 			Family: to.Ptr(armredis.SKUFamilyP),
// 		},
// 		AccessKeys: &armredis.AccessKeys{
// 			PrimaryKey: to.Ptr("<primaryKey>"),
// 			SecondaryKey: to.Ptr("<secondaryKey>"),
// 		},
// 		HostName: to.Ptr("cache1.redis.cache.windows.net"),
// 		Instances: []*armredis.InstanceDetails{
// 			{
// 				IsMaster: to.Ptr(true),
// 				IsPrimary: to.Ptr(true),
// 				NonSSLPort: to.Ptr[int32](13000),
// 				ShardID: to.Ptr[int32](0),
// 				SSLPort: to.Ptr[int32](15000),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13001),
// 				ShardID: to.Ptr[int32](0),
// 				SSLPort: to.Ptr[int32](15001),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13002),
// 				ShardID: to.Ptr[int32](0),
// 				SSLPort: to.Ptr[int32](15002),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(true),
// 				IsPrimary: to.Ptr(true),
// 				NonSSLPort: to.Ptr[int32](13003),
// 				ShardID: to.Ptr[int32](1),
// 				SSLPort: to.Ptr[int32](15003),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13004),
// 				ShardID: to.Ptr[int32](1),
// 				SSLPort: to.Ptr[int32](15004),
// 				Zone: to.Ptr("1"),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13005),
// 				ShardID: to.Ptr[int32](1),
// 				SSLPort: to.Ptr[int32](15005),
// 				Zone: to.Ptr("1"),
// 		}},
// 		Port: to.Ptr[int32](6379),
// 		ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded),
// 		SSLPort: to.Ptr[int32](6380),
// 	},
// 	Zones: []*string{
// 		to.Ptr("1")},
// 	}
Output:

func (*Client) BeginDelete

func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *ClientBeginDeleteOptions) (*runtime.Poller[ClientDeleteResponse], error)

BeginDelete - Deletes a Redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • options - ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginDelete(ctx, "rg1", "cache1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*Client) BeginExportData

func (client *Client) BeginExportData(ctx context.Context, resourceGroupName string, name string, parameters ExportRDBParameters, options *ClientBeginExportDataOptions) (*runtime.Poller[ClientExportDataResponse], error)

BeginExportData - Export data from the redis cache to blobs in a container. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • parameters - Parameters for Redis export operation.
  • options - ClientBeginExportDataOptions contains the optional parameters for the Client.BeginExportData method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheExport.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginExportData(ctx, "rg1", "cache1", armredis.ExportRDBParameters{
	Format:                to.Ptr("RDB"),
	Container:             to.Ptr("https://contosostorage.blob.core.window.net/urltoBlobContainer?sasKeyParameters"),
	Prefix:                to.Ptr("datadump1"),
	StorageSubscriptionID: to.Ptr("storageSubId"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*Client) BeginImportData

func (client *Client) BeginImportData(ctx context.Context, resourceGroupName string, name string, parameters ImportRDBParameters, options *ClientBeginImportDataOptions) (*runtime.Poller[ClientImportDataResponse], error)

BeginImportData - Import data into Redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • parameters - Parameters for Redis import operation.
  • options - ClientBeginImportDataOptions contains the optional parameters for the Client.BeginImportData method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheImport.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginImportData(ctx, "rg1", "cache1", armredis.ImportRDBParameters{
	Format: to.Ptr("RDB"),
	Files: []*string{
		to.Ptr("http://fileuris.contoso.com/pathtofile1")},
	StorageSubscriptionID: to.Ptr("storageSubId"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*Client) BeginUpdate

func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, name string, parameters UpdateParameters, options *ClientBeginUpdateOptions) (*runtime.Poller[ClientUpdateResponse], error)

BeginUpdate - Update an existing Redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • parameters - Parameters supplied to the Update Redis operation.
  • options - ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginUpdate(ctx, "rg1", "cache1", armredis.UpdateParameters{
	Properties: &armredis.UpdateProperties{
		EnableNonSSLPort:   to.Ptr(true),
		ReplicasPerPrimary: to.Ptr[int32](2),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ResourceInfo = armredis.ResourceInfo{
// 	Name: to.Ptr("cache1"),
// 	Type: to.Ptr("Microsoft.Cache/Redis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armredis.Properties{
// 		EnableNonSSLPort: to.Ptr(true),
// 		RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
// 			Maxclients: to.Ptr("1000"),
// 			MaxmemoryDelta: to.Ptr("50"),
// 			MaxmemoryReserved: to.Ptr("50"),
// 		},
// 		RedisVersion: to.Ptr("3.0"),
// 		ReplicasPerMaster: to.Ptr[int32](2),
// 		ReplicasPerPrimary: to.Ptr[int32](2),
// 		SKU: &armredis.SKU{
// 			Name: to.Ptr(armredis.SKUNamePremium),
// 			Capacity: to.Ptr[int32](1),
// 			Family: to.Ptr(armredis.SKUFamilyP),
// 		},
// 		AccessKeys: &armredis.AccessKeys{
// 			PrimaryKey: to.Ptr("<primaryKey>"),
// 			SecondaryKey: to.Ptr("<secondaryKey>"),
// 		},
// 		HostName: to.Ptr("cache1.redis.cache.windows.net"),
// 		Instances: []*armredis.InstanceDetails{
// 			{
// 				IsMaster: to.Ptr(true),
// 				IsPrimary: to.Ptr(true),
// 				NonSSLPort: to.Ptr[int32](13000),
// 				SSLPort: to.Ptr[int32](15000),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13001),
// 				SSLPort: to.Ptr[int32](15001),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13002),
// 				SSLPort: to.Ptr[int32](15002),
// 		}},
// 		Port: to.Ptr[int32](6379),
// 		ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded),
// 		SSLPort: to.Ptr[int32](6380),
// 	},
// }
Output:

func (*Client) CheckNameAvailability

CheckNameAvailability - Checks that the redis cache name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • parameters - Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redis'
  • options - ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheCheckNameAvailability.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewClient().CheckNameAvailability(ctx, armredis.CheckNameAvailabilityParameters{
	Name: to.Ptr("cacheName"),
	Type: to.Ptr("Microsoft.Cache/Redis"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*Client) ForceReboot

func (client *Client) ForceReboot(ctx context.Context, resourceGroupName string, name string, parameters RebootParameters, options *ClientForceRebootOptions) (ClientForceRebootResponse, error)

ForceReboot - Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • parameters - Specifies which Redis node(s) to reboot.
  • options - ClientForceRebootOptions contains the optional parameters for the Client.ForceReboot method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheForceReboot.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().ForceReboot(ctx, "rg1", "cache1", armredis.RebootParameters{
	Ports: []*int32{
		to.Ptr[int32](13000),
		to.Ptr[int32](15001)},
	RebootType: to.Ptr(armredis.RebootTypeAllNodes),
	ShardID:    to.Ptr[int32](0),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ForceRebootResponse = armredis.ForceRebootResponse{
// 	Message: to.Ptr("reboot operation enqueued"),
// }
Output:

func (*Client) Get

func (client *Client) Get(ctx context.Context, resourceGroupName string, name string, options *ClientGetOptions) (ClientGetResponse, error)

Get - Gets a Redis cache (resource description). If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().Get(ctx, "rg1", "cache1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ResourceInfo = armredis.ResourceInfo{
// 	Name: to.Ptr("cache1"),
// 	Type: to.Ptr("Microsoft.Cache/Redis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armredis.Properties{
// 		EnableNonSSLPort: to.Ptr(true),
// 		PublicNetworkAccess: to.Ptr(armredis.PublicNetworkAccessEnabled),
// 		RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
// 		},
// 		RedisVersion: to.Ptr("3.2"),
// 		ReplicasPerMaster: to.Ptr[int32](2),
// 		ReplicasPerPrimary: to.Ptr[int32](2),
// 		SKU: &armredis.SKU{
// 			Name: to.Ptr(armredis.SKUNamePremium),
// 			Capacity: to.Ptr[int32](3),
// 			Family: to.Ptr(armredis.SKUFamilyP),
// 		},
// 		HostName: to.Ptr("cache1.redis.cache.windows.net"),
// 		Instances: []*armredis.InstanceDetails{
// 			{
// 				IsMaster: to.Ptr(true),
// 				IsPrimary: to.Ptr(true),
// 				NonSSLPort: to.Ptr[int32](13000),
// 				SSLPort: to.Ptr[int32](15000),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13001),
// 				SSLPort: to.Ptr[int32](15001),
// 			},
// 			{
// 				IsMaster: to.Ptr(false),
// 				IsPrimary: to.Ptr(false),
// 				NonSSLPort: to.Ptr[int32](13002),
// 				SSLPort: to.Ptr[int32](15002),
// 		}},
// 		LinkedServers: []*armredis.LinkedServer{
// 			{
// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2"),
// 		}},
// 		Port: to.Ptr[int32](6379),
// 		PrivateEndpointConnections: []*armredis.PrivateEndpointConnection{
// 			{
// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/privateEndpointConnections/cachePec"),
// 				Properties: &armredis.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armredis.PrivateEndpoint{
// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/cachePe"),
// 					},
// 					PrivateLinkServiceConnectionState: &armredis.PrivateLinkServiceConnectionState{
// 						Description: to.Ptr("Please approve my connection"),
// 						ActionsRequired: to.Ptr("None"),
// 						Status: to.Ptr(armredis.PrivateEndpointServiceConnectionStatusApproved),
// 					},
// 				},
// 		}},
// 		ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded),
// 		SSLPort: to.Ptr[int32](6380),
// 	},
// }
Output:

func (*Client) ListKeys

func (client *Client) ListKeys(ctx context.Context, resourceGroupName string, name string, options *ClientListKeysOptions) (ClientListKeysResponse, error)

ListKeys - Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • options - ClientListKeysOptions contains the optional parameters for the Client.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListKeys.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().ListKeys(ctx, "rg1", "cache1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AccessKeys = armredis.AccessKeys{
// 	PrimaryKey: to.Ptr("<primaryKey>"),
// 	SecondaryKey: to.Ptr("<secondaryKey>"),
// }
Output:

func (*Client) NewListByResourceGroupPager

func (client *Client) NewListByResourceGroupPager(resourceGroupName string, options *ClientListByResourceGroupOptions) *runtime.Pager[ClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all Redis caches in a resource group.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • options - ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewClient().NewListByResourceGroupPager("rg1", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ListResult = armredis.ListResult{
	// 	Value: []*armredis.ResourceInfo{
	// 		{
	// 			Name: to.Ptr("cache1"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"),
	// 			Location: to.Ptr("West US"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Properties: &armredis.Properties{
	// 				EnableNonSSLPort: to.Ptr(true),
	// 				RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
	// 				},
	// 				RedisVersion: to.Ptr("3.2"),
	// 				SKU: &armredis.SKU{
	// 					Name: to.Ptr(armredis.SKUNameStandard),
	// 					Capacity: to.Ptr[int32](6),
	// 					Family: to.Ptr(armredis.SKUFamilyC),
	// 				},
	// 				HostName: to.Ptr("cache1.redis.cache.windows.net"),
	// 				Port: to.Ptr[int32](6379),
	// 				ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded),
	// 				SSLPort: to.Ptr[int32](6380),
	// 			},
	// 	}},
	// }
}
Output:

func (*Client) NewListBySubscriptionPager

func (client *Client) NewListBySubscriptionPager(options *ClientListBySubscriptionOptions) *runtime.Pager[ClientListBySubscriptionResponse]

NewListBySubscriptionPager - Gets all Redis caches in the specified subscription.

Generated from API version 2023-04-01

  • options - ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewClient().NewListBySubscriptionPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ListResult = armredis.ListResult{
	// 	Value: []*armredis.ResourceInfo{
	// 		{
	// 			Name: to.Ptr("cache1"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"),
	// 			Location: to.Ptr("West US"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Properties: &armredis.Properties{
	// 				EnableNonSSLPort: to.Ptr(true),
	// 				RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{
	// 				},
	// 				RedisVersion: to.Ptr("3.2"),
	// 				ReplicasPerMaster: to.Ptr[int32](2),
	// 				ReplicasPerPrimary: to.Ptr[int32](2),
	// 				SKU: &armredis.SKU{
	// 					Name: to.Ptr(armredis.SKUNameStandard),
	// 					Capacity: to.Ptr[int32](6),
	// 					Family: to.Ptr(armredis.SKUFamilyC),
	// 				},
	// 				HostName: to.Ptr("cache1.redis.cache.windows.net"),
	// 				Instances: []*armredis.InstanceDetails{
	// 					{
	// 						IsMaster: to.Ptr(true),
	// 						IsPrimary: to.Ptr(true),
	// 						NonSSLPort: to.Ptr[int32](13000),
	// 						SSLPort: to.Ptr[int32](15000),
	// 					},
	// 					{
	// 						IsMaster: to.Ptr(false),
	// 						IsPrimary: to.Ptr(false),
	// 						NonSSLPort: to.Ptr[int32](13001),
	// 						SSLPort: to.Ptr[int32](15001),
	// 					},
	// 					{
	// 						IsMaster: to.Ptr(false),
	// 						IsPrimary: to.Ptr(false),
	// 						NonSSLPort: to.Ptr[int32](13002),
	// 						SSLPort: to.Ptr[int32](15002),
	// 				}},
	// 				Port: to.Ptr[int32](6379),
	// 				ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded),
	// 				SSLPort: to.Ptr[int32](6380),
	// 			},
	// 	}},
	// }
}
Output:

func (*Client) NewListUpgradeNotificationsPager

func (client *Client) NewListUpgradeNotificationsPager(resourceGroupName string, name string, history float64, options *ClientListUpgradeNotificationsOptions) *runtime.Pager[ClientListUpgradeNotificationsResponse]

NewListUpgradeNotificationsPager - Gets any upgrade notifications for a Redis cache.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • history - how many minutes in past to look for upgrade notifications
  • options - ClientListUpgradeNotificationsOptions contains the optional parameters for the Client.NewListUpgradeNotificationsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListUpgradeNotifications.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewClient().NewListUpgradeNotificationsPager("rg1", "cache1", 5000, nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.NotificationListResponse = armredis.NotificationListResponse{
	// 	Value: []*armredis.UpgradeNotification{
	// 		{
	// 			Name: to.Ptr("notification1"),
	// 			Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-16T23:20:50.52Z"); return t}()),
	// 			UpsellNotification: map[string]*string{
	// 			},
	// 	}},
	// }
}
Output:

func (*Client) RegenerateKey

func (client *Client) RegenerateKey(ctx context.Context, resourceGroupName string, name string, parameters RegenerateKeyParameters, options *ClientRegenerateKeyOptions) (ClientRegenerateKeyResponse, error)

RegenerateKey - Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • parameters - Specifies which key to regenerate.
  • options - ClientRegenerateKeyOptions contains the optional parameters for the Client.RegenerateKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheRegenerateKey.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().RegenerateKey(ctx, "rg1", "cache1", armredis.RegenerateKeyParameters{
	KeyType: to.Ptr(armredis.RedisKeyTypePrimary),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AccessKeys = armredis.AccessKeys{
// 	PrimaryKey: to.Ptr("<primaryKey>"),
// 	SecondaryKey: to.Ptr("<secondaryKey>"),
// }
Output:

type ClientBeginCreateOptions

type ClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginCreateOptions contains the optional parameters for the Client.BeginCreate method.

type ClientBeginDeleteOptions

type ClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.

type ClientBeginExportDataOptions

type ClientBeginExportDataOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginExportDataOptions contains the optional parameters for the Client.BeginExportData method.

type ClientBeginImportDataOptions

type ClientBeginImportDataOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginImportDataOptions contains the optional parameters for the Client.BeginImportData method.

type ClientBeginUpdateOptions

type ClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.

type ClientCheckNameAvailabilityOptions

type ClientCheckNameAvailabilityOptions struct {
}

ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method.

type ClientCheckNameAvailabilityResponse

type ClientCheckNameAvailabilityResponse struct {
}

ClientCheckNameAvailabilityResponse contains the response from method Client.CheckNameAvailability.

type ClientCreateResponse

type ClientCreateResponse struct {
	ResourceInfo
}

ClientCreateResponse contains the response from method Client.BeginCreate.

type ClientDeleteResponse

type ClientDeleteResponse struct {
}

ClientDeleteResponse contains the response from method Client.BeginDelete.

type ClientExportDataResponse

type ClientExportDataResponse struct {
}

ClientExportDataResponse contains the response from method Client.BeginExportData.

type ClientFactory added in v2.2.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v2.2.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAsyncOperationStatusClient added in v2.2.0

func (c *ClientFactory) NewAsyncOperationStatusClient() *AsyncOperationStatusClient

func (*ClientFactory) NewClient added in v2.2.0

func (c *ClientFactory) NewClient() *Client

func (*ClientFactory) NewFirewallRulesClient added in v2.2.0

func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient

func (*ClientFactory) NewLinkedServerClient added in v2.2.0

func (c *ClientFactory) NewLinkedServerClient() *LinkedServerClient

func (*ClientFactory) NewOperationsClient added in v2.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

func (*ClientFactory) NewPatchSchedulesClient added in v2.2.0

func (c *ClientFactory) NewPatchSchedulesClient() *PatchSchedulesClient

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v2.2.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

func (*ClientFactory) NewPrivateLinkResourcesClient added in v2.2.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

type ClientForceRebootOptions

type ClientForceRebootOptions struct {
}

ClientForceRebootOptions contains the optional parameters for the Client.ForceReboot method.

type ClientForceRebootResponse

type ClientForceRebootResponse struct {
	ForceRebootResponse
}

ClientForceRebootResponse contains the response from method Client.ForceReboot.

type ClientGetOptions

type ClientGetOptions struct {
}

ClientGetOptions contains the optional parameters for the Client.Get method.

type ClientGetResponse

type ClientGetResponse struct {
	ResourceInfo
}

ClientGetResponse contains the response from method Client.Get.

type ClientImportDataResponse

type ClientImportDataResponse struct {
}

ClientImportDataResponse contains the response from method Client.BeginImportData.

type ClientListByResourceGroupOptions

type ClientListByResourceGroupOptions struct {
}

ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method.

type ClientListByResourceGroupResponse

type ClientListByResourceGroupResponse struct {
	ListResult
}

ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager.

type ClientListBySubscriptionOptions

type ClientListBySubscriptionOptions struct {
}

ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method.

type ClientListBySubscriptionResponse

type ClientListBySubscriptionResponse struct {
	ListResult
}

ClientListBySubscriptionResponse contains the response from method Client.NewListBySubscriptionPager.

type ClientListKeysOptions

type ClientListKeysOptions struct {
}

ClientListKeysOptions contains the optional parameters for the Client.ListKeys method.

type ClientListKeysResponse

type ClientListKeysResponse struct {
	AccessKeys
}

ClientListKeysResponse contains the response from method Client.ListKeys.

type ClientListUpgradeNotificationsOptions

type ClientListUpgradeNotificationsOptions struct {
}

ClientListUpgradeNotificationsOptions contains the optional parameters for the Client.NewListUpgradeNotificationsPager method.

type ClientListUpgradeNotificationsResponse

type ClientListUpgradeNotificationsResponse struct {
	NotificationListResponse
}

ClientListUpgradeNotificationsResponse contains the response from method Client.NewListUpgradeNotificationsPager.

type ClientRegenerateKeyOptions

type ClientRegenerateKeyOptions struct {
}

ClientRegenerateKeyOptions contains the optional parameters for the Client.RegenerateKey method.

type ClientRegenerateKeyResponse

type ClientRegenerateKeyResponse struct {
	AccessKeys
}

ClientRegenerateKeyResponse contains the response from method Client.RegenerateKey.

type ClientUpdateResponse

type ClientUpdateResponse struct {
	ResourceInfo
}

ClientUpdateResponse contains the response from method Client.BeginUpdate.

type CommonPropertiesRedisConfiguration

type CommonPropertiesRedisConfiguration struct {
	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]any

	// Specifies whether the aof backup is enabled
	AofBackupEnabled *string

	// First storage account connection string
	AofStorageConnectionString0 *string

	// Second storage account connection string
	AofStorageConnectionString1 *string

	// Specifies whether the authentication is disabled. Setting this property is highly discouraged from security point of view.
	Authnotrequired *string

	// Value in megabytes reserved for fragmentation per shard
	MaxfragmentationmemoryReserved *string

	// Value in megabytes reserved for non-cache usage per shard e.g. failover.
	MaxmemoryDelta *string

	// The eviction strategy used when your data won't fit within its memory limit.
	MaxmemoryPolicy *string

	// Value in megabytes reserved for non-cache usage per shard e.g. failover.
	MaxmemoryReserved *string

	// Preferred auth method to communicate to storage account used for data persistence, specify SAS or ManagedIdentity, default
	// value is SAS
	PreferredDataPersistenceAuthMethod *string

	// Specifies whether the rdb backup is enabled
	RdbBackupEnabled *string

	// Specifies the frequency for creating rdb backup in minutes. Valid values: (15, 30, 60, 360, 720, 1440)
	RdbBackupFrequency *string

	// Specifies the maximum number of snapshots for rdb backup
	RdbBackupMaxSnapshotCount *string

	// The storage account connection string for storing rdb file
	RdbStorageConnectionString *string

	// SubscriptionId of the storage account for persistence (aof/rdb) using ManagedIdentity.
	StorageSubscriptionID *string

	// READ-ONLY; The max clients config
	Maxclients *string

	// READ-ONLY; Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity,
	// default value is SAS
	PreferredDataArchiveAuthMethod *string

	// READ-ONLY; Zonal Configuration
	ZonalConfiguration *string
}

CommonPropertiesRedisConfiguration - All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc.

func (CommonPropertiesRedisConfiguration) MarshalJSON

func (c CommonPropertiesRedisConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommonPropertiesRedisConfiguration.

func (*CommonPropertiesRedisConfiguration) UnmarshalJSON

func (c *CommonPropertiesRedisConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommonPropertiesRedisConfiguration.

type CreateParameters

type CreateParameters struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Redis cache properties.
	Properties *CreateProperties

	// The identity of the resource.
	Identity *ManagedServiceIdentity

	// Resource tags.
	Tags map[string]*string

	// A list of availability zones denoting where the resource needs to come from.
	Zones []*string
}

CreateParameters - Parameters supplied to the Create Redis operation.

func (CreateParameters) MarshalJSON

func (c CreateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CreateParameters.

func (*CreateParameters) UnmarshalJSON

func (c *CreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CreateParameters.

type CreateProperties

type CreateProperties struct {
	// REQUIRED; The SKU of the Redis cache to deploy.
	SKU *SKU

	// Specifies whether the non-ssl Redis server port (6379) is enabled.
	EnableNonSSLPort *bool

	// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')
	MinimumTLSVersion *TLSVersion

	// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled'
	// or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method.
	// Default value is 'Enabled'
	PublicNetworkAccess *PublicNetworkAccess

	// All Redis Settings. Few possible keys:
	// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
	// etc.
	RedisConfiguration *CommonPropertiesRedisConfiguration

	// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers
	// to the latest stable Redis version that is available. Supported versions: 4.0,
	// 6.0 (latest). Default value is 'latest'.
	RedisVersion *string

	// The number of replicas to be created per primary.
	ReplicasPerMaster *int32

	// The number of replicas to be created per primary.
	ReplicasPerPrimary *int32

	// The number of shards to be created on a Premium Cluster Cache.
	ShardCount *int32

	// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network;
	// auto assigned by default.
	StaticIP *string

	// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
	SubnetID *string

	// A dictionary of tenant settings
	TenantSettings map[string]*string
}

CreateProperties - Properties supplied to Create Redis operation.

func (CreateProperties) MarshalJSON

func (c CreateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CreateProperties.

func (*CreateProperties) UnmarshalJSON

func (c *CreateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CreateProperties.

type DayOfWeek

type DayOfWeek string

DayOfWeek - Day of the week when a cache can be patched.

const (
	DayOfWeekMonday    DayOfWeek = "Monday"
	DayOfWeekTuesday   DayOfWeek = "Tuesday"
	DayOfWeekWednesday DayOfWeek = "Wednesday"
	DayOfWeekThursday  DayOfWeek = "Thursday"
	DayOfWeekFriday    DayOfWeek = "Friday"
	DayOfWeekSaturday  DayOfWeek = "Saturday"
	DayOfWeekSunday    DayOfWeek = "Sunday"
	DayOfWeekEveryday  DayOfWeek = "Everyday"
	DayOfWeekWeekend   DayOfWeek = "Weekend"
)

func PossibleDayOfWeekValues

func PossibleDayOfWeekValues() []DayOfWeek

PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type.

type DefaultName

type DefaultName string
const (
	DefaultNameDefault DefaultName = "default"
)

func PossibleDefaultNameValues

func PossibleDefaultNameValues() []DefaultName

PossibleDefaultNameValues returns the possible values for the DefaultName const type.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetailAutoGenerated

type ErrorDetailAutoGenerated struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetailAutoGenerated

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetailAutoGenerated - The error detail.

func (ErrorDetailAutoGenerated) MarshalJSON

func (e ErrorDetailAutoGenerated) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetailAutoGenerated.

func (*ErrorDetailAutoGenerated) UnmarshalJSON

func (e *ErrorDetailAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetailAutoGenerated.

type ExportRDBParameters

type ExportRDBParameters struct {
	// REQUIRED; Container name to export to.
	Container *string

	// REQUIRED; Prefix to use for exported files.
	Prefix *string

	// File format.
	Format *string

	// Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default
	// value is SAS
	PreferredDataArchiveAuthMethod *string

	// Subscription id of the storage container for data to be exported using ManagedIdentity.
	StorageSubscriptionID *string
}

ExportRDBParameters - Parameters for Redis export operation.

func (ExportRDBParameters) MarshalJSON

func (e ExportRDBParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExportRDBParameters.

func (*ExportRDBParameters) UnmarshalJSON

func (e *ExportRDBParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExportRDBParameters.

type FirewallRule

type FirewallRule struct {
	// REQUIRED; redis cache firewall rule properties
	Properties *FirewallRuleProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

FirewallRule - A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect

func (FirewallRule) MarshalJSON

func (f FirewallRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirewallRule.

func (*FirewallRule) UnmarshalJSON

func (f *FirewallRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRule.

type FirewallRuleListResult

type FirewallRuleListResult struct {
	// Results of the list firewall rules operation.
	Value []*FirewallRule

	// READ-ONLY; Link for next page of results.
	NextLink *string
}

FirewallRuleListResult - The response of list firewall rules Redis operation.

func (FirewallRuleListResult) MarshalJSON

func (f FirewallRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirewallRuleListResult.

func (*FirewallRuleListResult) UnmarshalJSON

func (f *FirewallRuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleListResult.

type FirewallRuleProperties

type FirewallRuleProperties struct {
	// REQUIRED; highest IP address included in the range
	EndIP *string

	// REQUIRED; lowest IP address included in the range
	StartIP *string
}

FirewallRuleProperties - Specifies a range of IP addresses permitted to connect to the cache

func (FirewallRuleProperties) MarshalJSON

func (f FirewallRuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirewallRuleProperties.

func (*FirewallRuleProperties) UnmarshalJSON

func (f *FirewallRuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleProperties.

type FirewallRulesClient

type FirewallRulesClient struct {
	// contains filtered or unexported fields
}

FirewallRulesClient contains the methods for the FirewallRules group. Don't use this type directly, use NewFirewallRulesClient() instead.

func NewFirewallRulesClient

func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallRulesClient, error)

NewFirewallRulesClient creates a new instance of FirewallRulesClient with the specified values.

  • subscriptionID - Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*FirewallRulesClient) CreateOrUpdate

func (client *FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, ruleName string, parameters FirewallRule, options *FirewallRulesClientCreateOrUpdateOptions) (FirewallRulesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a redis cache firewall rule If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • ruleName - The name of the firewall rule.
  • parameters - Parameters supplied to the create or update redis firewall rule operation.
  • options - FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheFirewallRuleCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFirewallRulesClient().CreateOrUpdate(ctx, "rg1", "cache1", "rule1", armredis.FirewallRule{
	Properties: &armredis.FirewallRuleProperties{
		EndIP:   to.Ptr("192.168.1.4"),
		StartIP: to.Ptr("192.168.1.1"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.FirewallRule = armredis.FirewallRule{
// 	Name: to.Ptr("cache1/rule1"),
// 	Type: to.Ptr("Microsoft.Cache/Redis/firewallRules"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1"),
// 	Properties: &armredis.FirewallRuleProperties{
// 		EndIP: to.Ptr("192.168.1.4"),
// 		StartIP: to.Ptr("192.168.1.1"),
// 	},
// }
Output:

func (*FirewallRulesClient) Delete

func (client *FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, cacheName string, ruleName string, options *FirewallRulesClientDeleteOptions) (FirewallRulesClientDeleteResponse, error)

Delete - Deletes a single firewall rule in a specified redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • ruleName - The name of the firewall rule.
  • options - FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheFirewallRuleDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewFirewallRulesClient().Delete(ctx, "rg1", "cache1", "rule1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*FirewallRulesClient) Get

func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ruleName string, options *FirewallRulesClientGetOptions) (FirewallRulesClientGetResponse, error)

Get - Gets a single firewall rule in a specified redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • ruleName - The name of the firewall rule.
  • options - FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheFirewallRuleGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFirewallRulesClient().Get(ctx, "rg1", "cache1", "rule1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.FirewallRule = armredis.FirewallRule{
// 	Name: to.Ptr("cache1/rule1"),
// 	Type: to.Ptr("Microsoft.Cache/Redis/firewallRules"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1"),
// 	Properties: &armredis.FirewallRuleProperties{
// 		EndIP: to.Ptr("192.168.1.4"),
// 		StartIP: to.Ptr("192.168.1.1"),
// 	},
// }
Output:

func (*FirewallRulesClient) NewListPager

func (client *FirewallRulesClient) NewListPager(resourceGroupName string, cacheName string, options *FirewallRulesClientListOptions) *runtime.Pager[FirewallRulesClientListResponse]

NewListPager - Gets all firewall rules in the specified redis cache.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • options - FirewallRulesClientListOptions contains the optional parameters for the FirewallRulesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheFirewallRulesList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewFirewallRulesClient().NewListPager("rg1", "cache1", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.FirewallRuleListResult = armredis.FirewallRuleListResult{
	// 	Value: []*armredis.FirewallRule{
	// 		{
	// 			Name: to.Ptr("rule1"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis/firewallRules"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1"),
	// 			Properties: &armredis.FirewallRuleProperties{
	// 				EndIP: to.Ptr("192.168.1.4"),
	// 				StartIP: to.Ptr("192.168.1.1"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("rule2"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis/firewallRules"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule2"),
	// 			Properties: &armredis.FirewallRuleProperties{
	// 				EndIP: to.Ptr("192.169.1.255"),
	// 				StartIP: to.Ptr("192.169.1.0"),
	// 			},
	// 	}},
	// }
}
Output:

type FirewallRulesClientCreateOrUpdateOptions

type FirewallRulesClientCreateOrUpdateOptions struct {
}

FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method.

type FirewallRulesClientCreateOrUpdateResponse

type FirewallRulesClientCreateOrUpdateResponse struct {
	FirewallRule
}

FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.CreateOrUpdate.

type FirewallRulesClientDeleteOptions

type FirewallRulesClientDeleteOptions struct {
}

FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method.

type FirewallRulesClientDeleteResponse

type FirewallRulesClientDeleteResponse struct {
}

FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.Delete.

type FirewallRulesClientGetOptions

type FirewallRulesClientGetOptions struct {
}

FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.

type FirewallRulesClientGetResponse

type FirewallRulesClientGetResponse struct {
	FirewallRule
}

FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.

type FirewallRulesClientListOptions

type FirewallRulesClientListOptions struct {
}

FirewallRulesClientListOptions contains the optional parameters for the FirewallRulesClient.NewListPager method.

type FirewallRulesClientListResponse

type FirewallRulesClientListResponse struct {
	FirewallRuleListResult
}

FirewallRulesClientListResponse contains the response from method FirewallRulesClient.NewListPager.

type ForceRebootResponse

type ForceRebootResponse struct {
	// READ-ONLY; Status message
	Message *string
}

ForceRebootResponse - Response to force reboot for Redis cache.

func (ForceRebootResponse) MarshalJSON

func (f ForceRebootResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ForceRebootResponse.

func (*ForceRebootResponse) UnmarshalJSON

func (f *ForceRebootResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ForceRebootResponse.

type ImportRDBParameters

type ImportRDBParameters struct {
	// REQUIRED; files to import.
	Files []*string

	// File format.
	Format *string

	// Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default
	// value is SAS
	PreferredDataArchiveAuthMethod *string

	// Subscription id of the storage container containing files to import using Managed Identity.
	StorageSubscriptionID *string
}

ImportRDBParameters - Parameters for Redis import operation.

func (ImportRDBParameters) MarshalJSON

func (i ImportRDBParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ImportRDBParameters.

func (*ImportRDBParameters) UnmarshalJSON

func (i *ImportRDBParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImportRDBParameters.

type InstanceDetails

type InstanceDetails struct {
	// READ-ONLY; Specifies whether the instance is a primary node.
	IsMaster *bool

	// READ-ONLY; Specifies whether the instance is a primary node.
	IsPrimary *bool

	// READ-ONLY; If enableNonSslPort is true, provides Redis instance Non-SSL port.
	NonSSLPort *int32

	// READ-ONLY; Redis instance SSL port.
	SSLPort *int32

	// READ-ONLY; If clustering is enabled, the Shard ID of Redis Instance
	ShardID *int32

	// READ-ONLY; If the Cache uses availability zones, specifies availability zone where this instance is located.
	Zone *string
}

InstanceDetails - Details of single instance of redis.

func (InstanceDetails) MarshalJSON

func (i InstanceDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InstanceDetails.

func (*InstanceDetails) UnmarshalJSON

func (i *InstanceDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InstanceDetails.

type LinkedServer

type LinkedServer struct {
	// READ-ONLY; Linked server Id.
	ID *string
}

LinkedServer - Linked server Id

func (LinkedServer) MarshalJSON

func (l LinkedServer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkedServer.

func (*LinkedServer) UnmarshalJSON

func (l *LinkedServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedServer.

type LinkedServerClient

type LinkedServerClient struct {
	// contains filtered or unexported fields
}

LinkedServerClient contains the methods for the LinkedServer group. Don't use this type directly, use NewLinkedServerClient() instead.

func NewLinkedServerClient

func NewLinkedServerClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LinkedServerClient, error)

NewLinkedServerClient creates a new instance of LinkedServerClient with the specified values.

  • subscriptionID - Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*LinkedServerClient) BeginCreate

func (client *LinkedServerClient) BeginCreate(ctx context.Context, resourceGroupName string, name string, linkedServerName string, parameters LinkedServerCreateParameters, options *LinkedServerClientBeginCreateOptions) (*runtime.Poller[LinkedServerClientCreateResponse], error)

BeginCreate - Adds a linked server to the Redis cache (requires Premium SKU). If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • linkedServerName - The name of the linked server that is being added to the Redis cache.
  • parameters - Parameters supplied to the Create Linked server operation.
  • options - LinkedServerClientBeginCreateOptions contains the optional parameters for the LinkedServerClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheLinkedServer_Create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLinkedServerClient().BeginCreate(ctx, "rg1", "cache1", "cache2", armredis.LinkedServerCreateParameters{
	Properties: &armredis.LinkedServerCreateProperties{
		LinkedRedisCacheID:       to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2"),
		LinkedRedisCacheLocation: to.Ptr("West US"),
		ServerRole:               to.Ptr(armredis.ReplicationRoleSecondary),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LinkedServerWithProperties = armredis.LinkedServerWithProperties{
// 	Name: to.Ptr("cache2"),
// 	Type: to.Ptr("Microsoft.Cache/Redis/linkedServers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2"),
// 	Properties: &armredis.LinkedServerProperties{
// 		GeoReplicatedPrimaryHostName: to.Ptr("cache2.geo.redis.cache.windows.net"),
// 		LinkedRedisCacheID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2"),
// 		LinkedRedisCacheLocation: to.Ptr("West US"),
// 		PrimaryHostName: to.Ptr("cache1.redis.cache.windows.net"),
// 		ServerRole: to.Ptr(armredis.ReplicationRoleSecondary),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 	},
// }
Output:

func (*LinkedServerClient) BeginDelete

func (client *LinkedServerClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, linkedServerName string, options *LinkedServerClientBeginDeleteOptions) (*runtime.Poller[LinkedServerClientDeleteResponse], error)

BeginDelete - Deletes the linked server from a redis cache (requires Premium SKU). If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the redis cache.
  • linkedServerName - The name of the linked server that is being added to the Redis cache.
  • options - LinkedServerClientBeginDeleteOptions contains the optional parameters for the LinkedServerClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheLinkedServer_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLinkedServerClient().BeginDelete(ctx, "rg1", "cache1", "cache2", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*LinkedServerClient) Get

func (client *LinkedServerClient) Get(ctx context.Context, resourceGroupName string, name string, linkedServerName string, options *LinkedServerClientGetOptions) (LinkedServerClientGetResponse, error)

Get - Gets the detailed information about a linked server of a redis cache (requires Premium SKU). If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the redis cache.
  • linkedServerName - The name of the linked server.
  • options - LinkedServerClientGetOptions contains the optional parameters for the LinkedServerClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheLinkedServer_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLinkedServerClient().Get(ctx, "rg1", "cache1", "cache2", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LinkedServerWithProperties = armredis.LinkedServerWithProperties{
// 	Name: to.Ptr("cache2"),
// 	Type: to.Ptr("Microsoft.Cache/Redis/linkedServers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2"),
// 	Properties: &armredis.LinkedServerProperties{
// 		GeoReplicatedPrimaryHostName: to.Ptr("cache2.geo.redis.cache.windows.net"),
// 		LinkedRedisCacheID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2"),
// 		LinkedRedisCacheLocation: to.Ptr("West US"),
// 		PrimaryHostName: to.Ptr("cache1.redis.cache.windows.net"),
// 		ServerRole: to.Ptr(armredis.ReplicationRoleSecondary),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 	},
// }
Output:

func (*LinkedServerClient) NewListPager

func (client *LinkedServerClient) NewListPager(resourceGroupName string, name string, options *LinkedServerClientListOptions) *runtime.Pager[LinkedServerClientListResponse]

NewListPager - Gets the list of linked servers associated with this redis cache (requires Premium SKU).

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the redis cache.
  • options - LinkedServerClientListOptions contains the optional parameters for the LinkedServerClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheLinkedServer_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewLinkedServerClient().NewListPager("rg1", "cache1", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.LinkedServerWithPropertiesList = armredis.LinkedServerWithPropertiesList{
	// 	Value: []*armredis.LinkedServerWithProperties{
	// 		{
	// 			Name: to.Ptr("cache2"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis/linkedServers"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2"),
	// 			Properties: &armredis.LinkedServerProperties{
	// 				GeoReplicatedPrimaryHostName: to.Ptr("cache2.geo.redis.cache.windows.net"),
	// 				LinkedRedisCacheID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2"),
	// 				LinkedRedisCacheLocation: to.Ptr("West US"),
	// 				PrimaryHostName: to.Ptr("cache1.redis.cache.windows.net"),
	// 				ServerRole: to.Ptr(armredis.ReplicationRoleSecondary),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("cache3"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis/linkedServers"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache3"),
	// 			Properties: &armredis.LinkedServerProperties{
	// 				GeoReplicatedPrimaryHostName: to.Ptr("cache3.geo.redis.cache.windows.net"),
	// 				LinkedRedisCacheID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache3"),
	// 				LinkedRedisCacheLocation: to.Ptr("West US"),
	// 				PrimaryHostName: to.Ptr("cache1.redis.cache.windows.net"),
	// 				ServerRole: to.Ptr(armredis.ReplicationRoleSecondary),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 			},
	// 	}},
	// }
}
Output:

type LinkedServerClientBeginCreateOptions

type LinkedServerClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LinkedServerClientBeginCreateOptions contains the optional parameters for the LinkedServerClient.BeginCreate method.

type LinkedServerClientBeginDeleteOptions

type LinkedServerClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LinkedServerClientBeginDeleteOptions contains the optional parameters for the LinkedServerClient.BeginDelete method.

type LinkedServerClientCreateResponse

type LinkedServerClientCreateResponse struct {
	LinkedServerWithProperties
}

LinkedServerClientCreateResponse contains the response from method LinkedServerClient.BeginCreate.

type LinkedServerClientDeleteResponse

type LinkedServerClientDeleteResponse struct {
}

LinkedServerClientDeleteResponse contains the response from method LinkedServerClient.BeginDelete.

type LinkedServerClientGetOptions

type LinkedServerClientGetOptions struct {
}

LinkedServerClientGetOptions contains the optional parameters for the LinkedServerClient.Get method.

type LinkedServerClientGetResponse

type LinkedServerClientGetResponse struct {
	LinkedServerWithProperties
}

LinkedServerClientGetResponse contains the response from method LinkedServerClient.Get.

type LinkedServerClientListOptions

type LinkedServerClientListOptions struct {
}

LinkedServerClientListOptions contains the optional parameters for the LinkedServerClient.NewListPager method.

type LinkedServerClientListResponse

type LinkedServerClientListResponse struct {
	LinkedServerWithPropertiesList
}

LinkedServerClientListResponse contains the response from method LinkedServerClient.NewListPager.

type LinkedServerCreateParameters

type LinkedServerCreateParameters struct {
	// REQUIRED; Properties required to create a linked server.
	Properties *LinkedServerCreateProperties
}

LinkedServerCreateParameters - Parameter required for creating a linked server to redis cache.

func (LinkedServerCreateParameters) MarshalJSON

func (l LinkedServerCreateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkedServerCreateParameters.

func (*LinkedServerCreateParameters) UnmarshalJSON

func (l *LinkedServerCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedServerCreateParameters.

type LinkedServerCreateProperties

type LinkedServerCreateProperties struct {
	// REQUIRED; Fully qualified resourceId of the linked redis cache.
	LinkedRedisCacheID *string

	// REQUIRED; Location of the linked redis cache.
	LinkedRedisCacheLocation *string

	// REQUIRED; Role of the linked server.
	ServerRole *ReplicationRole

	// READ-ONLY; The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for
	// seamless Geo Failover experience.
	GeoReplicatedPrimaryHostName *string

	// READ-ONLY; The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or
	// after the Geo Failover.
	PrimaryHostName *string
}

LinkedServerCreateProperties - Create properties for a linked server

func (LinkedServerCreateProperties) MarshalJSON

func (l LinkedServerCreateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkedServerCreateProperties.

func (*LinkedServerCreateProperties) UnmarshalJSON

func (l *LinkedServerCreateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedServerCreateProperties.

type LinkedServerProperties

type LinkedServerProperties struct {
	// REQUIRED; Fully qualified resourceId of the linked redis cache.
	LinkedRedisCacheID *string

	// REQUIRED; Location of the linked redis cache.
	LinkedRedisCacheLocation *string

	// REQUIRED; Role of the linked server.
	ServerRole *ReplicationRole

	// READ-ONLY; The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for
	// seamless Geo Failover experience.
	GeoReplicatedPrimaryHostName *string

	// READ-ONLY; The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or
	// after the Geo Failover.
	PrimaryHostName *string

	// READ-ONLY; Terminal state of the link between primary and secondary redis cache.
	ProvisioningState *string
}

LinkedServerProperties - Properties of a linked server to be returned in get/put response

func (LinkedServerProperties) MarshalJSON

func (l LinkedServerProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkedServerProperties.

func (*LinkedServerProperties) UnmarshalJSON

func (l *LinkedServerProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedServerProperties.

type LinkedServerWithProperties

type LinkedServerWithProperties struct {
	// Properties of the linked server.
	Properties *LinkedServerProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

LinkedServerWithProperties - Response to put/get linked server (with properties) for Redis cache.

func (LinkedServerWithProperties) MarshalJSON

func (l LinkedServerWithProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkedServerWithProperties.

func (*LinkedServerWithProperties) UnmarshalJSON

func (l *LinkedServerWithProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedServerWithProperties.

type LinkedServerWithPropertiesList

type LinkedServerWithPropertiesList struct {
	// List of linked servers (with properties) of a Redis cache.
	Value []*LinkedServerWithProperties

	// READ-ONLY; Link for next set.
	NextLink *string
}

LinkedServerWithPropertiesList - List of linked servers (with properties) of a Redis cache.

func (LinkedServerWithPropertiesList) MarshalJSON

func (l LinkedServerWithPropertiesList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkedServerWithPropertiesList.

func (*LinkedServerWithPropertiesList) UnmarshalJSON

func (l *LinkedServerWithPropertiesList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedServerWithPropertiesList.

type ListResult

type ListResult struct {
	// List of Redis cache instances.
	Value []*ResourceInfo

	// READ-ONLY; Link for next page of results.
	NextLink *string
}

ListResult - The response of list Redis operation.

func (ListResult) MarshalJSON

func (l ListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListResult.

func (*ListResult) UnmarshalJSON

func (l *ListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListResult.

type ManagedServiceIdentity

type ManagedServiceIdentity struct {
	// REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
	Type *ManagedServiceIdentityType

	// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
	// The dictionary values can be empty objects ({}) in
	// requests.
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
	TenantID *string
}

ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)

func (ManagedServiceIdentity) MarshalJSON

func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.

func (*ManagedServiceIdentity) UnmarshalJSON

func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

const (
	ManagedServiceIdentityTypeNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned"
	ManagedServiceIdentityTypeUserAssigned               ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type NotificationListResponse

type NotificationListResponse struct {
	// List of all notifications.
	Value []*UpgradeNotification

	// READ-ONLY; Link for next set of notifications.
	NextLink *string
}

NotificationListResponse - The response of listUpgradeNotifications.

func (NotificationListResponse) MarshalJSON

func (n NotificationListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NotificationListResponse.

func (*NotificationListResponse) UnmarshalJSON

func (n *NotificationListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NotificationListResponse.

type Operation

type Operation struct {
	// The object that describes the operation.
	Display *OperationDisplay

	// Operation name: {provider}/{resource}/{operation}
	Name *string
}

Operation - REST API operation

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// Friendly name of the operation
	Description *string

	// Operation type: read, write, delete, listKeys/action, etc.
	Operation *string

	// Friendly name of the resource provider
	Provider *string

	// Resource type on which the operation is performed.
	Resource *string
}

OperationDisplay - The object that describes the operation.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// List of operations supported by the resource provider.
	Value []*Operation

	// READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string
}

OperationListResult - Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationStatus

type OperationStatus struct {
	// REQUIRED; Operation status.
	Status *string

	// The end time of the operation.
	EndTime *time.Time

	// If present, details of the operation error.
	Error *ErrorDetailAutoGenerated

	// Fully qualified ID for the async operation.
	ID *string

	// Name of the async operation.
	Name *string

	// The operations list.
	Operations []*OperationStatusResult

	// Percent of the operation that is complete.
	PercentComplete *float32

	// Additional properties from RP, only when operation is successful
	Properties map[string]any

	// The start time of the operation.
	StartTime *time.Time
}

OperationStatus - Asynchronous operation status

func (OperationStatus) MarshalJSON

func (o OperationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationStatus.

func (*OperationStatus) UnmarshalJSON

func (o *OperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatus.

type OperationStatusResult

type OperationStatusResult struct {
	// REQUIRED; Operation status.
	Status *string

	// The end time of the operation.
	EndTime *time.Time

	// If present, details of the operation error.
	Error *ErrorDetailAutoGenerated

	// Fully qualified ID for the async operation.
	ID *string

	// Name of the async operation.
	Name *string

	// The operations list.
	Operations []*OperationStatusResult

	// Percent of the operation that is complete.
	PercentComplete *float32

	// The start time of the operation.
	StartTime *time.Time
}

OperationStatusResult - The current status of an async operation.

func (OperationStatusResult) MarshalJSON

func (o OperationStatusResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationStatusResult.

func (*OperationStatusResult) UnmarshalJSON

func (o *OperationStatusResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - Lists all of the available REST API operations of the Microsoft.Cache provider.

Generated from API version 2023-04-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheOperations.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationsClient().NewListPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.OperationListResult = armredis.OperationListResult{
	// 	Value: []*armredis.Operation{
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/checknameavailability/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Checks if a name is available for use with a new Redis Cache"),
	// 				Operation: to.Ptr("Check Cache Name Availability"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/register/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Registers the 'Microsoft.Cache' resource provider with a subscription"),
	// 				Operation: to.Ptr("Register Resource Provider Microsoft.Cache"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/unregister/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Unregisters the 'Microsoft.Cache' resource provider with a subscription"),
	// 				Operation: to.Ptr("Unregister Resource Provider Microsoft.Cache"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/operations/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Lists the operations that 'Microsoft.Cache' provider supports."),
	// 				Operation: to.Ptr("List Provider Operations"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/locations/operationResults/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Gets the result of a long running operation for which the 'Location' header was previously returned to the client"),
	// 				Operation: to.Ptr("Read operation results"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/locations/operationsStatus/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("View the status of a long running operation for which the 'AzureAsync' header was previously returned to the client"),
	// 				Operation: to.Ptr("Read the status of a long running operation"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/locations/asyncOperations/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Read an Async Operation's Status"),
	// 				Operation: to.Ptr("Read asynchronous operation status"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/locations/checknameavailability/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Checks if a name is available for use with a new Redis Enterprise cache"),
	// 				Operation: to.Ptr("Check Cache Name Availability in location"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Modify the Redis Cache's settings and configuration in the management portal"),
	// 				Operation: to.Ptr("Manage Redis Cache (read-write)"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("View the Redis Cache's settings and configuration in the management portal"),
	// 				Operation: to.Ptr("Manage Redis Cache (read-only)"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete the entire Redis Cache"),
	// 				Operation: to.Ptr("Delete Redis Cache"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/listKeys/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("View the value of Redis Cache access keys in the management portal"),
	// 				Operation: to.Ptr("View Redis Cache Access Keys"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/regenerateKey/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Change the value of Redis Cache access keys in the management portal"),
	// 				Operation: to.Ptr("Regenerate Redis Cache Access Keys"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/import/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Import data of a specified format from multiple blobs into Redis"),
	// 				Operation: to.Ptr("Import data into Redis from storage"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/export/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Export Redis data to prefixed storage blobs in specified format"),
	// 				Operation: to.Ptr("Export Redis data to storage"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/forceReboot/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Force reboot a cache instance, potentially with data loss."),
	// 				Operation: to.Ptr("Force reboot a cache instance, potentially with data loss."),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/stop/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Stop an Azure Cache for Redis, potentially with data loss."),
	// 				Operation: to.Ptr("Stop an Azure Cache for Redis, potentially with data loss."),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/start/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Start an Azure Cache for Redis"),
	// 				Operation: to.Ptr("Start an Azure Cache for Redis"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete the entire Redis Enterprise cache"),
	// 				Operation: to.Ptr("Delete Redis Enterprise cache"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("View the Redis Enterprise cache's settings and configuration in the management portal"),
	// 				Operation: to.Ptr("Manage Redis Enterprise cache (read)"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Modify the Redis Enterprise cache's settings and configuration in the management portal"),
	// 				Operation: to.Ptr("Manage Redis Enterprise cache (write)"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/databases/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Deletes a Redis Enterprise database and its contents"),
	// 				Operation: to.Ptr("Delete Redis Enterprise database"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache database"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/databases/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("View the Redis Enterprise cache database's settings and configuration in the management portal"),
	// 				Operation: to.Ptr("Manage Redis Enterprise cache database (read)"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache database"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/databases/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Modify the Redis Enterprise cache database's settings and configuration in the management portal"),
	// 				Operation: to.Ptr("Manage Redis Enterprise cache database (write)"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache database"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/databases/export/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Export data to storage blobs from a Redis Enterprise database "),
	// 				Operation: to.Ptr("Export Redis Enterprise database"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache database"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/databases/forceUnlink/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Forcibly unlink a georeplica Redis Enterprise database from its peers"),
	// 				Operation: to.Ptr("Force unlink Redis Enterprise database georeplica"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache database"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/databases/import/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Import data from storage blobs to a Redis Enterprise database"),
	// 				Operation: to.Ptr("Import Redis Enterprise database"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache database"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/databases/listKeys/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("View the value of Redis Enterprise database access keys in the management portal"),
	// 				Operation: to.Ptr("View Redis Enterprise database access keys"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache database"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/databases/regenerateKey/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Change the value of Redis Enterprise database access keys in the management portal"),
	// 				Operation: to.Ptr("Regenerate Redis Enterprise database access keys"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache database"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/databases/operationResults/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("View the result of Redis Enterprise database operations in the management portal"),
	// 				Operation: to.Ptr("View Redis Enterprise database operation results"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise database operation results"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/operationResults/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("View the result of Redis Enterprise operations in the management portal"),
	// 				Operation: to.Ptr("View Redis Enterprise operation results"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise operation results"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/metricDefinitions/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Gets the available metrics for a Redis Cache"),
	// 				Operation: to.Ptr("Read Redis Cache Metric Definitions"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("The available metrics for a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/providers/Microsoft.Insights/metricDefinitions/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Gets the available metrics for a Redis Enterprise Cache"),
	// 				Operation: to.Ptr("Read Redis Enterprise Metric Definitions"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("The available metrics for a Redis Enterprise Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/patchSchedules/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Gets the patching schedule of a Redis Cache"),
	// 				Operation: to.Ptr("Get Redis Cache Patch Schedule"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Patching schedule of a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/patchSchedules/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Modify the patching schedule of a Redis Cache"),
	// 				Operation: to.Ptr("Change Redis Patching Schedule"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Patching schedule of a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/patchSchedules/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete the patch schedule of a Redis Cache"),
	// 				Operation: to.Ptr("Delete Redis Cache Patch Schedule"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Patching schedule of a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/firewallRules/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Get the IP firewall rules of a Redis Cache"),
	// 				Operation: to.Ptr("Get Redis Cache Firewall Rule"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("IP firewall rule of a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/firewallRules/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Edit the IP firewall rules of a Redis Cache"),
	// 				Operation: to.Ptr("Update Redis Cache Firewall Rule"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("IP firewall rule of a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/firewallRules/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete IP firewall rules of a Redis Cache"),
	// 				Operation: to.Ptr("Delete Redis Cache Firewall Rule"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("IP firewall rule of a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/linkedServers/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Get Linked Servers associated with a redis cache."),
	// 				Operation: to.Ptr("Get Redis Cache Linked Servers"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Linked Servers of a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/linkedServers/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Add Linked Server to a Redis Cache"),
	// 				Operation: to.Ptr("Add Redis Cache Linked Server"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Linked Servers of a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/linkedServers/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete Linked Server from a Redis Cache"),
	// 				Operation: to.Ptr("Delete Redis Cache Linked Server"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Linked Servers of a Redis Cache"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/eventGridFilters/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Get Redis Cache Event Grid Filter"),
	// 				Operation: to.Ptr("Get Redis Cache Event Grid Filter"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache Event Grid Filter"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/eventGridFilters/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Update Redis Cache Event Grid Filters"),
	// 				Operation: to.Ptr("Update Redis Cache Event Grid Filters"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache Event Grid Filter"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/eventGridFilters/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete Redis Cache Event Grid Filters"),
	// 				Operation: to.Ptr("Delete Redis Cache Event Grid Filters"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Cache Event Grid Filter"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/privateEndpointConnectionProxies/validate/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Validate the private endpoint connection proxy"),
	// 				Operation: to.Ptr("Validate private endpoint connection proxy"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis private endpoint connection proxies"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/privateEndpointConnectionProxies/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Get the private endpoint connection proxy"),
	// 				Operation: to.Ptr("Get private endpoint connection proxy"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis private endpoint connection proxies"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/privateEndpointConnectionProxies/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Create the private endpoint connection proxy"),
	// 				Operation: to.Ptr("Create private endpoint connection proxy"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis private endpoint connection proxies"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/privateEndpointConnectionProxies/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete the private endpoint connection proxy"),
	// 				Operation: to.Ptr("Delete private endpoint connection proxy"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis private endpoint connection proxies"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/privateEndpointConnectionProxies/validate/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Validate the private endpoint connection proxy"),
	// 				Operation: to.Ptr("Validate private endpoint connection proxy"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise private endpoint connection proxies"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/privateEndpointConnectionProxies/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Get the private endpoint connection proxy"),
	// 				Operation: to.Ptr("Get private endpoint connection proxy"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise private endpoint connection proxies"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/privateEndpointConnectionProxies/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Create the private endpoint connection proxy"),
	// 				Operation: to.Ptr("Create private endpoint connection proxy"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise private endpoint connection proxies"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/privateEndpointConnectionProxies/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete the private endpoint connection proxy"),
	// 				Operation: to.Ptr("Delete private endpoint connection proxy"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise private endpoint connection proxies"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/privateEndpointConnectionProxies/operationResults/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("View the result of private endpoint connection operations in the management portal"),
	// 				Operation: to.Ptr("Redis Enterprise cache private endpoint operation results (read)"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise private endpoint connection proxies"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/privateEndpointConnections/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Read a private endpoint connection"),
	// 				Operation: to.Ptr("Read private endpoint connection"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis private endpoint connections"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/privateEndpointConnections/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Write a private endpoint connection"),
	// 				Operation: to.Ptr("Write private endpoint connection"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis private endpoint connections"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/privateEndpointConnections/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete a private endpoint connection"),
	// 				Operation: to.Ptr("Delete private endpoint connection"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis private endpoint connections"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/privateEndpointConnections/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Read a private endpoint connection"),
	// 				Operation: to.Ptr("Read private endpoint connection"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache private endpoint connections"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/privateEndpointConnections/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Write a private endpoint connection"),
	// 				Operation: to.Ptr("Write private endpoint connection"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache private endpoint connections"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/privateEndpointConnections/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete a private endpoint connection"),
	// 				Operation: to.Ptr("Delete private endpoint connection"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache private endpoint connections"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/privateLinkResources/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Read 'groupId' of redis subresource that a private link can be connected to"),
	// 				Operation: to.Ptr("Read Private Linkable Resources"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis private linkable resources"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/privateLinkResources/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Read 'groupId' of redis subresource that a private link can be connected to"),
	// 				Operation: to.Ptr("Read Private Linkable Resources"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache private link resources"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/roles/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Read roles on a Redis Cache"),
	// 				Operation: to.Ptr("Read Redis Roles"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis Roles"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/roles/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Create or update role on a Redis Cache"),
	// 				Operation: to.Ptr("Update Redis Roles"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis Roles"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/roles/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete role on a Redis Cache"),
	// 				Operation: to.Ptr("Delete Redis Roles"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis Roles"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/roleAssignments/read"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Read role assignments on a Redis Cache"),
	// 				Operation: to.Ptr("Read Redis Role Assignments"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis Role Description"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/roleAssignments/write"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Create or update role assignments on a Redis Cache"),
	// 				Operation: to.Ptr("Update Redis Role Assignments"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis Role Description"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/roleAssignments/delete"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Delete All Redis Role Assignments"),
	// 				Operation: to.Ptr("Delete Redis Role Assignment"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis Role Description"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redis/PrivateEndpointConnectionsApproval/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Approve Private Endpoint Connections"),
	// 				Operation: to.Ptr("Approve Private Endpoint Connections"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Azure Cache for Redis private linkable resources"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Cache/redisEnterprise/PrivateEndpointConnectionsApproval/action"),
	// 			Display: &armredis.OperationDisplay{
	// 				Description: to.Ptr("Approve Private Endpoint Connections"),
	// 				Operation: to.Ptr("Approve Private Endpoint Connections"),
	// 				Provider: to.Ptr("Microsoft Cache"),
	// 				Resource: to.Ptr("Redis Enterprise cache private link resources"),
	// 			},
	// 	}},
	// }
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PatchSchedule

type PatchSchedule struct {
	// REQUIRED; List of patch schedules for a Redis cache.
	Properties *ScheduleEntries

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PatchSchedule - Response to put/get patch schedules for Redis cache.

func (PatchSchedule) MarshalJSON

func (p PatchSchedule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PatchSchedule.

func (*PatchSchedule) UnmarshalJSON

func (p *PatchSchedule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PatchSchedule.

type PatchScheduleListResult

type PatchScheduleListResult struct {
	// Results of the list patch schedules operation.
	Value []*PatchSchedule

	// READ-ONLY; Link for next page of results.
	NextLink *string
}

PatchScheduleListResult - The response of list patch schedules Redis operation.

func (PatchScheduleListResult) MarshalJSON

func (p PatchScheduleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PatchScheduleListResult.

func (*PatchScheduleListResult) UnmarshalJSON

func (p *PatchScheduleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PatchScheduleListResult.

type PatchSchedulesClient

type PatchSchedulesClient struct {
	// contains filtered or unexported fields
}

PatchSchedulesClient contains the methods for the PatchSchedules group. Don't use this type directly, use NewPatchSchedulesClient() instead.

func NewPatchSchedulesClient

func NewPatchSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PatchSchedulesClient, error)

NewPatchSchedulesClient creates a new instance of PatchSchedulesClient with the specified values.

  • subscriptionID - Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PatchSchedulesClient) CreateOrUpdate

func (client *PatchSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, defaultParam DefaultName, parameters PatchSchedule, options *PatchSchedulesClientCreateOrUpdateOptions) (PatchSchedulesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or replace the patching schedule for Redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the Redis cache.
  • defaultParam - Default string modeled as parameter for auto generation to work correctly.
  • parameters - Parameters to set the patching schedule for Redis cache.
  • options - PatchSchedulesClientCreateOrUpdateOptions contains the optional parameters for the PatchSchedulesClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPatchSchedulesClient().CreateOrUpdate(ctx, "rg1", "cache1", armredis.DefaultNameDefault, armredis.PatchSchedule{
	Properties: &armredis.ScheduleEntries{
		ScheduleEntries: []*armredis.ScheduleEntry{
			{
				DayOfWeek:         to.Ptr(armredis.DayOfWeekMonday),
				MaintenanceWindow: to.Ptr("PT5H"),
				StartHourUTC:      to.Ptr[int32](12),
			},
			{
				DayOfWeek:    to.Ptr(armredis.DayOfWeekTuesday),
				StartHourUTC: to.Ptr[int32](12),
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PatchSchedule = armredis.PatchSchedule{
// 	Name: to.Ptr("cachename1/default"),
// 	Type: to.Ptr("Microsoft.Cache/Redis/PatchSchedules"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/patchSchedules/default"),
// 	Location: to.Ptr("East US"),
// 	Properties: &armredis.ScheduleEntries{
// 		ScheduleEntries: []*armredis.ScheduleEntry{
// 			{
// 				DayOfWeek: to.Ptr(armredis.DayOfWeekMonday),
// 				MaintenanceWindow: to.Ptr("PT5H"),
// 				StartHourUTC: to.Ptr[int32](12),
// 			},
// 			{
// 				DayOfWeek: to.Ptr(armredis.DayOfWeekTuesday),
// 				StartHourUTC: to.Ptr[int32](12),
// 		}},
// 	},
// }
Output:

func (*PatchSchedulesClient) Delete

func (client *PatchSchedulesClient) Delete(ctx context.Context, resourceGroupName string, name string, defaultParam DefaultName, options *PatchSchedulesClientDeleteOptions) (PatchSchedulesClientDeleteResponse, error)

Delete - Deletes the patching schedule of a redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the redis cache.
  • defaultParam - Default string modeled as parameter for auto generation to work correctly.
  • options - PatchSchedulesClientDeleteOptions contains the optional parameters for the PatchSchedulesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePatchSchedulesDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewPatchSchedulesClient().Delete(ctx, "rg1", "cache1", armredis.DefaultNameDefault, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*PatchSchedulesClient) Get

func (client *PatchSchedulesClient) Get(ctx context.Context, resourceGroupName string, name string, defaultParam DefaultName, options *PatchSchedulesClientGetOptions) (PatchSchedulesClientGetResponse, error)

Get - Gets the patching schedule of a redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • name - The name of the redis cache.
  • defaultParam - Default string modeled as parameter for auto generation to work correctly.
  • options - PatchSchedulesClientGetOptions contains the optional parameters for the PatchSchedulesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePatchSchedulesGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPatchSchedulesClient().Get(ctx, "rg1", "cache1", armredis.DefaultNameDefault, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PatchSchedule = armredis.PatchSchedule{
// 	Name: to.Ptr("cache1/default"),
// 	Type: to.Ptr("Microsoft.Cache/Redis/PatchSchedules"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/patchSchedules/default"),
// 	Location: to.Ptr("East US"),
// 	Properties: &armredis.ScheduleEntries{
// 		ScheduleEntries: []*armredis.ScheduleEntry{
// 			{
// 				DayOfWeek: to.Ptr(armredis.DayOfWeekMonday),
// 				MaintenanceWindow: to.Ptr("PT5H"),
// 				StartHourUTC: to.Ptr[int32](12),
// 			},
// 			{
// 				DayOfWeek: to.Ptr(armredis.DayOfWeekTuesday),
// 				StartHourUTC: to.Ptr[int32](12),
// 		}},
// 	},
// }
Output:

func (*PatchSchedulesClient) NewListByRedisResourcePager

func (client *PatchSchedulesClient) NewListByRedisResourcePager(resourceGroupName string, cacheName string, options *PatchSchedulesClientListByRedisResourceOptions) *runtime.Pager[PatchSchedulesClientListByRedisResourceResponse]

NewListByRedisResourcePager - Gets all patch schedules in the specified redis cache (there is only one).

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • options - PatchSchedulesClientListByRedisResourceOptions contains the optional parameters for the PatchSchedulesClient.NewListByRedisResourcePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePatchSchedulesList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPatchSchedulesClient().NewListByRedisResourcePager("rg1", "cache1", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.PatchScheduleListResult = armredis.PatchScheduleListResult{
	// 	Value: []*armredis.PatchSchedule{
	// 		{
	// 			Name: to.Ptr("cache1/default"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis/PatchSchedules"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/patchSchedules/default"),
	// 			Location: to.Ptr("East US"),
	// 			Properties: &armredis.ScheduleEntries{
	// 				ScheduleEntries: []*armredis.ScheduleEntry{
	// 					{
	// 						DayOfWeek: to.Ptr(armredis.DayOfWeekMonday),
	// 						MaintenanceWindow: to.Ptr("PT5H"),
	// 						StartHourUTC: to.Ptr[int32](12),
	// 					},
	// 					{
	// 						DayOfWeek: to.Ptr(armredis.DayOfWeekTuesday),
	// 						StartHourUTC: to.Ptr[int32](12),
	// 				}},
	// 			},
	// 	}},
	// }
}
Output:

type PatchSchedulesClientCreateOrUpdateOptions

type PatchSchedulesClientCreateOrUpdateOptions struct {
}

PatchSchedulesClientCreateOrUpdateOptions contains the optional parameters for the PatchSchedulesClient.CreateOrUpdate method.

type PatchSchedulesClientCreateOrUpdateResponse

type PatchSchedulesClientCreateOrUpdateResponse struct {
	PatchSchedule
}

PatchSchedulesClientCreateOrUpdateResponse contains the response from method PatchSchedulesClient.CreateOrUpdate.

type PatchSchedulesClientDeleteOptions

type PatchSchedulesClientDeleteOptions struct {
}

PatchSchedulesClientDeleteOptions contains the optional parameters for the PatchSchedulesClient.Delete method.

type PatchSchedulesClientDeleteResponse

type PatchSchedulesClientDeleteResponse struct {
}

PatchSchedulesClientDeleteResponse contains the response from method PatchSchedulesClient.Delete.

type PatchSchedulesClientGetOptions

type PatchSchedulesClientGetOptions struct {
}

PatchSchedulesClientGetOptions contains the optional parameters for the PatchSchedulesClient.Get method.

type PatchSchedulesClientGetResponse

type PatchSchedulesClientGetResponse struct {
	PatchSchedule
}

PatchSchedulesClientGetResponse contains the response from method PatchSchedulesClient.Get.

type PatchSchedulesClientListByRedisResourceOptions

type PatchSchedulesClientListByRedisResourceOptions struct {
}

PatchSchedulesClientListByRedisResourceOptions contains the optional parameters for the PatchSchedulesClient.NewListByRedisResourcePager method.

type PatchSchedulesClientListByRedisResourceResponse

type PatchSchedulesClientListByRedisResourceResponse struct {
	PatchScheduleListResult
}

PatchSchedulesClientListByRedisResourceResponse contains the response from method PatchSchedulesClient.NewListByRedisResourcePager.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string
}

PrivateEndpoint - The Private Endpoint resource.

func (PrivateEndpoint) MarshalJSON

func (p PrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON

func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateEndpointConnection - The Private Endpoint Connection resource.

func (PrivateEndpointConnection) MarshalJSON

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account

func (PrivateEndpointConnectionListResult) MarshalJSON

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON

func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// The resource of private end point.
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

func (PrivateEndpointConnectionProperties) MarshalJSON

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointConnectionsClient

type PrivateEndpointConnectionsClient struct {
	// contains filtered or unexported fields
}

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

  • subscriptionID - Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginPut

BeginPut - Update the state of specified private endpoint connection associated with the redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource
  • properties - The private endpoint connection properties.
  • options - PrivateEndpointConnectionsClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginPut method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePutPrivateEndpointConnection.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginPut(ctx, "rgtest01", "cachetest01", "pectest01", armredis.PrivateEndpointConnection{
	Properties: &armredis.PrivateEndpointConnectionProperties{
		PrivateLinkServiceConnectionState: &armredis.PrivateLinkServiceConnectionState{
			Description: to.Ptr("Auto-Approved"),
			Status:      to.Ptr(armredis.PrivateEndpointServiceConnectionStatusApproved),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateEndpointConnection = armredis.PrivateEndpointConnection{
// 	Name: to.Ptr("pectest01"),
// 	Type: to.Ptr("Microsoft.Cache/Redis/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cachetest01/privateEndpointConnections/pectest01"),
// 	Properties: &armredis.PrivateEndpointConnectionProperties{
// 		PrivateEndpoint: &armredis.PrivateEndpoint{
// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Network/privateEndpoints/petest01"),
// 		},
// 		PrivateLinkServiceConnectionState: &armredis.PrivateLinkServiceConnectionState{
// 			Description: to.Ptr("Auto-Approved"),
// 			ActionsRequired: to.Ptr("None"),
// 			Status: to.Ptr(armredis.PrivateEndpointServiceConnectionStatusApproved),
// 		},
// 		ProvisioningState: to.Ptr(armredis.PrivateEndpointConnectionProvisioningStateSucceeded),
// 	},
// }
Output:

func (*PrivateEndpointConnectionsClient) Delete

func (client *PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, cacheName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteOptions) (PrivateEndpointConnectionsClientDeleteResponse, error)

Delete - Deletes the specified private endpoint connection associated with the redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource
  • options - PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheDeletePrivateEndpointConnection.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewPrivateEndpointConnectionsClient().Delete(ctx, "rgtest01", "cachetest01", "pectest01", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*PrivateEndpointConnectionsClient) Get

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Gets the specified private endpoint connection associated with the redis cache. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheGetPrivateEndpointConnection.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "rgtest01", "cachetest01", "pectest01", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateEndpointConnection = armredis.PrivateEndpointConnection{
// 	Name: to.Ptr("pectest01"),
// 	Type: to.Ptr("Microsoft.Cache/Redis/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cachetest01/privateEndpointConnections/pectest01"),
// 	Properties: &armredis.PrivateEndpointConnectionProperties{
// 		PrivateEndpoint: &armredis.PrivateEndpoint{
// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Network/privateEndpoints/petest01"),
// 		},
// 		PrivateLinkServiceConnectionState: &armredis.PrivateLinkServiceConnectionState{
// 			Description: to.Ptr("Auto-Approved"),
// 			ActionsRequired: to.Ptr("None"),
// 			Status: to.Ptr(armredis.PrivateEndpointServiceConnectionStatusApproved),
// 		},
// 		ProvisioningState: to.Ptr(armredis.PrivateEndpointConnectionProvisioningStateSucceeded),
// 	},
// }
Output:

func (*PrivateEndpointConnectionsClient) NewListPager

NewListPager - List all the private endpoint connections associated with the redis cache.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListPrivateEndpointConnections.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("rgtest01", "cachetest01", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.PrivateEndpointConnectionListResult = armredis.PrivateEndpointConnectionListResult{
	// 	Value: []*armredis.PrivateEndpointConnection{
	// 		{
	// 			Name: to.Ptr("pectest01"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis/privateEndpointConnections"),
	// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cachetest01/privateEndpointConnections/pectest01"),
	// 			Properties: &armredis.PrivateEndpointConnectionProperties{
	// 				PrivateEndpoint: &armredis.PrivateEndpoint{
	// 					ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Network/privateEndpoints/petest01"),
	// 				},
	// 				PrivateLinkServiceConnectionState: &armredis.PrivateLinkServiceConnectionState{
	// 					Description: to.Ptr("Auto-Approved"),
	// 					ActionsRequired: to.Ptr("None"),
	// 					Status: to.Ptr(armredis.PrivateEndpointServiceConnectionStatusApproved),
	// 				},
	// 				ProvisioningState: to.Ptr(armredis.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("pectest01"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis/privateEndpointConnections"),
	// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cachetest01/privateEndpointConnections/pectest01"),
	// 			Properties: &armredis.PrivateEndpointConnectionProperties{
	// 				PrivateEndpoint: &armredis.PrivateEndpoint{
	// 					ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Network/privateEndpoints/petest01"),
	// 				},
	// 				PrivateLinkServiceConnectionState: &armredis.PrivateLinkServiceConnectionState{
	// 					Description: to.Ptr("Auto-Approved"),
	// 					ActionsRequired: to.Ptr("None"),
	// 					Status: to.Ptr(armredis.PrivateEndpointServiceConnectionStatusApproved),
	// 				},
	// 				ProvisioningState: to.Ptr(armredis.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type PrivateEndpointConnectionsClientBeginPutOptions

type PrivateEndpointConnectionsClientBeginPutOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginPut method.

type PrivateEndpointConnectionsClientDeleteOptions

type PrivateEndpointConnectionsClientDeleteOptions struct {
}

PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete method.

type PrivateEndpointConnectionsClientDeleteResponse

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.

type PrivateEndpointConnectionsClientGetOptions

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse

type PrivateEndpointConnectionsClientGetResponse struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.

type PrivateEndpointConnectionsClientListResponse

type PrivateEndpointConnectionsClientListResponse struct {
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.

type PrivateEndpointConnectionsClientPutResponse

type PrivateEndpointConnectionsClientPutResponse struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientPutResponse contains the response from method PrivateEndpointConnectionsClient.BeginPut.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON

func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON

func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string

	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

type PrivateLinkResourcesClient struct {
	// contains filtered or unexported fields
}

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

  • subscriptionID - Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) NewListByRedisCachePager

NewListByRedisCachePager - Gets the private link resources that need to be created for a redis cache.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group.
  • cacheName - The name of the Redis cache.
  • options - PrivateLinkResourcesClientListByRedisCacheOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByRedisCachePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListPrivateLinkResources.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredis.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateLinkResourcesClient().NewListByRedisCachePager("rgtest01", "cacheTest01", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.PrivateLinkResourceListResult = armredis.PrivateLinkResourceListResult{
	// 	Value: []*armredis.PrivateLinkResource{
	// 		{
	// 			Name: to.Ptr("redisCache"),
	// 			Type: to.Ptr("Microsoft.Cache/Redis/privateLinkResources"),
	// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cacheTest01/privateLinkResources/redisCache"),
	// 			Properties: &armredis.PrivateLinkResourceProperties{
	// 				GroupID: to.Ptr("redisCache"),
	// 				RequiredMembers: []*string{
	// 					to.Ptr("redisCache")},
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("privatelink.redis.cache.windows.net")},
	// 					},
	// 			}},
	// 		}
}
Output:

type PrivateLinkResourcesClientListByRedisCacheOptions

type PrivateLinkResourcesClientListByRedisCacheOptions struct {
}

PrivateLinkResourcesClientListByRedisCacheOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByRedisCachePager method.

type PrivateLinkResourcesClientListByRedisCacheResponse

type PrivateLinkResourcesClientListByRedisCacheResponse struct {
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListByRedisCacheResponse contains the response from method PrivateLinkResourcesClient.NewListByRedisCachePager.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string

	// The reason for approval/rejection of the connection.
	Description *string

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

func (PrivateLinkServiceConnectionState) MarshalJSON

func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON

func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type Properties

type Properties struct {
	// REQUIRED; The SKU of the Redis cache to deploy.
	SKU *SKU

	// Specifies whether the non-ssl Redis server port (6379) is enabled.
	EnableNonSSLPort *bool

	// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')
	MinimumTLSVersion *TLSVersion

	// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled'
	// or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method.
	// Default value is 'Enabled'
	PublicNetworkAccess *PublicNetworkAccess

	// All Redis Settings. Few possible keys:
	// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
	// etc.
	RedisConfiguration *CommonPropertiesRedisConfiguration

	// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers
	// to the latest stable Redis version that is available. Supported versions: 4.0,
	// 6.0 (latest). Default value is 'latest'.
	RedisVersion *string

	// The number of replicas to be created per primary.
	ReplicasPerMaster *int32

	// The number of replicas to be created per primary.
	ReplicasPerPrimary *int32

	// The number of shards to be created on a Premium Cluster Cache.
	ShardCount *int32

	// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network;
	// auto assigned by default.
	StaticIP *string

	// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
	SubnetID *string

	// A dictionary of tenant settings
	TenantSettings map[string]*string

	// READ-ONLY; The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache
	AccessKeys *AccessKeys

	// READ-ONLY; Redis host name.
	HostName *string

	// READ-ONLY; List of the Redis instances associated with the cache
	Instances []*InstanceDetails

	// READ-ONLY; List of the linked servers associated with the cache
	LinkedServers []*LinkedServer

	// READ-ONLY; Redis non-SSL port.
	Port *int32

	// READ-ONLY; List of private endpoint connection associated with the specified redis cache
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; Redis instance provisioning status.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Redis SSL port.
	SSLPort *int32
}

Properties of the redis cache.

func (Properties) MarshalJSON

func (p Properties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Redis instance provisioning status.

const (
	ProvisioningStateCreating               ProvisioningState = "Creating"
	ProvisioningStateDeleting               ProvisioningState = "Deleting"
	ProvisioningStateDisabled               ProvisioningState = "Disabled"
	ProvisioningStateFailed                 ProvisioningState = "Failed"
	ProvisioningStateLinking                ProvisioningState = "Linking"
	ProvisioningStateProvisioning           ProvisioningState = "Provisioning"
	ProvisioningStateRecoveringScaleFailure ProvisioningState = "RecoveringScaleFailure"
	ProvisioningStateScaling                ProvisioningState = "Scaling"
	ProvisioningStateSucceeded              ProvisioningState = "Succeeded"
	ProvisioningStateUnlinking              ProvisioningState = "Unlinking"
	ProvisioningStateUnprovisioning         ProvisioningState = "Unprovisioning"
	ProvisioningStateUpdating               ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type RebootParameters

type RebootParameters struct {
	// A list of redis instances to reboot, specified by per-instance SSL ports or non-SSL ports.
	Ports []*int32

	// Which Redis node(s) to reboot. Depending on this value data loss is possible.
	RebootType *RebootType

	// If clustering is enabled, the ID of the shard to be rebooted.
	ShardID *int32
}

RebootParameters - Specifies which Redis node(s) to reboot.

func (RebootParameters) MarshalJSON

func (r RebootParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RebootParameters.

func (*RebootParameters) UnmarshalJSON

func (r *RebootParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RebootParameters.

type RebootType

type RebootType string

RebootType - Which Redis node(s) to reboot. Depending on this value data loss is possible.

const (
	RebootTypeAllNodes      RebootType = "AllNodes"
	RebootTypePrimaryNode   RebootType = "PrimaryNode"
	RebootTypeSecondaryNode RebootType = "SecondaryNode"
)

func PossibleRebootTypeValues

func PossibleRebootTypeValues() []RebootType

PossibleRebootTypeValues returns the possible values for the RebootType const type.

type RedisKeyType

type RedisKeyType string

RedisKeyType - The Redis access key to regenerate.

const (
	RedisKeyTypePrimary   RedisKeyType = "Primary"
	RedisKeyTypeSecondary RedisKeyType = "Secondary"
)

func PossibleRedisKeyTypeValues

func PossibleRedisKeyTypeValues() []RedisKeyType

PossibleRedisKeyTypeValues returns the possible values for the RedisKeyType const type.

type RegenerateKeyParameters

type RegenerateKeyParameters struct {
	// REQUIRED; The Redis access key to regenerate.
	KeyType *RedisKeyType
}

RegenerateKeyParameters - Specifies which Redis access keys to reset.

func (RegenerateKeyParameters) MarshalJSON

func (r RegenerateKeyParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegenerateKeyParameters.

func (*RegenerateKeyParameters) UnmarshalJSON

func (r *RegenerateKeyParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateKeyParameters.

type ReplicationRole

type ReplicationRole string

ReplicationRole - Role of the linked server.

const (
	ReplicationRolePrimary   ReplicationRole = "Primary"
	ReplicationRoleSecondary ReplicationRole = "Secondary"
)

func PossibleReplicationRoleValues

func PossibleReplicationRoleValues() []ReplicationRole

PossibleReplicationRoleValues returns the possible values for the ReplicationRole const type.

type ResourceInfo

type ResourceInfo struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Redis cache properties.
	Properties *Properties

	// The identity of the resource.
	Identity *ManagedServiceIdentity

	// Resource tags.
	Tags map[string]*string

	// A list of availability zones denoting where the resource needs to come from.
	Zones []*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ResourceInfo - A single Redis item in List or Get Operation.

func (ResourceInfo) MarshalJSON

func (r ResourceInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceInfo.

func (*ResourceInfo) UnmarshalJSON

func (r *ResourceInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceInfo.

type SKU

type SKU struct {
	// REQUIRED; The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for
	// P (Premium) family (1, 2, 3, 4).
	Capacity *int32

	// REQUIRED; The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium).
	Family *SKUFamily

	// REQUIRED; The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium)
	Name *SKUName
}

SKU parameters supplied to the create Redis operation.

func (SKU) MarshalJSON

func (s SKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON

func (s *SKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUFamily

type SKUFamily string

SKUFamily - The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium).

const (
	SKUFamilyC SKUFamily = "C"
	SKUFamilyP SKUFamily = "P"
)

func PossibleSKUFamilyValues

func PossibleSKUFamilyValues() []SKUFamily

PossibleSKUFamilyValues returns the possible values for the SKUFamily const type.

type SKUName

type SKUName string

SKUName - The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium)

const (
	SKUNameBasic    SKUName = "Basic"
	SKUNamePremium  SKUName = "Premium"
	SKUNameStandard SKUName = "Standard"
)

func PossibleSKUNameValues

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

type ScheduleEntries

type ScheduleEntries struct {
	// REQUIRED; List of patch schedules for a Redis cache.
	ScheduleEntries []*ScheduleEntry
}

ScheduleEntries - List of patch schedules for a Redis cache.

func (ScheduleEntries) MarshalJSON

func (s ScheduleEntries) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScheduleEntries.

func (*ScheduleEntries) UnmarshalJSON

func (s *ScheduleEntries) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleEntries.

type ScheduleEntry

type ScheduleEntry struct {
	// REQUIRED; Day of the week when a cache can be patched.
	DayOfWeek *DayOfWeek

	// REQUIRED; Start hour after which cache patching can start.
	StartHourUTC *int32

	// ISO8601 timespan specifying how much time cache patching can take.
	MaintenanceWindow *string
}

ScheduleEntry - Patch schedule entry for a Premium Redis Cache.

func (ScheduleEntry) MarshalJSON

func (s ScheduleEntry) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScheduleEntry.

func (*ScheduleEntry) UnmarshalJSON

func (s *ScheduleEntry) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleEntry.

type TLSVersion

type TLSVersion string

TLSVersion - Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')

const (
	TLSVersionOne0 TLSVersion = "1.0"
	TLSVersionOne1 TLSVersion = "1.1"
	TLSVersionOne2 TLSVersion = "1.2"
)

func PossibleTLSVersionValues

func PossibleTLSVersionValues() []TLSVersion

PossibleTLSVersionValues returns the possible values for the TLSVersion const type.

type UpdateParameters

type UpdateParameters struct {
	// The identity of the resource.
	Identity *ManagedServiceIdentity

	// Redis cache properties.
	Properties *UpdateProperties

	// Resource tags.
	Tags map[string]*string
}

UpdateParameters - Parameters supplied to the Update Redis operation.

func (UpdateParameters) MarshalJSON

func (u UpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateParameters.

func (*UpdateParameters) UnmarshalJSON

func (u *UpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateParameters.

type UpdateProperties

type UpdateProperties struct {
	// Specifies whether the non-ssl Redis server port (6379) is enabled.
	EnableNonSSLPort *bool

	// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')
	MinimumTLSVersion *TLSVersion

	// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled'
	// or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method.
	// Default value is 'Enabled'
	PublicNetworkAccess *PublicNetworkAccess

	// All Redis Settings. Few possible keys:
	// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
	// etc.
	RedisConfiguration *CommonPropertiesRedisConfiguration

	// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers
	// to the latest stable Redis version that is available. Supported versions: 4.0,
	// 6.0 (latest). Default value is 'latest'.
	RedisVersion *string

	// The number of replicas to be created per primary.
	ReplicasPerMaster *int32

	// The number of replicas to be created per primary.
	ReplicasPerPrimary *int32

	// The SKU of the Redis cache to deploy.
	SKU *SKU

	// The number of shards to be created on a Premium Cluster Cache.
	ShardCount *int32

	// A dictionary of tenant settings
	TenantSettings map[string]*string
}

UpdateProperties - Patchable properties of the redis cache.

func (UpdateProperties) MarshalJSON

func (u UpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateProperties.

func (*UpdateProperties) UnmarshalJSON

func (u *UpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProperties.

type UpgradeNotification

type UpgradeNotification struct {
	// READ-ONLY; Name of upgrade notification.
	Name *string

	// READ-ONLY; Timestamp when upgrade notification occurred.
	Timestamp *time.Time

	// READ-ONLY; Details about this upgrade notification
	UpsellNotification map[string]*string
}

UpgradeNotification - Properties of upgrade notification.

func (UpgradeNotification) MarshalJSON

func (u UpgradeNotification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpgradeNotification.

func (*UpgradeNotification) UnmarshalJSON

func (u *UpgradeNotification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpgradeNotification.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; The client ID of the assigned identity.
	ClientID *string

	// READ-ONLY; The principal ID of the assigned identity.
	PrincipalID *string
}

UserAssignedIdentity - User assigned identity properties

func (UserAssignedIdentity) MarshalJSON

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL