Documentation
¶
Index ¶
- type AccessKeys
- type AccessPolicyAssignmentClient
- func (client *AccessPolicyAssignmentClient) BeginCreateUpdate(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[AccessPolicyAssignmentClientCreateUpdateResponse], error)
- func (client *AccessPolicyAssignmentClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[AccessPolicyAssignmentClientDeleteResponse], error)
- func (client *AccessPolicyAssignmentClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ...) (AccessPolicyAssignmentClientGetResponse, error)
- func (client *AccessPolicyAssignmentClient) NewListPager(resourceGroupName string, cacheName string, ...) *runtime.Pager[AccessPolicyAssignmentClientListResponse]
- type AccessPolicyAssignmentClientBeginCreateUpdateOptions
- type AccessPolicyAssignmentClientBeginDeleteOptions
- type AccessPolicyAssignmentClientCreateUpdateResponse
- type AccessPolicyAssignmentClientDeleteResponse
- type AccessPolicyAssignmentClientGetOptions
- type AccessPolicyAssignmentClientGetResponse
- type AccessPolicyAssignmentClientListOptions
- type AccessPolicyAssignmentClientListResponse
- type AccessPolicyAssignmentProvisioningState
- type AccessPolicyClient
- func (client *AccessPolicyClient) BeginCreateUpdate(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[AccessPolicyClientCreateUpdateResponse], error)
- func (client *AccessPolicyClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[AccessPolicyClientDeleteResponse], error)
- func (client *AccessPolicyClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ...) (AccessPolicyClientGetResponse, error)
- func (client *AccessPolicyClient) NewListPager(resourceGroupName string, cacheName string, ...) *runtime.Pager[AccessPolicyClientListResponse]
- type AccessPolicyClientBeginCreateUpdateOptions
- type AccessPolicyClientBeginDeleteOptions
- type AccessPolicyClientCreateUpdateResponse
- type AccessPolicyClientDeleteResponse
- type AccessPolicyClientGetOptions
- type AccessPolicyClientGetResponse
- type AccessPolicyClientListOptions
- type AccessPolicyClientListResponse
- type AccessPolicyProvisioningState
- type AccessPolicyType
- type AsyncOperationStatusClient
- type AsyncOperationStatusClientGetOptions
- type AsyncOperationStatusClientGetResponse
- type CacheAccessPolicy
- type CacheAccessPolicyAssignment
- type CacheAccessPolicyAssignmentList
- type CacheAccessPolicyAssignmentProperties
- type CacheAccessPolicyList
- type CacheAccessPolicyProperties
- type CheckNameAvailabilityParameters
- type Client
- func (client *Client) BeginCreate(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[ClientCreateResponse], error)
- func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[ClientDeleteResponse], error)
- func (client *Client) BeginExportData(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[ClientExportDataResponse], error)
- func (client *Client) BeginFlushCache(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[ClientFlushCacheResponse], error)
- func (client *Client) BeginImportData(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[ClientImportDataResponse], error)
- func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[ClientUpdateResponse], error)
- func (client *Client) CheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityParameters, ...) (ClientCheckNameAvailabilityResponse, error)
- func (client *Client) ForceReboot(ctx context.Context, resourceGroupName string, name string, ...) (ClientForceRebootResponse, error)
- func (client *Client) Get(ctx context.Context, resourceGroupName string, name string, ...) (ClientGetResponse, error)
- func (client *Client) ListKeys(ctx context.Context, resourceGroupName string, name string, ...) (ClientListKeysResponse, error)
- func (client *Client) NewListByResourceGroupPager(resourceGroupName string, options *ClientListByResourceGroupOptions) *runtime.Pager[ClientListByResourceGroupResponse]
- func (client *Client) NewListBySubscriptionPager(options *ClientListBySubscriptionOptions) *runtime.Pager[ClientListBySubscriptionResponse]
- func (client *Client) NewListUpgradeNotificationsPager(resourceGroupName string, name string, history float64, ...) *runtime.Pager[ClientListUpgradeNotificationsResponse]
- func (client *Client) RegenerateKey(ctx context.Context, resourceGroupName string, name string, ...) (ClientRegenerateKeyResponse, error)
- type ClientBeginCreateOptions
- type ClientBeginDeleteOptions
- type ClientBeginExportDataOptions
- type ClientBeginFlushCacheOptions
- type ClientBeginImportDataOptions
- type ClientBeginUpdateOptions
- type ClientCheckNameAvailabilityOptions
- type ClientCheckNameAvailabilityResponse
- type ClientCreateResponse
- type ClientDeleteResponse
- type ClientExportDataResponse
- type ClientFactory
- func (c *ClientFactory) NewAccessPolicyAssignmentClient() *AccessPolicyAssignmentClient
- func (c *ClientFactory) NewAccessPolicyClient() *AccessPolicyClient
- func (c *ClientFactory) NewAsyncOperationStatusClient() *AsyncOperationStatusClient
- func (c *ClientFactory) NewClient() *Client
- func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient
- func (c *ClientFactory) NewLinkedServerClient() *LinkedServerClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPatchSchedulesClient() *PatchSchedulesClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
- type ClientFlushCacheResponse
- type ClientForceRebootOptions
- type ClientForceRebootResponse
- type ClientGetOptions
- type ClientGetResponse
- type ClientImportDataResponse
- type ClientListByResourceGroupOptions
- type ClientListByResourceGroupResponse
- type ClientListBySubscriptionOptions
- type ClientListBySubscriptionResponse
- type ClientListKeysOptions
- type ClientListKeysResponse
- type ClientListUpgradeNotificationsOptions
- type ClientListUpgradeNotificationsResponse
- type ClientRegenerateKeyOptions
- type ClientRegenerateKeyResponse
- type ClientUpdateResponse
- type CommonPropertiesRedisConfiguration
- type CreateParameters
- type CreateProperties
- type DayOfWeek
- type DefaultName
- type ErrorAdditionalInfo
- type ErrorDetail
- type ExportRDBParameters
- type FirewallRule
- type FirewallRuleListResult
- type FirewallRuleProperties
- type FirewallRulesClient
- func (client *FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, ...) (FirewallRulesClientCreateOrUpdateResponse, error)
- func (client *FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, cacheName string, ...) (FirewallRulesClientDeleteResponse, error)
- func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ...) (FirewallRulesClientGetResponse, error)
- func (client *FirewallRulesClient) NewListPager(resourceGroupName string, cacheName string, ...) *runtime.Pager[FirewallRulesClientListResponse]
- type FirewallRulesClientCreateOrUpdateOptions
- type FirewallRulesClientCreateOrUpdateResponse
- type FirewallRulesClientDeleteOptions
- type FirewallRulesClientDeleteResponse
- type FirewallRulesClientGetOptions
- type FirewallRulesClientGetResponse
- type FirewallRulesClientListOptions
- type FirewallRulesClientListResponse
- type ForceRebootResponse
- type ImportRDBParameters
- type InstanceDetails
- type LinkedServer
- type LinkedServerClient
- func (client *LinkedServerClient) BeginCreate(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[LinkedServerClientCreateResponse], error)
- func (client *LinkedServerClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[LinkedServerClientDeleteResponse], error)
- func (client *LinkedServerClient) Get(ctx context.Context, resourceGroupName string, name string, ...) (LinkedServerClientGetResponse, error)
- func (client *LinkedServerClient) NewListPager(resourceGroupName string, name string, options *LinkedServerClientListOptions) *runtime.Pager[LinkedServerClientListResponse]
- type LinkedServerClientBeginCreateOptions
- type LinkedServerClientBeginDeleteOptions
- type LinkedServerClientCreateResponse
- type LinkedServerClientDeleteResponse
- type LinkedServerClientGetOptions
- type LinkedServerClientGetResponse
- type LinkedServerClientListOptions
- type LinkedServerClientListResponse
- type LinkedServerCreateParameters
- type LinkedServerCreateProperties
- type LinkedServerProperties
- type LinkedServerWithProperties
- type LinkedServerWithPropertiesList
- type ListResult
- type ManagedServiceIdentity
- type ManagedServiceIdentityType
- type NotificationListResponse
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationStatus
- type OperationStatusResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PatchSchedule
- type PatchScheduleListResult
- type PatchSchedulesClient
- func (client *PatchSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, ...) (PatchSchedulesClientCreateOrUpdateResponse, error)
- func (client *PatchSchedulesClient) Delete(ctx context.Context, resourceGroupName string, name string, ...) (PatchSchedulesClientDeleteResponse, error)
- func (client *PatchSchedulesClient) Get(ctx context.Context, resourceGroupName string, name string, ...) (PatchSchedulesClientGetResponse, error)
- func (client *PatchSchedulesClient) NewListByRedisResourcePager(resourceGroupName string, cacheName string, ...) *runtime.Pager[PatchSchedulesClientListByRedisResourceResponse]
- type PatchSchedulesClientCreateOrUpdateOptions
- type PatchSchedulesClientCreateOrUpdateResponse
- type PatchSchedulesClientDeleteOptions
- type PatchSchedulesClientDeleteResponse
- type PatchSchedulesClientGetOptions
- type PatchSchedulesClientGetResponse
- type PatchSchedulesClientListByRedisResourceOptions
- type PatchSchedulesClientListByRedisResourceResponse
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResult
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionProvisioningState
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginPut(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientPutResponse], error)
- func (client *PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, cacheName string, ...) (PrivateEndpointConnectionsClientDeleteResponse, error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, cacheName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListResponse]
- type PrivateEndpointConnectionsClientBeginPutOptions
- type PrivateEndpointConnectionsClientDeleteOptions
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListOptions
- type PrivateEndpointConnectionsClientListResponse
- type PrivateEndpointConnectionsClientPutResponse
- type PrivateEndpointServiceConnectionStatus
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkResourcesClient
- type PrivateLinkResourcesClientListByRedisCacheOptions
- type PrivateLinkResourcesClientListByRedisCacheResponse
- type PrivateLinkServiceConnectionState
- type Properties
- type ProvisioningState
- type PublicNetworkAccess
- type RebootParameters
- type RebootType
- type RedisKeyType
- type RegenerateKeyParameters
- type ReplicationRole
- type ResourceInfo
- type SKU
- type SKUFamily
- type SKUName
- type ScheduleEntries
- type ScheduleEntry
- type TLSVersion
- type UpdateChannel
- type UpdateParameters
- type UpdateProperties
- type UpgradeNotification
- type UserAssignedIdentity
- type ZonalAllocationPolicy
Examples ¶
- AccessPolicyAssignmentClient.BeginCreateUpdate
- AccessPolicyAssignmentClient.BeginDelete
- AccessPolicyAssignmentClient.Get
- AccessPolicyAssignmentClient.NewListPager
- AccessPolicyClient.BeginCreateUpdate
- AccessPolicyClient.BeginDelete
- AccessPolicyClient.Get
- AccessPolicyClient.NewListPager
- AsyncOperationStatusClient.Get
- Client.BeginCreate (RedisCacheCreate)
- Client.BeginCreate (RedisCacheCreateAutomaticZonalAllocationPolicy)
- Client.BeginCreate (RedisCacheCreateDefaultVersion)
- Client.BeginCreate (RedisCacheCreateLatestVersion)
- Client.BeginCreate (RedisCacheCreateNoZonesZonalAllocationPolicy)
- Client.BeginCreate (RedisCacheCreateUserDefinedZonalAllocationPolicy)
- Client.BeginDelete
- Client.BeginExportData
- Client.BeginFlushCache
- Client.BeginImportData
- Client.BeginUpdate
- Client.CheckNameAvailability
- Client.ForceReboot
- Client.Get
- Client.ListKeys
- Client.NewListByResourceGroupPager
- Client.NewListBySubscriptionPager
- Client.NewListUpgradeNotificationsPager
- Client.RegenerateKey
- FirewallRulesClient.CreateOrUpdate
- FirewallRulesClient.Delete
- FirewallRulesClient.Get
- FirewallRulesClient.NewListPager
- LinkedServerClient.BeginCreate
- LinkedServerClient.BeginDelete
- LinkedServerClient.Get
- LinkedServerClient.NewListPager
- OperationsClient.NewListPager
- PatchSchedulesClient.CreateOrUpdate
- PatchSchedulesClient.Delete
- PatchSchedulesClient.Get
- PatchSchedulesClient.NewListByRedisResourcePager
- PrivateEndpointConnectionsClient.BeginPut
- PrivateEndpointConnectionsClient.Delete
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.NewListPager
- PrivateLinkResourcesClient.NewListByRedisCachePager
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 AccessPolicyAssignmentClient ¶
type AccessPolicyAssignmentClient struct {
// contains filtered or unexported fields
}
AccessPolicyAssignmentClient contains the methods for the AccessPolicyAssignment group. Don't use this type directly, use NewAccessPolicyAssignmentClient() instead.
func NewAccessPolicyAssignmentClient ¶
func NewAccessPolicyAssignmentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessPolicyAssignmentClient, error)
NewAccessPolicyAssignmentClient creates a new instance of AccessPolicyAssignmentClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AccessPolicyAssignmentClient) BeginCreateUpdate ¶
func (client *AccessPolicyAssignmentClient) BeginCreateUpdate(ctx context.Context, resourceGroupName string, cacheName string, accessPolicyAssignmentName string, parameters CacheAccessPolicyAssignment, options *AccessPolicyAssignmentClientBeginCreateUpdateOptions) (*runtime.Poller[AccessPolicyAssignmentClientCreateUpdateResponse], error)
BeginCreateUpdate - Adds the access policy assignment to the specified users If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - The name of the Redis cache.
- accessPolicyAssignmentName - The name of the access policy assignment.
- parameters - Parameters supplied to the Create Update Access Policy Assignment operation.
- options - AccessPolicyAssignmentClientBeginCreateUpdateOptions contains the optional parameters for the AccessPolicyAssignmentClient.BeginCreateUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentCreateUpdate.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.NewAccessPolicyAssignmentClient().BeginCreateUpdate(ctx, "rg1", "cache1", "accessPolicyAssignmentName1", armredis.CacheAccessPolicyAssignment{ Properties: &armredis.CacheAccessPolicyAssignmentProperties{ AccessPolicyName: to.Ptr("accessPolicy1"), ObjectID: to.Ptr("6497c918-11ad-41e7-1b0f-7c518a87d0b0"), ObjectIDAlias: to.Ptr("TestAADAppRedis"), }, }, 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.CacheAccessPolicyAssignment = armredis.CacheAccessPolicyAssignment{ // Name: to.Ptr("accessPolicyAssignmentName1"), // Type: to.Ptr("Microsoft.Cache/Redis/accessPolicyAssignments"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/cache1/accessPolicyAssignments/accessPolicyAssignmentName1"), // Properties: &armredis.CacheAccessPolicyAssignmentProperties{ // AccessPolicyName: to.Ptr("accessPolicy1"), // ObjectID: to.Ptr("6497c918-11ad-41e7-1b0f-7c518a87d0b0"), // ObjectIDAlias: to.Ptr("TestAADAppRedis"), // ProvisioningState: to.Ptr(armredis.AccessPolicyAssignmentProvisioningStateSucceeded), // }, // }
Output:
func (*AccessPolicyAssignmentClient) BeginDelete ¶
func (client *AccessPolicyAssignmentClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, accessPolicyAssignmentName string, options *AccessPolicyAssignmentClientBeginDeleteOptions) (*runtime.Poller[AccessPolicyAssignmentClientDeleteResponse], error)
BeginDelete - Deletes the access policy assignment from a redis cache If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - The name of the Redis cache.
- accessPolicyAssignmentName - The name of the access policy assignment.
- options - AccessPolicyAssignmentClientBeginDeleteOptions contains the optional parameters for the AccessPolicyAssignmentClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentDelete.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.NewAccessPolicyAssignmentClient().BeginDelete(ctx, "rg1", "cache1", "accessPolicyAssignmentName1", 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 (*AccessPolicyAssignmentClient) Get ¶
func (client *AccessPolicyAssignmentClient) Get(ctx context.Context, resourceGroupName string, cacheName string, accessPolicyAssignmentName string, options *AccessPolicyAssignmentClientGetOptions) (AccessPolicyAssignmentClientGetResponse, error)
Get - Gets the list of assignments for an access policy of a redis cache If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - The name of the Redis cache.
- accessPolicyAssignmentName - The name of the access policy assignment.
- options - AccessPolicyAssignmentClientGetOptions contains the optional parameters for the AccessPolicyAssignmentClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentGet.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.NewAccessPolicyAssignmentClient().Get(ctx, "rg1", "cache1", "accessPolicyAssignmentName1", 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.CacheAccessPolicyAssignment = armredis.CacheAccessPolicyAssignment{ // Name: to.Ptr("accessPolicyAssignmentName1"), // Type: to.Ptr("Microsoft.Cache/Redis/accessPolicyAssignments"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/cache1/accessPolicyAssignments/accessPolicyAssignmentName1"), // Properties: &armredis.CacheAccessPolicyAssignmentProperties{ // AccessPolicyName: to.Ptr("accessPolicy1"), // ObjectID: to.Ptr("6497c918-11ad-41e7-1b0f-7c518a87d0b0"), // ObjectIDAlias: to.Ptr("TestAADAppRedis"), // ProvisioningState: to.Ptr(armredis.AccessPolicyAssignmentProvisioningStateSucceeded), // }, // }
Output:
func (*AccessPolicyAssignmentClient) NewListPager ¶
func (client *AccessPolicyAssignmentClient) NewListPager(resourceGroupName string, cacheName string, options *AccessPolicyAssignmentClientListOptions) *runtime.Pager[AccessPolicyAssignmentClientListResponse]
NewListPager - Gets the list of access policy assignments associated with this redis cache
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - The name of the Redis cache.
- options - AccessPolicyAssignmentClientListOptions contains the optional parameters for the AccessPolicyAssignmentClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentList.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.NewAccessPolicyAssignmentClient().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.CacheAccessPolicyAssignmentList = armredis.CacheAccessPolicyAssignmentList{ // Value: []*armredis.CacheAccessPolicyAssignment{ // { // Name: to.Ptr("accessPolicyAssignmentName1"), // Type: to.Ptr("Microsoft.Cache/Redis/accessPolicyAssignments"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/cache1/accessPolicyAssignments/accessPolicyAssignmentName1"), // Properties: &armredis.CacheAccessPolicyAssignmentProperties{ // AccessPolicyName: to.Ptr("accessPolicy1"), // ObjectID: to.Ptr("6497c918-11ad-41e7-1b0f-7c518a87d0b0"), // ObjectIDAlias: to.Ptr("TestAADAppRedis1"), // ProvisioningState: to.Ptr(armredis.AccessPolicyAssignmentProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("accessPolicyAssignmentName2"), // Type: to.Ptr("Microsoft.Cache/Redis/accessPolicyAssignments"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/cache1/accessPolicyAssignments/accessPolicyAssignmentName2"), // Properties: &armredis.CacheAccessPolicyAssignmentProperties{ // AccessPolicyName: to.Ptr("accessPolicy2"), // ObjectID: to.Ptr("7497c918-11ad-41e7-1b0f-7c518a87d0b0"), // ObjectIDAlias: to.Ptr("TestAADAppRedis2"), // ProvisioningState: to.Ptr(armredis.AccessPolicyAssignmentProvisioningStateSucceeded), // }, // }}, // } }
Output:
type AccessPolicyAssignmentClientBeginCreateUpdateOptions ¶
type AccessPolicyAssignmentClientBeginCreateUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccessPolicyAssignmentClientBeginCreateUpdateOptions contains the optional parameters for the AccessPolicyAssignmentClient.BeginCreateUpdate method.
type AccessPolicyAssignmentClientBeginDeleteOptions ¶
type AccessPolicyAssignmentClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccessPolicyAssignmentClientBeginDeleteOptions contains the optional parameters for the AccessPolicyAssignmentClient.BeginDelete method.
type AccessPolicyAssignmentClientCreateUpdateResponse ¶
type AccessPolicyAssignmentClientCreateUpdateResponse struct { // Response to an operation on access policy assignment CacheAccessPolicyAssignment }
AccessPolicyAssignmentClientCreateUpdateResponse contains the response from method AccessPolicyAssignmentClient.BeginCreateUpdate.
type AccessPolicyAssignmentClientDeleteResponse ¶
type AccessPolicyAssignmentClientDeleteResponse struct { }
AccessPolicyAssignmentClientDeleteResponse contains the response from method AccessPolicyAssignmentClient.BeginDelete.
type AccessPolicyAssignmentClientGetOptions ¶
type AccessPolicyAssignmentClientGetOptions struct { }
AccessPolicyAssignmentClientGetOptions contains the optional parameters for the AccessPolicyAssignmentClient.Get method.
type AccessPolicyAssignmentClientGetResponse ¶
type AccessPolicyAssignmentClientGetResponse struct { // Response to an operation on access policy assignment CacheAccessPolicyAssignment }
AccessPolicyAssignmentClientGetResponse contains the response from method AccessPolicyAssignmentClient.Get.
type AccessPolicyAssignmentClientListOptions ¶
type AccessPolicyAssignmentClientListOptions struct { }
AccessPolicyAssignmentClientListOptions contains the optional parameters for the AccessPolicyAssignmentClient.NewListPager method.
type AccessPolicyAssignmentClientListResponse ¶
type AccessPolicyAssignmentClientListResponse struct { // List of access policies assignments (with properties) of a Redis cache. CacheAccessPolicyAssignmentList }
AccessPolicyAssignmentClientListResponse contains the response from method AccessPolicyAssignmentClient.NewListPager.
type AccessPolicyAssignmentProvisioningState ¶
type AccessPolicyAssignmentProvisioningState string
AccessPolicyAssignmentProvisioningState - Provisioning state of an access policy assignment set
const ( AccessPolicyAssignmentProvisioningStateCanceled AccessPolicyAssignmentProvisioningState = "Canceled" AccessPolicyAssignmentProvisioningStateDeleted AccessPolicyAssignmentProvisioningState = "Deleted" AccessPolicyAssignmentProvisioningStateDeleting AccessPolicyAssignmentProvisioningState = "Deleting" AccessPolicyAssignmentProvisioningStateFailed AccessPolicyAssignmentProvisioningState = "Failed" AccessPolicyAssignmentProvisioningStateSucceeded AccessPolicyAssignmentProvisioningState = "Succeeded" AccessPolicyAssignmentProvisioningStateUpdating AccessPolicyAssignmentProvisioningState = "Updating" )
func PossibleAccessPolicyAssignmentProvisioningStateValues ¶
func PossibleAccessPolicyAssignmentProvisioningStateValues() []AccessPolicyAssignmentProvisioningState
PossibleAccessPolicyAssignmentProvisioningStateValues returns the possible values for the AccessPolicyAssignmentProvisioningState const type.
type AccessPolicyClient ¶
type AccessPolicyClient struct {
// contains filtered or unexported fields
}
AccessPolicyClient contains the methods for the AccessPolicy group. Don't use this type directly, use NewAccessPolicyClient() instead.
func NewAccessPolicyClient ¶
func NewAccessPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessPolicyClient, error)
NewAccessPolicyClient creates a new instance of AccessPolicyClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AccessPolicyClient) BeginCreateUpdate ¶
func (client *AccessPolicyClient) BeginCreateUpdate(ctx context.Context, resourceGroupName string, cacheName string, accessPolicyName string, parameters CacheAccessPolicy, options *AccessPolicyClientBeginCreateUpdateOptions) (*runtime.Poller[AccessPolicyClientCreateUpdateResponse], error)
BeginCreateUpdate - Adds an access policy to the redis cache If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - The name of the Redis cache.
- accessPolicyName - The name of the access policy that is being added to the Redis cache.
- parameters - Parameters supplied to the Create Update Access Policy operation.
- options - AccessPolicyClientBeginCreateUpdateOptions contains the optional parameters for the AccessPolicyClient.BeginCreateUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyCreateUpdate.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.NewAccessPolicyClient().BeginCreateUpdate(ctx, "rg1", "cache1", "accessPolicy1", armredis.CacheAccessPolicy{ Properties: &armredis.CacheAccessPolicyProperties{ Permissions: to.Ptr("+get +hget"), }, }, 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.CacheAccessPolicy = armredis.CacheAccessPolicy{ // Name: to.Ptr("accessPolicy1"), // Type: to.Ptr("Microsoft.Cache/Redis/accessPolicies"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/accessPolicies/accessPolicy1"), // Properties: &armredis.CacheAccessPolicyProperties{ // Type: to.Ptr(armredis.AccessPolicyTypeCustom), // Permissions: to.Ptr("+get +hget"), // ProvisioningState: to.Ptr(armredis.AccessPolicyProvisioningStateSucceeded), // }, // }
Output:
func (*AccessPolicyClient) BeginDelete ¶
func (client *AccessPolicyClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, accessPolicyName string, options *AccessPolicyClientBeginDeleteOptions) (*runtime.Poller[AccessPolicyClientDeleteResponse], error)
BeginDelete - Deletes the access policy from a redis cache If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - The name of the Redis cache.
- accessPolicyName - The name of the access policy that is being added to the Redis cache.
- options - AccessPolicyClientBeginDeleteOptions contains the optional parameters for the AccessPolicyClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyDelete.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.NewAccessPolicyClient().BeginDelete(ctx, "rg1", "cache1", "accessPolicy1", 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 (*AccessPolicyClient) Get ¶
func (client *AccessPolicyClient) Get(ctx context.Context, resourceGroupName string, cacheName string, accessPolicyName string, options *AccessPolicyClientGetOptions) (AccessPolicyClientGetResponse, error)
Get - Gets the detailed information about an access policy of a redis cache If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - The name of the Redis cache.
- accessPolicyName - The name of the access policy that is being added to the Redis cache.
- options - AccessPolicyClientGetOptions contains the optional parameters for the AccessPolicyClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyGet.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.NewAccessPolicyClient().Get(ctx, "rg1", "cache1", "accessPolicy1", 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.CacheAccessPolicy = armredis.CacheAccessPolicy{ // Name: to.Ptr("accessPolicy1"), // Type: to.Ptr("Microsoft.Cache/Redis/accessPolicies"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/accessPolicies/accessPolicy1"), // Properties: &armredis.CacheAccessPolicyProperties{ // Type: to.Ptr(armredis.AccessPolicyTypeCustom), // Permissions: to.Ptr("+get +hget"), // ProvisioningState: to.Ptr(armredis.AccessPolicyProvisioningStateSucceeded), // }, // }
Output:
func (*AccessPolicyClient) NewListPager ¶
func (client *AccessPolicyClient) NewListPager(resourceGroupName string, cacheName string, options *AccessPolicyClientListOptions) *runtime.Pager[AccessPolicyClientListResponse]
NewListPager - Gets the list of access policies associated with this redis cache
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - The name of the Redis cache.
- options - AccessPolicyClientListOptions contains the optional parameters for the AccessPolicyClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyList.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.NewAccessPolicyClient().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.CacheAccessPolicyList = armredis.CacheAccessPolicyList{ // Value: []*armredis.CacheAccessPolicy{ // { // Name: to.Ptr("accessPolicyBuiltIn"), // Type: to.Ptr("Microsoft.Cache/Redis/accessPolicies"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/accessPolicies/accessPolicyBuiltIn"), // Properties: &armredis.CacheAccessPolicyProperties{ // Type: to.Ptr(armredis.AccessPolicyTypeBuiltIn), // Permissions: to.Ptr("+get +hget"), // ProvisioningState: to.Ptr(armredis.AccessPolicyProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("accessPolicy1"), // Type: to.Ptr("Microsoft.Cache/Redis/accessPolicies"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/accessPolicies/accessPolicy1"), // Properties: &armredis.CacheAccessPolicyProperties{ // Type: to.Ptr(armredis.AccessPolicyTypeCustom), // Permissions: to.Ptr("+get +hget"), // ProvisioningState: to.Ptr(armredis.AccessPolicyProvisioningStateSucceeded), // }, // }}, // } }
Output:
type AccessPolicyClientBeginCreateUpdateOptions ¶
type AccessPolicyClientBeginCreateUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccessPolicyClientBeginCreateUpdateOptions contains the optional parameters for the AccessPolicyClient.BeginCreateUpdate method.
type AccessPolicyClientBeginDeleteOptions ¶
type AccessPolicyClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccessPolicyClientBeginDeleteOptions contains the optional parameters for the AccessPolicyClient.BeginDelete method.
type AccessPolicyClientCreateUpdateResponse ¶
type AccessPolicyClientCreateUpdateResponse struct { // Response to get/put access policy. CacheAccessPolicy }
AccessPolicyClientCreateUpdateResponse contains the response from method AccessPolicyClient.BeginCreateUpdate.
type AccessPolicyClientDeleteResponse ¶
type AccessPolicyClientDeleteResponse struct { }
AccessPolicyClientDeleteResponse contains the response from method AccessPolicyClient.BeginDelete.
type AccessPolicyClientGetOptions ¶
type AccessPolicyClientGetOptions struct { }
AccessPolicyClientGetOptions contains the optional parameters for the AccessPolicyClient.Get method.
type AccessPolicyClientGetResponse ¶
type AccessPolicyClientGetResponse struct { // Response to get/put access policy. CacheAccessPolicy }
AccessPolicyClientGetResponse contains the response from method AccessPolicyClient.Get.
type AccessPolicyClientListOptions ¶
type AccessPolicyClientListOptions struct { }
AccessPolicyClientListOptions contains the optional parameters for the AccessPolicyClient.NewListPager method.
type AccessPolicyClientListResponse ¶
type AccessPolicyClientListResponse struct { // List of access policies (with properties) of a Redis cache. CacheAccessPolicyList }
AccessPolicyClientListResponse contains the response from method AccessPolicyClient.NewListPager.
type AccessPolicyProvisioningState ¶
type AccessPolicyProvisioningState string
AccessPolicyProvisioningState - Provisioning state of access policy
const ( AccessPolicyProvisioningStateCanceled AccessPolicyProvisioningState = "Canceled" AccessPolicyProvisioningStateDeleted AccessPolicyProvisioningState = "Deleted" AccessPolicyProvisioningStateDeleting AccessPolicyProvisioningState = "Deleting" AccessPolicyProvisioningStateFailed AccessPolicyProvisioningState = "Failed" AccessPolicyProvisioningStateSucceeded AccessPolicyProvisioningState = "Succeeded" AccessPolicyProvisioningStateUpdating AccessPolicyProvisioningState = "Updating" )
func PossibleAccessPolicyProvisioningStateValues ¶
func PossibleAccessPolicyProvisioningStateValues() []AccessPolicyProvisioningState
PossibleAccessPolicyProvisioningStateValues returns the possible values for the AccessPolicyProvisioningState const type.
type AccessPolicyType ¶
type AccessPolicyType string
AccessPolicyType - Built-In or Custom access policy
const ( AccessPolicyTypeBuiltIn AccessPolicyType = "BuiltIn" AccessPolicyTypeCustom AccessPolicyType = "Custom" )
func PossibleAccessPolicyTypeValues ¶
func PossibleAccessPolicyTypeValues() []AccessPolicyType
PossibleAccessPolicyTypeValues returns the possible values for the AccessPolicyType const type.
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 - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AsyncOperationStatusClient) Get ¶
func (client *AsyncOperationStatusClient) Get(ctx context.Context, location string, operationID string, options *AsyncOperationStatusClientGetOptions) (AsyncOperationStatusClientGetResponse, error)
Get - For checking the ongoing status of an operation If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-11-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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 { // Asynchronous operation status OperationStatus }
AsyncOperationStatusClientGetResponse contains the response from method AsyncOperationStatusClient.Get.
type CacheAccessPolicy ¶
type CacheAccessPolicy struct { // Properties of an access policy. Properties *CacheAccessPolicyProperties // 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 }
CacheAccessPolicy - Response to get/put access policy.
func (CacheAccessPolicy) MarshalJSON ¶
func (c CacheAccessPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheAccessPolicy.
func (*CacheAccessPolicy) UnmarshalJSON ¶
func (c *CacheAccessPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheAccessPolicy.
type CacheAccessPolicyAssignment ¶
type CacheAccessPolicyAssignment struct { // Properties of an access policy assignment Properties *CacheAccessPolicyAssignmentProperties // 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 }
CacheAccessPolicyAssignment - Response to an operation on access policy assignment
func (CacheAccessPolicyAssignment) MarshalJSON ¶
func (c CacheAccessPolicyAssignment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheAccessPolicyAssignment.
func (*CacheAccessPolicyAssignment) UnmarshalJSON ¶
func (c *CacheAccessPolicyAssignment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheAccessPolicyAssignment.
type CacheAccessPolicyAssignmentList ¶
type CacheAccessPolicyAssignmentList struct { // List of access policies assignments (with properties) of a Redis cache. Value []*CacheAccessPolicyAssignment // READ-ONLY; Link for next set. NextLink *string }
CacheAccessPolicyAssignmentList - List of access policies assignments (with properties) of a Redis cache.
func (CacheAccessPolicyAssignmentList) MarshalJSON ¶
func (c CacheAccessPolicyAssignmentList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheAccessPolicyAssignmentList.
func (*CacheAccessPolicyAssignmentList) UnmarshalJSON ¶
func (c *CacheAccessPolicyAssignmentList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheAccessPolicyAssignmentList.
type CacheAccessPolicyAssignmentProperties ¶
type CacheAccessPolicyAssignmentProperties struct { // REQUIRED; The name of the access policy that is being assigned AccessPolicyName *string // REQUIRED; Object Id to assign access policy to ObjectID *string // REQUIRED; User friendly name for object id. Also represents username for token based authentication ObjectIDAlias *string // READ-ONLY; Provisioning state of an access policy assignment set ProvisioningState *AccessPolicyAssignmentProvisioningState }
CacheAccessPolicyAssignmentProperties - Properties for an access policy assignment
func (CacheAccessPolicyAssignmentProperties) MarshalJSON ¶
func (c CacheAccessPolicyAssignmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheAccessPolicyAssignmentProperties.
func (*CacheAccessPolicyAssignmentProperties) UnmarshalJSON ¶
func (c *CacheAccessPolicyAssignmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheAccessPolicyAssignmentProperties.
type CacheAccessPolicyList ¶
type CacheAccessPolicyList struct { // List of access policies (with properties) of a Redis cache. Value []*CacheAccessPolicy // READ-ONLY; Link for next set. NextLink *string }
CacheAccessPolicyList - List of access policies (with properties) of a Redis cache.
func (CacheAccessPolicyList) MarshalJSON ¶
func (c CacheAccessPolicyList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheAccessPolicyList.
func (*CacheAccessPolicyList) UnmarshalJSON ¶
func (c *CacheAccessPolicyList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheAccessPolicyList.
type CacheAccessPolicyProperties ¶
type CacheAccessPolicyProperties struct { // REQUIRED; Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites Permissions *string // READ-ONLY; Provisioning state of access policy ProvisioningState *AccessPolicyProvisioningState // READ-ONLY; Built-In or Custom access policy Type *AccessPolicyType }
CacheAccessPolicyProperties - All properties of an access policy.
func (CacheAccessPolicyProperties) MarshalJSON ¶
func (c CacheAccessPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheAccessPolicyProperties.
func (*CacheAccessPolicyProperties) UnmarshalJSON ¶
func (c *CacheAccessPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheAccessPolicyProperties.
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 - The ID of the target subscription.
- 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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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("East 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), // UpdateChannel: to.Ptr(armredis.UpdateChannelStable), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyUserDefined), // 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 (RedisCacheCreateAutomaticZonalAllocationPolicy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCreateAutomaticZonalAllocationPolicy.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("East 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), ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyAutomatic), 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"), }, }, 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("East US"), // Tags: map[string]*string{ // }, // Properties: &armredis.Properties{ // EnableNonSSLPort: to.Ptr(true), // 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"), // ReplicasPerMaster: to.Ptr[int32](2), // ReplicasPerPrimary: to.Ptr[int32](2), // ShardCount: to.Ptr[int32](2), // UpdateChannel: to.Ptr(armredis.UpdateChannelStable), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyAutomatic), // 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), // }, // { // IsMaster: to.Ptr(false), // IsPrimary: to.Ptr(false), // NonSSLPort: to.Ptr[int32](13001), // ShardID: to.Ptr[int32](0), // SSLPort: to.Ptr[int32](15001), // }, // { // IsMaster: to.Ptr(false), // IsPrimary: to.Ptr(false), // NonSSLPort: to.Ptr[int32](13002), // ShardID: to.Ptr[int32](0), // SSLPort: to.Ptr[int32](15002), // }, // { // IsMaster: to.Ptr(true), // IsPrimary: to.Ptr(true), // NonSSLPort: to.Ptr[int32](13003), // ShardID: to.Ptr[int32](1), // SSLPort: to.Ptr[int32](15003), // }, // { // IsMaster: to.Ptr(false), // IsPrimary: to.Ptr(false), // NonSSLPort: to.Ptr[int32](13004), // ShardID: to.Ptr[int32](1), // SSLPort: to.Ptr[int32](15004), // }, // { // IsMaster: to.Ptr(false), // IsPrimary: to.Ptr(false), // NonSSLPort: to.Ptr[int32](13005), // ShardID: to.Ptr[int32](1), // SSLPort: to.Ptr[int32](15005), // }}, // Port: to.Ptr[int32](6379), // ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded), // SSLPort: to.Ptr[int32](6380), // }, // }
Output:
Example (RedisCacheCreateDefaultVersion) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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("East 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), // UpdateChannel: to.Ptr(armredis.UpdateChannelStable), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyUserDefined), // 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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("East 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), // UpdateChannel: to.Ptr(armredis.UpdateChannelStable), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyUserDefined), // 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 (RedisCacheCreateNoZonesZonalAllocationPolicy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCreateNoZonesZonalAllocationPolicy.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("East 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), ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyNoZones), 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"), }, }, 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("East US"), // Tags: map[string]*string{ // }, // Properties: &armredis.Properties{ // EnableNonSSLPort: to.Ptr(true), // 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"), // ReplicasPerMaster: to.Ptr[int32](2), // ReplicasPerPrimary: to.Ptr[int32](2), // ShardCount: to.Ptr[int32](2), // UpdateChannel: to.Ptr(armredis.UpdateChannelStable), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyNoZones), // 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), // }, // { // IsMaster: to.Ptr(false), // IsPrimary: to.Ptr(false), // NonSSLPort: to.Ptr[int32](13001), // ShardID: to.Ptr[int32](0), // SSLPort: to.Ptr[int32](15001), // }, // { // IsMaster: to.Ptr(false), // IsPrimary: to.Ptr(false), // NonSSLPort: to.Ptr[int32](13002), // ShardID: to.Ptr[int32](0), // SSLPort: to.Ptr[int32](15002), // }, // { // IsMaster: to.Ptr(true), // IsPrimary: to.Ptr(true), // NonSSLPort: to.Ptr[int32](13003), // ShardID: to.Ptr[int32](1), // SSLPort: to.Ptr[int32](15003), // }, // { // IsMaster: to.Ptr(false), // IsPrimary: to.Ptr(false), // NonSSLPort: to.Ptr[int32](13004), // ShardID: to.Ptr[int32](1), // SSLPort: to.Ptr[int32](15004), // }, // { // IsMaster: to.Ptr(false), // IsPrimary: to.Ptr(false), // NonSSLPort: to.Ptr[int32](13005), // ShardID: to.Ptr[int32](1), // SSLPort: to.Ptr[int32](15005), // }}, // Port: to.Ptr[int32](6379), // ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded), // SSLPort: to.Ptr[int32](6380), // }, // }
Output:
Example (RedisCacheCreateUserDefinedZonalAllocationPolicy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCreateUserDefinedZonalAllocationPolicy.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("East 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), ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyUserDefined), 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("East 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), // UpdateChannel: to.Ptr(armredis.UpdateChannelStable), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyUserDefined), // 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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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) BeginFlushCache ¶
func (client *Client) BeginFlushCache(ctx context.Context, resourceGroupName string, cacheName string, options *ClientBeginFlushCacheOptions) (*runtime.Poller[ClientFlushCacheResponse], error)
BeginFlushCache - Deletes all of the keys in a cache. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - The name of the Redis cache.
- options - ClientBeginFlushCacheOptions contains the optional parameters for the Client.BeginFlushCache method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFlush.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().BeginFlushCache(ctx, "resource-group-name", "cache-name", 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.OperationStatusResult = armredis.OperationStatusResult{ // Status: to.Ptr("Succeeded"), // }
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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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("East 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), // UpdateChannel: to.Ptr(armredis.UpdateChannelStable), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyAutomatic), // 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 ¶
func (client *Client) CheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityParameters, options *ClientCheckNameAvailabilityOptions) (ClientCheckNameAvailabilityResponse, error)
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 2024-11-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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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("East 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), // UpdateChannel: to.Ptr(armredis.UpdateChannelStable), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyAutomatic), // 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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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("East US"), // Tags: map[string]*string{ // }, // Properties: &armredis.Properties{ // EnableNonSSLPort: to.Ptr(true), // RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ // }, // RedisVersion: to.Ptr("3.2"), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyAutomatic), // 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 2024-11-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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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("East 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), // UpdateChannel: to.Ptr(armredis.UpdateChannelStable), // ZonalAllocationPolicy: to.Ptr(armredis.ZonalAllocationPolicyAutomatic), // 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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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.520Z"); 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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 ClientBeginFlushCacheOptions ¶
type ClientBeginFlushCacheOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClientBeginFlushCacheOptions contains the optional parameters for the Client.BeginFlushCache 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 { // A single Redis item in List or Get Operation. 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 ¶
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 ¶
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 - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAccessPolicyAssignmentClient ¶
func (c *ClientFactory) NewAccessPolicyAssignmentClient() *AccessPolicyAssignmentClient
NewAccessPolicyAssignmentClient creates a new instance of AccessPolicyAssignmentClient.
func (*ClientFactory) NewAccessPolicyClient ¶
func (c *ClientFactory) NewAccessPolicyClient() *AccessPolicyClient
NewAccessPolicyClient creates a new instance of AccessPolicyClient.
func (*ClientFactory) NewAsyncOperationStatusClient ¶
func (c *ClientFactory) NewAsyncOperationStatusClient() *AsyncOperationStatusClient
NewAsyncOperationStatusClient creates a new instance of AsyncOperationStatusClient.
func (*ClientFactory) NewClient ¶
func (c *ClientFactory) NewClient() *Client
NewClient creates a new instance of Client.
func (*ClientFactory) NewFirewallRulesClient ¶
func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient
NewFirewallRulesClient creates a new instance of FirewallRulesClient.
func (*ClientFactory) NewLinkedServerClient ¶
func (c *ClientFactory) NewLinkedServerClient() *LinkedServerClient
NewLinkedServerClient creates a new instance of LinkedServerClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPatchSchedulesClient ¶
func (c *ClientFactory) NewPatchSchedulesClient() *PatchSchedulesClient
NewPatchSchedulesClient creates a new instance of PatchSchedulesClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
type ClientFlushCacheResponse ¶
type ClientFlushCacheResponse struct { // The current status of an async operation. OperationStatusResult }
ClientFlushCacheResponse contains the response from method Client.BeginFlushCache.
type ClientForceRebootOptions ¶
type ClientForceRebootOptions struct { }
ClientForceRebootOptions contains the optional parameters for the Client.ForceReboot method.
type ClientForceRebootResponse ¶
type ClientForceRebootResponse struct { // Response to force reboot for Redis cache. 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 { // A single Redis item in List or Get Operation. 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 { // The response of list Redis operation. 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 { // The response of list Redis operation. 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 { // Redis cache access keys. 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 { // The response of listUpgradeNotifications. 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 { // Redis cache access keys. AccessKeys }
ClientRegenerateKeyResponse contains the response from method Client.RegenerateKey.
type ClientUpdateResponse ¶
type ClientUpdateResponse struct { // A single Redis item in List or Get Operation. ResourceInfo }
ClientUpdateResponse contains the response from method Client.BeginUpdate.
type CommonPropertiesRedisConfiguration ¶
type CommonPropertiesRedisConfiguration struct { // Specifies whether AAD based authentication has been enabled or disabled for the cache AADEnabled *string // 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 // The keyspace events which should be monitored. NotifyKeyspaceEvents *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, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 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 // Authentication to Redis through access keys is disabled when set as true. Default value is false. DisableAccessKeyAuthentication *bool // 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, aof-backup-enabled, // aof-storage-connection-string-0, aof-storage-connection-string-1 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 // Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' // update channel get latest Redis updates at least 4 weeks ahead of 'Stable' // channel caches. Default value is 'Stable'. UpdateChannel *UpdateChannel // Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure // will automatically select zones based on regional availability and capacity. // 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal // cache. If 'zonalAllocationPolicy' is not passed, it will be set to // 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and // 'NoZones' in regions where zones are not supported. ZonalAllocationPolicy *ZonalAllocationPolicy }
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 ( DayOfWeekEveryday DayOfWeek = "Everyday" DayOfWeekFriday DayOfWeek = "Friday" DayOfWeekMonday DayOfWeek = "Monday" DayOfWeekSaturday DayOfWeek = "Saturday" DayOfWeekSunday DayOfWeek = "Sunday" DayOfWeekThursday DayOfWeek = "Thursday" DayOfWeekTuesday DayOfWeek = "Tuesday" DayOfWeekWednesday DayOfWeek = "Wednesday" 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 ErrorDetail ¶
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
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 - The ID of the target subscription.
- 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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 { // A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect 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 { // A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect 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 { // The response of list firewall rules Redis operation. 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 - The ID of the target subscription.
- 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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 { // Response to put/get linked server (with properties) for Redis cache. 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 { // Response to put/get linked server (with properties) for Redis cache. 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 { // List of linked servers (with properties) of a Redis cache. 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 ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
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 *ErrorDetail // 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 *ErrorDetail // 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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available REST API operations of the Microsoft.Cache provider.
Generated from API version 2024-11-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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 { // 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. 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 - The ID of the target subscription.
- 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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 { // Response to put/get patch schedules for Redis cache. 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 { // Response to put/get patch schedules for Redis cache. 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 { // The response of list patch schedules Redis operation. 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 - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateEndpointConnectionsClient) BeginPut ¶
func (client *PrivateEndpointConnectionsClient) BeginPut(ctx context.Context, resourceGroupName string, cacheName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginPutOptions) (*runtime.Poller[PrivateEndpointConnectionsClientPutResponse], error)
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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 ¶
func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, cacheName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse]
NewListPager - List all the private endpoint connections associated with the redis cache.
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 { // The Private Endpoint Connection resource. 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 { // List of private endpoint connection associated with the specified storage account PrivateEndpointConnectionListResult }
PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.
type PrivateEndpointConnectionsClientPutResponse ¶
type PrivateEndpointConnectionsClientPutResponse struct { // The Private Endpoint Connection resource. 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 - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateLinkResourcesClient) NewListByRedisCachePager ¶
func (client *PrivateLinkResourcesClient) NewListByRedisCachePager(resourceGroupName string, cacheName string, options *PrivateLinkResourcesClientListByRedisCacheOptions) *runtime.Pager[PrivateLinkResourcesClientListByRedisCacheResponse]
NewListByRedisCachePager - Gets the private link resources that need to be created for a redis cache.
Generated from API version 2024-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/45374f48f560b3337ed55735038f1e9bf8cbea65/specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-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 { // A list of private link resources 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 // Authentication to Redis through access keys is disabled when set as true. Default value is false. DisableAccessKeyAuthentication *bool // 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, aof-backup-enabled, // aof-storage-connection-string-0, aof-storage-connection-string-1 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 // Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' // update channel get latest Redis updates at least 4 weeks ahead of 'Stable' // channel caches. Default value is 'Stable'. UpdateChannel *UpdateChannel // Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure // will automatically select zones based on regional availability and capacity. // 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal // cache. If 'zonalAllocationPolicy' is not passed, it will be set to // 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and // 'NoZones' in regions where zones are not supported. ZonalAllocationPolicy *ZonalAllocationPolicy // 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 ( ProvisioningStateConfiguringAAD ProvisioningState = "ConfiguringAAD" 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 ¶
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶
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).
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)
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 UpdateChannel ¶
type UpdateChannel string
UpdateChannel - Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'.
const ( UpdateChannelPreview UpdateChannel = "Preview" UpdateChannelStable UpdateChannel = "Stable" )
func PossibleUpdateChannelValues ¶
func PossibleUpdateChannelValues() []UpdateChannel
PossibleUpdateChannelValues returns the possible values for the UpdateChannel 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 { // Authentication to Redis through access keys is disabled when set as true. Default value is false. DisableAccessKeyAuthentication *bool // 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, aof-backup-enabled, // aof-storage-connection-string-0, aof-storage-connection-string-1 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 // Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' // update channel get latest Redis updates at least 4 weeks ahead of 'Stable' // channel caches. Default value is 'Stable'. UpdateChannel *UpdateChannel // Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure // will automatically select zones based on regional availability and capacity. // 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal // cache. If 'zonalAllocationPolicy' is not passed, it will be set to // 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and // 'NoZones' in regions where zones are not supported. ZonalAllocationPolicy *ZonalAllocationPolicy }
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.
type ZonalAllocationPolicy ¶ added in v3.3.0
type ZonalAllocationPolicy string
ZonalAllocationPolicy - Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported.
const ( ZonalAllocationPolicyAutomatic ZonalAllocationPolicy = "Automatic" ZonalAllocationPolicyNoZones ZonalAllocationPolicy = "NoZones" ZonalAllocationPolicyUserDefined ZonalAllocationPolicy = "UserDefined" )
func PossibleZonalAllocationPolicyValues ¶ added in v3.3.0
func PossibleZonalAllocationPolicyValues() []ZonalAllocationPolicy
PossibleZonalAllocationPolicyValues returns the possible values for the ZonalAllocationPolicy const type.
Source Files
¶
- accesspolicy_client.go
- accesspolicyassignment_client.go
- asyncoperationstatus_client.go
- build.go
- client.go
- client_factory.go
- constants.go
- firewallrules_client.go
- linkedserver_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- patchschedules_client.go
- privateendpointconnections_client.go
- privatelinkresources_client.go
- responses.go
- time_rfc3339.go