diff --git a/sdk/resourcemanager/redis/armredis/CHANGELOG.md b/sdk/resourcemanager/redis/armredis/CHANGELOG.md index 9aef6a1d435f..d60cad318606 100644 --- a/sdk/resourcemanager/redis/armredis/CHANGELOG.md +++ b/sdk/resourcemanager/redis/armredis/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 2.3.1 (2023-08-23) +### Other Changes + + ## 2.3.0 (2023-06-23) ### Features Added diff --git a/sdk/resourcemanager/redis/armredis/asyncoperationstatus_client.go b/sdk/resourcemanager/redis/armredis/asyncoperationstatus_client.go index 8442771e63b0..dcd109fbc966 100644 --- a/sdk/resourcemanager/redis/armredis/asyncoperationstatus_client.go +++ b/sdk/resourcemanager/redis/armredis/asyncoperationstatus_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis @@ -54,18 +53,21 @@ func NewAsyncOperationStatusClient(subscriptionID string, credential azcore.Toke // - options - AsyncOperationStatusClientGetOptions contains the optional parameters for the AsyncOperationStatusClient.Get // method. func (client *AsyncOperationStatusClient) Get(ctx context.Context, location string, operationID string, options *AsyncOperationStatusClientGetOptions) (AsyncOperationStatusClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, location, operationID, options) if err != nil { return AsyncOperationStatusClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AsyncOperationStatusClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AsyncOperationStatusClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AsyncOperationStatusClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/sdk/resourcemanager/redis/armredis/asyncoperationstatus_client_example_test.go b/sdk/resourcemanager/redis/armredis/asyncoperationstatus_client_example_test.go deleted file mode 100644 index 0f91f23e3a8b..000000000000 --- a/sdk/resourcemanager/redis/armredis/asyncoperationstatus_client_example_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armredis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheAsyncOperationStatus.json -func ExampleAsyncOperationStatusClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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"), - // } -} diff --git a/sdk/resourcemanager/redis/armredis/autorest.md b/sdk/resourcemanager/redis/armredis/autorest.md index 8ff83810890d..c62f1da073e3 100644 --- a/sdk/resourcemanager/redis/armredis/autorest.md +++ b/sdk/resourcemanager/redis/armredis/autorest.md @@ -5,9 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/redis/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/redis/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.3.0 -tag: package-2023-04 +module-version: 2.3.1 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/redis/armredis/client.go b/sdk/resourcemanager/redis/armredis/client.go index 0c6b380dea3c..8817e9a78b0c 100644 --- a/sdk/resourcemanager/redis/armredis/client.go +++ b/sdk/resourcemanager/redis/armredis/client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis @@ -53,16 +52,18 @@ func NewClient(subscriptionID string, credential azcore.TokenCredential, options // - 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. func (client *Client) CheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityParameters, options *ClientCheckNameAvailabilityOptions) (ClientCheckNameAvailabilityResponse, error) { + var err error req, err := client.checkNameAvailabilityCreateRequest(ctx, parameters, options) if err != nil { return ClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientCheckNameAvailabilityResponse{}, err } return ClientCheckNameAvailabilityResponse{}, nil } @@ -82,7 +83,10 @@ func (client *Client) checkNameAvailabilityCreateRequest(ctx context.Context, pa reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginCreate - Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. @@ -99,7 +103,8 @@ func (client *Client) BeginCreate(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - return runtime.NewPoller[ClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientCreateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -110,18 +115,20 @@ func (client *Client) BeginCreate(ctx context.Context, resourceGroupName string, // // Generated from API version 2023-04-01 func (client *Client) create(ctx context.Context, resourceGroupName string, name string, parameters CreateParameters, options *ClientBeginCreateOptions) (*http.Response, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -147,7 +154,10 @@ func (client *Client) createCreateRequest(ctx context.Context, resourceGroupName reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a Redis cache. @@ -163,7 +173,8 @@ func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - return runtime.NewPoller[ClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -174,18 +185,20 @@ func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, // // Generated from API version 2023-04-01 func (client *Client) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -228,7 +241,8 @@ func (client *Client) BeginExportData(ctx context.Context, resourceGroupName str if err != nil { return nil, err } - return runtime.NewPoller[ClientExportDataResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientExportDataResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientExportDataResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -239,18 +253,20 @@ func (client *Client) BeginExportData(ctx context.Context, resourceGroupName str // // Generated from API version 2023-04-01 func (client *Client) exportData(ctx context.Context, resourceGroupName string, name string, parameters ExportRDBParameters, options *ClientBeginExportDataOptions) (*http.Response, error) { + var err error req, err := client.exportDataCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // exportDataCreateRequest creates the ExportData request. @@ -276,7 +292,10 @@ func (client *Client) exportDataCreateRequest(ctx context.Context, resourceGroup reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // ForceReboot - Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can @@ -289,18 +308,21 @@ func (client *Client) exportDataCreateRequest(ctx context.Context, resourceGroup // - parameters - Specifies which Redis node(s) to reboot. // - options - ClientForceRebootOptions contains the optional parameters for the Client.ForceReboot method. func (client *Client) ForceReboot(ctx context.Context, resourceGroupName string, name string, parameters RebootParameters, options *ClientForceRebootOptions) (ClientForceRebootResponse, error) { + var err error req, err := client.forceRebootCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return ClientForceRebootResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientForceRebootResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientForceRebootResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientForceRebootResponse{}, err } - return client.forceRebootHandleResponse(resp) + resp, err := client.forceRebootHandleResponse(httpResp) + return resp, err } // forceRebootCreateRequest creates the ForceReboot request. @@ -326,7 +348,10 @@ func (client *Client) forceRebootCreateRequest(ctx context.Context, resourceGrou reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // forceRebootHandleResponse handles the ForceReboot response. @@ -346,18 +371,21 @@ func (client *Client) forceRebootHandleResponse(resp *http.Response) (ClientForc // - name - The name of the Redis cache. // - options - ClientGetOptions contains the optional parameters for the Client.Get method. func (client *Client) Get(ctx context.Context, resourceGroupName string, name string, options *ClientGetOptions) (ClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return ClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -409,7 +437,8 @@ func (client *Client) BeginImportData(ctx context.Context, resourceGroupName str if err != nil { return nil, err } - return runtime.NewPoller[ClientImportDataResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientImportDataResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientImportDataResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -420,18 +449,20 @@ func (client *Client) BeginImportData(ctx context.Context, resourceGroupName str // // Generated from API version 2023-04-01 func (client *Client) importData(ctx context.Context, resourceGroupName string, name string, parameters ImportRDBParameters, options *ClientBeginImportDataOptions) (*http.Response, error) { + var err error req, err := client.importDataCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // importDataCreateRequest creates the ImportData request. @@ -457,7 +488,10 @@ func (client *Client) importDataCreateRequest(ctx context.Context, resourceGroup reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // NewListByResourceGroupPager - Lists all Redis caches in a resource group. @@ -592,18 +626,21 @@ func (client *Client) listBySubscriptionHandleResponse(resp *http.Response) (Cli // - name - The name of the Redis cache. // - options - ClientListKeysOptions contains the optional parameters for the Client.ListKeys method. func (client *Client) ListKeys(ctx context.Context, resourceGroupName string, name string, options *ClientListKeysOptions) (ClientListKeysResponse, error) { + var err error req, err := client.listKeysCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return ClientListKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientListKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientListKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientListKeysResponse{}, err } - return client.listKeysHandleResponse(resp) + resp, err := client.listKeysHandleResponse(httpResp) + return resp, err } // listKeysCreateRequest creates the ListKeys request. @@ -722,18 +759,21 @@ func (client *Client) listUpgradeNotificationsHandleResponse(resp *http.Response // - parameters - Specifies which key to regenerate. // - options - ClientRegenerateKeyOptions contains the optional parameters for the Client.RegenerateKey method. func (client *Client) RegenerateKey(ctx context.Context, resourceGroupName string, name string, parameters RegenerateKeyParameters, options *ClientRegenerateKeyOptions) (ClientRegenerateKeyResponse, error) { + var err error req, err := client.regenerateKeyCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return ClientRegenerateKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientRegenerateKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientRegenerateKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientRegenerateKeyResponse{}, err } - return client.regenerateKeyHandleResponse(resp) + resp, err := client.regenerateKeyHandleResponse(httpResp) + return resp, err } // regenerateKeyCreateRequest creates the RegenerateKey request. @@ -759,7 +799,10 @@ func (client *Client) regenerateKeyCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // regenerateKeyHandleResponse handles the RegenerateKey response. @@ -785,7 +828,8 @@ func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - return runtime.NewPoller[ClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -796,18 +840,20 @@ func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, // // Generated from API version 2023-04-01 func (client *Client) update(ctx context.Context, resourceGroupName string, name string, parameters UpdateParameters, options *ClientBeginUpdateOptions) (*http.Response, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -833,5 +879,8 @@ func (client *Client) updateCreateRequest(ctx context.Context, resourceGroupName reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/redis/armredis/client_example_test.go b/sdk/resourcemanager/redis/armredis/client_example_test.go deleted file mode 100644 index eeeaee00e3da..000000000000 --- a/sdk/resourcemanager/redis/armredis/client_example_test.go +++ /dev/null @@ -1,897 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armredis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheCheckNameAvailability.json -func ExampleClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListUpgradeNotifications.json -func ExampleClient_NewListUpgradeNotificationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewClient().NewListUpgradeNotificationsPager("rg1", "cache1", 5000, nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.NotificationListResponse = armredis.NotificationListResponse{ - // Value: []*armredis.UpgradeNotification{ - // { - // Name: to.Ptr("notification1"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-16T23:20:50.52Z"); return t}()), - // UpsellNotification: map[string]*string{ - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheCreate.json -func ExampleClient_BeginCreate_redisCacheCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewClient().BeginCreate(ctx, "rg1", "cache1", armredis.CreateParameters{ - Location: to.Ptr("West US"), - Properties: &armredis.CreateProperties{ - EnableNonSSLPort: to.Ptr(true), - MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2), - RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - MaxmemoryPolicy: to.Ptr("allkeys-lru"), - }, - RedisVersion: to.Ptr("4"), - ReplicasPerPrimary: to.Ptr[int32](2), - ShardCount: to.Ptr[int32](2), - SKU: &armredis.SKU{ - Name: to.Ptr(armredis.SKUNamePremium), - Capacity: to.Ptr[int32](1), - Family: to.Ptr(armredis.SKUFamilyP), - }, - StaticIP: to.Ptr("192.168.0.5"), - SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ResourceInfo = armredis.ResourceInfo{ - // Name: to.Ptr("cache1"), - // Type: to.Ptr("Microsoft.Cache/Redis"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armredis.Properties{ - // EnableNonSSLPort: to.Ptr(false), - // MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2), - // RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - // Maxclients: to.Ptr("1000"), - // MaxmemoryDelta: to.Ptr("50"), - // MaxmemoryReserved: to.Ptr("50"), - // }, - // RedisVersion: to.Ptr("4.0.14"), - // ReplicasPerMaster: to.Ptr[int32](2), - // ReplicasPerPrimary: to.Ptr[int32](2), - // SKU: &armredis.SKU{ - // Name: to.Ptr(armredis.SKUNamePremium), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr(armredis.SKUFamilyP), - // }, - // AccessKeys: &armredis.AccessKeys{ - // PrimaryKey: to.Ptr(""), - // SecondaryKey: to.Ptr(""), - // }, - // 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")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheCreateDefaultVersion.json -func ExampleClient_BeginCreate_redisCacheCreateDefaultVersion() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewClient().BeginCreate(ctx, "rg1", "cache1", armredis.CreateParameters{ - Location: to.Ptr("West US"), - Properties: &armredis.CreateProperties{ - EnableNonSSLPort: to.Ptr(true), - MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2), - RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - MaxmemoryPolicy: to.Ptr("allkeys-lru"), - }, - ReplicasPerPrimary: to.Ptr[int32](2), - ShardCount: to.Ptr[int32](2), - SKU: &armredis.SKU{ - Name: to.Ptr(armredis.SKUNamePremium), - Capacity: to.Ptr[int32](1), - Family: to.Ptr(armredis.SKUFamilyP), - }, - StaticIP: to.Ptr("192.168.0.5"), - SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ResourceInfo = armredis.ResourceInfo{ - // Name: to.Ptr("cache1"), - // Type: to.Ptr("Microsoft.Cache/Redis"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armredis.Properties{ - // EnableNonSSLPort: to.Ptr(false), - // MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2), - // RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - // Maxclients: to.Ptr("1000"), - // MaxmemoryDelta: to.Ptr("50"), - // MaxmemoryReserved: to.Ptr("50"), - // }, - // RedisVersion: to.Ptr("6.0.14"), - // ReplicasPerMaster: to.Ptr[int32](2), - // ReplicasPerPrimary: to.Ptr[int32](2), - // SKU: &armredis.SKU{ - // Name: to.Ptr(armredis.SKUNamePremium), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr(armredis.SKUFamilyP), - // }, - // AccessKeys: &armredis.AccessKeys{ - // PrimaryKey: to.Ptr(""), - // SecondaryKey: to.Ptr(""), - // }, - // 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")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheCreateLatestVersion.json -func ExampleClient_BeginCreate_redisCacheCreateLatestVersion() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewClient().BeginCreate(ctx, "rg1", "cache1", armredis.CreateParameters{ - Location: to.Ptr("West US"), - Properties: &armredis.CreateProperties{ - EnableNonSSLPort: to.Ptr(true), - MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2), - RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - MaxmemoryPolicy: to.Ptr("allkeys-lru"), - }, - RedisVersion: to.Ptr("Latest"), - ReplicasPerPrimary: to.Ptr[int32](2), - ShardCount: to.Ptr[int32](2), - SKU: &armredis.SKU{ - Name: to.Ptr(armredis.SKUNamePremium), - Capacity: to.Ptr[int32](1), - Family: to.Ptr(armredis.SKUFamilyP), - }, - StaticIP: to.Ptr("192.168.0.5"), - SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ResourceInfo = armredis.ResourceInfo{ - // Name: to.Ptr("cache1"), - // Type: to.Ptr("Microsoft.Cache/Redis"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armredis.Properties{ - // EnableNonSSLPort: to.Ptr(false), - // MinimumTLSVersion: to.Ptr(armredis.TLSVersionOne2), - // RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - // Maxclients: to.Ptr("1000"), - // MaxmemoryDelta: to.Ptr("50"), - // MaxmemoryReserved: to.Ptr("50"), - // }, - // RedisVersion: to.Ptr("6.0.14"), - // ReplicasPerMaster: to.Ptr[int32](2), - // ReplicasPerPrimary: to.Ptr[int32](2), - // SKU: &armredis.SKU{ - // Name: to.Ptr(armredis.SKUNamePremium), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr(armredis.SKUFamilyP), - // }, - // AccessKeys: &armredis.AccessKeys{ - // PrimaryKey: to.Ptr(""), - // SecondaryKey: to.Ptr(""), - // }, - // 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")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheUpdate.json -func ExampleClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewClient().BeginUpdate(ctx, "rg1", "cache1", armredis.UpdateParameters{ - Properties: &armredis.UpdateProperties{ - EnableNonSSLPort: to.Ptr(true), - ReplicasPerPrimary: to.Ptr[int32](2), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ResourceInfo = armredis.ResourceInfo{ - // Name: to.Ptr("cache1"), - // Type: to.Ptr("Microsoft.Cache/Redis"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armredis.Properties{ - // EnableNonSSLPort: to.Ptr(true), - // RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - // Maxclients: to.Ptr("1000"), - // MaxmemoryDelta: to.Ptr("50"), - // MaxmemoryReserved: to.Ptr("50"), - // }, - // RedisVersion: to.Ptr("3.0"), - // ReplicasPerMaster: to.Ptr[int32](2), - // ReplicasPerPrimary: to.Ptr[int32](2), - // SKU: &armredis.SKU{ - // Name: to.Ptr(armredis.SKUNamePremium), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr(armredis.SKUFamilyP), - // }, - // AccessKeys: &armredis.AccessKeys{ - // PrimaryKey: to.Ptr(""), - // SecondaryKey: to.Ptr(""), - // }, - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheDelete.json -func ExampleClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheGet.json -func ExampleClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().Get(ctx, "rg1", "cache1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ResourceInfo = armredis.ResourceInfo{ - // Name: to.Ptr("cache1"), - // Type: to.Ptr("Microsoft.Cache/Redis"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armredis.Properties{ - // EnableNonSSLPort: to.Ptr(true), - // PublicNetworkAccess: to.Ptr(armredis.PublicNetworkAccessEnabled), - // RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - // }, - // RedisVersion: to.Ptr("3.2"), - // ReplicasPerMaster: to.Ptr[int32](2), - // ReplicasPerPrimary: to.Ptr[int32](2), - // SKU: &armredis.SKU{ - // Name: to.Ptr(armredis.SKUNamePremium), - // Capacity: to.Ptr[int32](3), - // Family: to.Ptr(armredis.SKUFamilyP), - // }, - // HostName: to.Ptr("cache1.redis.cache.windows.net"), - // Instances: []*armredis.InstanceDetails{ - // { - // IsMaster: to.Ptr(true), - // IsPrimary: to.Ptr(true), - // NonSSLPort: to.Ptr[int32](13000), - // SSLPort: to.Ptr[int32](15000), - // }, - // { - // IsMaster: to.Ptr(false), - // IsPrimary: to.Ptr(false), - // NonSSLPort: to.Ptr[int32](13001), - // SSLPort: to.Ptr[int32](15001), - // }, - // { - // IsMaster: to.Ptr(false), - // IsPrimary: to.Ptr(false), - // NonSSLPort: to.Ptr[int32](13002), - // SSLPort: to.Ptr[int32](15002), - // }}, - // LinkedServers: []*armredis.LinkedServer{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2"), - // }}, - // Port: to.Ptr[int32](6379), - // PrivateEndpointConnections: []*armredis.PrivateEndpointConnection{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/privateEndpointConnections/cachePec"), - // Properties: &armredis.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armredis.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/cachePe"), - // }, - // PrivateLinkServiceConnectionState: &armredis.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Please approve my connection"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr(armredis.PrivateEndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded), - // SSLPort: to.Ptr[int32](6380), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListByResourceGroup.json -func ExampleClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewClient().NewListByResourceGroupPager("rg1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListResult = armredis.ListResult{ - // Value: []*armredis.ResourceInfo{ - // { - // Name: to.Ptr("cache1"), - // Type: to.Ptr("Microsoft.Cache/Redis"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armredis.Properties{ - // EnableNonSSLPort: to.Ptr(true), - // RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - // }, - // RedisVersion: to.Ptr("3.2"), - // SKU: &armredis.SKU{ - // Name: to.Ptr(armredis.SKUNameStandard), - // Capacity: to.Ptr[int32](6), - // Family: to.Ptr(armredis.SKUFamilyC), - // }, - // HostName: to.Ptr("cache1.redis.cache.windows.net"), - // Port: to.Ptr[int32](6379), - // ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded), - // SSLPort: to.Ptr[int32](6380), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheList.json -func ExampleClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListResult = armredis.ListResult{ - // Value: []*armredis.ResourceInfo{ - // { - // Name: to.Ptr("cache1"), - // Type: to.Ptr("Microsoft.Cache/Redis"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1"), - // Location: to.Ptr("West US"), - // Tags: map[string]*string{ - // }, - // Properties: &armredis.Properties{ - // EnableNonSSLPort: to.Ptr(true), - // RedisConfiguration: &armredis.CommonPropertiesRedisConfiguration{ - // }, - // RedisVersion: to.Ptr("3.2"), - // ReplicasPerMaster: to.Ptr[int32](2), - // ReplicasPerPrimary: to.Ptr[int32](2), - // SKU: &armredis.SKU{ - // Name: to.Ptr(armredis.SKUNameStandard), - // Capacity: to.Ptr[int32](6), - // Family: to.Ptr(armredis.SKUFamilyC), - // }, - // HostName: to.Ptr("cache1.redis.cache.windows.net"), - // Instances: []*armredis.InstanceDetails{ - // { - // IsMaster: to.Ptr(true), - // IsPrimary: to.Ptr(true), - // NonSSLPort: to.Ptr[int32](13000), - // SSLPort: to.Ptr[int32](15000), - // }, - // { - // IsMaster: to.Ptr(false), - // IsPrimary: to.Ptr(false), - // NonSSLPort: to.Ptr[int32](13001), - // SSLPort: to.Ptr[int32](15001), - // }, - // { - // IsMaster: to.Ptr(false), - // IsPrimary: to.Ptr(false), - // NonSSLPort: to.Ptr[int32](13002), - // SSLPort: to.Ptr[int32](15002), - // }}, - // Port: to.Ptr[int32](6379), - // ProvisioningState: to.Ptr(armredis.ProvisioningStateSucceeded), - // SSLPort: to.Ptr[int32](6380), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListKeys.json -func ExampleClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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(""), - // SecondaryKey: to.Ptr(""), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheRegenerateKey.json -func ExampleClient_RegenerateKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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(""), - // SecondaryKey: to.Ptr(""), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheForceReboot.json -func ExampleClient_ForceReboot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheImport.json -func ExampleClient_BeginImportData() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheExport.json -func ExampleClient_BeginExportData() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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) - } -} diff --git a/sdk/resourcemanager/redis/armredis/client_factory.go b/sdk/resourcemanager/redis/armredis/client_factory.go index b76960054417..12c31032b98c 100644 --- a/sdk/resourcemanager/redis/armredis/client_factory.go +++ b/sdk/resourcemanager/redis/armredis/client_factory.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis @@ -39,8 +38,8 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewAsyncOperationStatusClient() *AsyncOperationStatusClient { + subClient, _ := NewAsyncOperationStatusClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -54,13 +53,18 @@ func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient { return subClient } -func (c *ClientFactory) NewPatchSchedulesClient() *PatchSchedulesClient { - subClient, _ := NewPatchSchedulesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewLinkedServerClient() *LinkedServerClient { + subClient, _ := NewLinkedServerClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLinkedServerClient() *LinkedServerClient { - subClient, _ := NewLinkedServerClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewPatchSchedulesClient() *PatchSchedulesClient { + subClient, _ := NewPatchSchedulesClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -73,8 +77,3 @@ func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesCli subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } - -func (c *ClientFactory) NewAsyncOperationStatusClient() *AsyncOperationStatusClient { - subClient, _ := NewAsyncOperationStatusClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/sdk/resourcemanager/redis/armredis/constants.go b/sdk/resourcemanager/redis/armredis/constants.go index d81e3fed2ad3..d3a55ec0fc0b 100644 --- a/sdk/resourcemanager/redis/armredis/constants.go +++ b/sdk/resourcemanager/redis/armredis/constants.go @@ -3,43 +3,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis const ( moduleName = "armredis" - moduleVersion = "v2.3.0" + moduleVersion = "v2.3.1" ) // DayOfWeek - Day of the week when a cache can be patched. type DayOfWeek string const ( - DayOfWeekMonday DayOfWeek = "Monday" - DayOfWeekTuesday DayOfWeek = "Tuesday" - DayOfWeekWednesday DayOfWeek = "Wednesday" - DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekEveryday DayOfWeek = "Everyday" DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" DayOfWeekSaturday DayOfWeek = "Saturday" DayOfWeekSunday DayOfWeek = "Sunday" - DayOfWeekEveryday DayOfWeek = "Everyday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" DayOfWeekWeekend DayOfWeek = "Weekend" ) // PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. func PossibleDayOfWeekValues() []DayOfWeek { return []DayOfWeek{ - DayOfWeekMonday, - DayOfWeekTuesday, - DayOfWeekWednesday, - DayOfWeekThursday, + DayOfWeekEveryday, DayOfWeekFriday, + DayOfWeekMonday, DayOfWeekSaturday, DayOfWeekSunday, - DayOfWeekEveryday, + DayOfWeekThursday, + DayOfWeekTuesday, + DayOfWeekWednesday, DayOfWeekWeekend, } } @@ -151,9 +150,10 @@ func PossibleProvisioningStateValues() []ProvisioningState { } } -// PublicNetworkAccess - Whether or not public endpoint access is allowed for this cache. Value is optional but if passed +// 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' +// Default value is 'Enabled'. Note: This setting is important for caches with private endpoints. It has no effect on caches +// that are joined to, or injected into, a virtual network subnet. type PublicNetworkAccess string const ( diff --git a/sdk/resourcemanager/redis/armredis/firewallrules_client.go b/sdk/resourcemanager/redis/armredis/firewallrules_client.go index 153c1d432fb5..516f782b8814 100644 --- a/sdk/resourcemanager/redis/armredis/firewallrules_client.go +++ b/sdk/resourcemanager/redis/armredis/firewallrules_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis @@ -56,18 +55,21 @@ func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCreden // - options - FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate // method. func (client *FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, ruleName string, parameters FirewallRule, options *FirewallRulesClientCreateOrUpdateOptions) (FirewallRulesClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, cacheName, ruleName, parameters, options) if err != nil { return FirewallRulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallRulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return FirewallRulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return FirewallRulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +99,10 @@ func (client *FirewallRulesClient) createOrUpdateCreateRequest(ctx context.Conte reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +123,18 @@ func (client *FirewallRulesClient) createOrUpdateHandleResponse(resp *http.Respo // - ruleName - The name of the firewall rule. // - options - FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method. func (client *FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, cacheName string, ruleName string, options *FirewallRulesClientDeleteOptions) (FirewallRulesClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, cacheName, ruleName, options) if err != nil { return FirewallRulesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallRulesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return FirewallRulesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return FirewallRulesClientDeleteResponse{}, err } return FirewallRulesClientDeleteResponse{}, nil } @@ -171,18 +178,21 @@ func (client *FirewallRulesClient) deleteCreateRequest(ctx context.Context, reso // - ruleName - The name of the firewall rule. // - options - FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method. func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ruleName string, options *FirewallRulesClientGetOptions) (FirewallRulesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, cacheName, ruleName, options) if err != nil { return FirewallRulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallRulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallRulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallRulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/sdk/resourcemanager/redis/armredis/firewallrules_client_example_test.go b/sdk/resourcemanager/redis/armredis/firewallrules_client_example_test.go deleted file mode 100644 index 54e82b06528f..000000000000 --- a/sdk/resourcemanager/redis/armredis/firewallrules_client_example_test.go +++ /dev/null @@ -1,145 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armredis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheFirewallRulesList.json -func ExampleFirewallRulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheFirewallRuleCreate.json -func ExampleFirewallRulesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheFirewallRuleGet.json -func ExampleFirewallRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheFirewallRuleDelete.json -func ExampleFirewallRulesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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) - } -} diff --git a/sdk/resourcemanager/redis/armredis/go.mod b/sdk/resourcemanager/redis/armredis/go.mod index 24513afec877..d8d7be18d07f 100644 --- a/sdk/resourcemanager/redis/armredis/go.mod +++ b/sdk/resourcemanager/redis/armredis/go.mod @@ -3,15 +3,15 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2 go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.7.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnaeon/go-vcr v1.1.0 // indirect @@ -21,9 +21,9 @@ require ( github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/crypto v0.6.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/redis/armredis/go.sum b/sdk/resourcemanager/redis/armredis/go.sum index 6e2c77825a2c..93fdfc2850cd 100644 --- a/sdk/resourcemanager/redis/armredis/go.sum +++ b/sdk/resourcemanager/redis/armredis/go.sum @@ -1,9 +1,9 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 h1:SEy2xmstIphdPwNBUi7uhvjyjhVKISfwjfOJmuy7kg4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= @@ -31,13 +31,13 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/sdk/resourcemanager/redis/armredis/linkedserver_client.go b/sdk/resourcemanager/redis/armredis/linkedserver_client.go index 239ace4cc4e3..24fe6db96984 100644 --- a/sdk/resourcemanager/redis/armredis/linkedserver_client.go +++ b/sdk/resourcemanager/redis/armredis/linkedserver_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis @@ -61,7 +60,8 @@ func (client *LinkedServerClient) BeginCreate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[LinkedServerClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[LinkedServerClientCreateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[LinkedServerClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -72,18 +72,20 @@ func (client *LinkedServerClient) BeginCreate(ctx context.Context, resourceGroup // // Generated from API version 2023-04-01 func (client *LinkedServerClient) create(ctx context.Context, resourceGroupName string, name string, linkedServerName string, parameters LinkedServerCreateParameters, options *LinkedServerClientBeginCreateOptions) (*http.Response, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, name, linkedServerName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -113,7 +115,10 @@ func (client *LinkedServerClient) createCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the linked server from a redis cache (requires Premium SKU). @@ -131,7 +136,8 @@ func (client *LinkedServerClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[LinkedServerClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[LinkedServerClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[LinkedServerClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -142,18 +148,20 @@ func (client *LinkedServerClient) BeginDelete(ctx context.Context, resourceGroup // // Generated from API version 2023-04-01 func (client *LinkedServerClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, linkedServerName string, options *LinkedServerClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, linkedServerName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -195,18 +203,21 @@ func (client *LinkedServerClient) deleteCreateRequest(ctx context.Context, resou // - linkedServerName - The name of the linked server. // - options - LinkedServerClientGetOptions contains the optional parameters for the LinkedServerClient.Get method. func (client *LinkedServerClient) Get(ctx context.Context, resourceGroupName string, name string, linkedServerName string, options *LinkedServerClientGetOptions) (LinkedServerClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, name, linkedServerName, options) if err != nil { return LinkedServerClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LinkedServerClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LinkedServerClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LinkedServerClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/sdk/resourcemanager/redis/armredis/linkedserver_client_example_test.go b/sdk/resourcemanager/redis/armredis/linkedserver_client_example_test.go deleted file mode 100644 index 35918814984f..000000000000 --- a/sdk/resourcemanager/redis/armredis/linkedserver_client_example_test.go +++ /dev/null @@ -1,170 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armredis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheLinkedServer_Create.json -func ExampleLinkedServerClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheLinkedServer_Delete.json -func ExampleLinkedServerClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheLinkedServer_Get.json -func ExampleLinkedServerClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheLinkedServer_List.json -func ExampleLinkedServerClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/redis/armredis/models.go b/sdk/resourcemanager/redis/armredis/models.go index 12a2f02b8391..50604aecef0e 100644 --- a/sdk/resourcemanager/redis/armredis/models.go +++ b/sdk/resourcemanager/redis/armredis/models.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis @@ -20,11 +19,6 @@ type AccessKeys struct { SecondaryKey *string } -// AsyncOperationStatusClientGetOptions contains the optional parameters for the AsyncOperationStatusClient.Get method. -type AsyncOperationStatusClientGetOptions struct { - // placeholder for future optional parameters -} - // CheckNameAvailabilityParameters - Parameters body to pass for resource name availability check. type CheckNameAvailabilityParameters struct { // REQUIRED; Resource name. @@ -34,77 +28,6 @@ type CheckNameAvailabilityParameters struct { Type *string } -// ClientBeginCreateOptions contains the optional parameters for the Client.BeginCreate method. -type ClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. -type ClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginExportDataOptions contains the optional parameters for the Client.BeginExportData method. -type ClientBeginExportDataOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginImportDataOptions contains the optional parameters for the Client.BeginImportData method. -type ClientBeginImportDataOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. -type ClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method. -type ClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ClientForceRebootOptions contains the optional parameters for the Client.ForceReboot method. -type ClientForceRebootOptions struct { - // placeholder for future optional parameters -} - -// ClientGetOptions contains the optional parameters for the Client.Get method. -type ClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. -type ClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method. -type ClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ClientListKeysOptions contains the optional parameters for the Client.ListKeys method. -type ClientListKeysOptions struct { - // placeholder for future optional parameters -} - -// ClientListUpgradeNotificationsOptions contains the optional parameters for the Client.NewListUpgradeNotificationsPager -// method. -type ClientListUpgradeNotificationsOptions struct { - // placeholder for future optional parameters -} - -// ClientRegenerateKeyOptions contains the optional parameters for the Client.RegenerateKey method. -type ClientRegenerateKeyOptions struct { - // placeholder for future optional parameters -} - // CommonPropertiesRedisConfiguration - All Redis Settings. Few possible keys: // rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value // etc. @@ -195,9 +118,10 @@ type CreateProperties struct { // 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' + // 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' + // Default value is 'Enabled'. Note: This setting is important for caches with private endpoints. It has no effect on caches + // that are joined to, or injected into, a virtual network subnet. PublicNetworkAccess *PublicNetworkAccess // All Redis Settings. Few possible keys: @@ -311,26 +235,6 @@ type FirewallRuleProperties struct { StartIP *string } -// FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method. -type FirewallRulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method. -type FirewallRulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method. -type FirewallRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// FirewallRulesClientListOptions contains the optional parameters for the FirewallRulesClient.NewListPager method. -type FirewallRulesClientListOptions struct { - // placeholder for future optional parameters -} - // ForceRebootResponse - Response to force reboot for Redis cache. type ForceRebootResponse struct { // READ-ONLY; Status message @@ -380,28 +284,6 @@ type LinkedServer struct { ID *string } -// LinkedServerClientBeginCreateOptions contains the optional parameters for the LinkedServerClient.BeginCreate method. -type LinkedServerClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LinkedServerClientBeginDeleteOptions contains the optional parameters for the LinkedServerClient.BeginDelete method. -type LinkedServerClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LinkedServerClientGetOptions contains the optional parameters for the LinkedServerClient.Get method. -type LinkedServerClientGetOptions struct { - // placeholder for future optional parameters -} - -// LinkedServerClientListOptions contains the optional parameters for the LinkedServerClient.NewListPager method. -type LinkedServerClientListOptions struct { - // placeholder for future optional parameters -} - // LinkedServerCreateParameters - Parameter required for creating a linked server to redis cache. type LinkedServerCreateParameters struct { // REQUIRED; Properties required to create a linked server. @@ -604,11 +486,6 @@ type OperationStatusResult struct { StartTime *time.Time } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PatchSchedule - Response to put/get patch schedules for Redis cache. type PatchSchedule struct { // REQUIRED; List of patch schedules for a Redis cache. @@ -636,28 +513,6 @@ type PatchScheduleListResult struct { NextLink *string } -// PatchSchedulesClientCreateOrUpdateOptions contains the optional parameters for the PatchSchedulesClient.CreateOrUpdate -// method. -type PatchSchedulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// PatchSchedulesClientDeleteOptions contains the optional parameters for the PatchSchedulesClient.Delete method. -type PatchSchedulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PatchSchedulesClientGetOptions contains the optional parameters for the PatchSchedulesClient.Get method. -type PatchSchedulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PatchSchedulesClientListByRedisResourceOptions contains the optional parameters for the PatchSchedulesClient.NewListByRedisResourcePager -// method. -type PatchSchedulesClientListByRedisResourceOptions struct { - // placeholder for future optional parameters -} - // PrivateEndpoint - The Private Endpoint resource. type PrivateEndpoint struct { // READ-ONLY; The ARM identifier for Private Endpoint @@ -697,31 +552,6 @@ type PrivateEndpointConnectionProperties struct { ProvisioningState *PrivateEndpointConnectionProvisioningState } -// PrivateEndpointConnectionsClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginPut -// method. -type PrivateEndpointConnectionsClientBeginPutOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete -// method. -type PrivateEndpointConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkResource - A private link resource type PrivateLinkResource struct { // Resource properties. @@ -755,12 +585,6 @@ type PrivateLinkResourceProperties struct { RequiredMembers []*string } -// PrivateLinkResourcesClientListByRedisCacheOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByRedisCachePager -// method. -type PrivateLinkResourcesClientListByRedisCacheOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer // and provider. type PrivateLinkServiceConnectionState struct { @@ -785,9 +609,10 @@ type Properties struct { // 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' + // 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' + // Default value is 'Enabled'. Note: This setting is important for caches with private endpoints. It has no effect on caches + // that are joined to, or injected into, a virtual network subnet. PublicNetworkAccess *PublicNetworkAccess // All Redis Settings. Few possible keys: @@ -941,9 +766,10 @@ type UpdateProperties struct { // 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' + // 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' + // Default value is 'Enabled'. Note: This setting is important for caches with private endpoints. It has no effect on caches + // that are joined to, or injected into, a virtual network subnet. PublicNetworkAccess *PublicNetworkAccess // All Redis Settings. Few possible keys: diff --git a/sdk/resourcemanager/redis/armredis/models_serde.go b/sdk/resourcemanager/redis/armredis/models_serde.go index 8bf1ad0b2d4b..9d9895b58192 100644 --- a/sdk/resourcemanager/redis/armredis/models_serde.go +++ b/sdk/resourcemanager/redis/armredis/models_serde.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis diff --git a/sdk/resourcemanager/redis/armredis/operations_client.go b/sdk/resourcemanager/redis/armredis/operations_client.go index 71a190a4aa25..21c14ef92903 100644 --- a/sdk/resourcemanager/redis/armredis/operations_client.go +++ b/sdk/resourcemanager/redis/armredis/operations_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis diff --git a/sdk/resourcemanager/redis/armredis/operations_client_example_test.go b/sdk/resourcemanager/redis/armredis/operations_client_example_test.go deleted file mode 100644 index 6daab184fbd2..000000000000 --- a/sdk/resourcemanager/redis/armredis/operations_client_example_test.go +++ /dev/null @@ -1,668 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armredis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheOperations.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/redis/armredis/options.go b/sdk/resourcemanager/redis/armredis/options.go new file mode 100644 index 000000000000..f24c4859d9e5 --- /dev/null +++ b/sdk/resourcemanager/redis/armredis/options.go @@ -0,0 +1,185 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armredis + +// AsyncOperationStatusClientGetOptions contains the optional parameters for the AsyncOperationStatusClient.Get method. +type AsyncOperationStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientBeginCreateOptions contains the optional parameters for the Client.BeginCreate method. +type ClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. +type ClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginExportDataOptions contains the optional parameters for the Client.BeginExportData method. +type ClientBeginExportDataOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginImportDataOptions contains the optional parameters for the Client.BeginImportData method. +type ClientBeginImportDataOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. +type ClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method. +type ClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ClientForceRebootOptions contains the optional parameters for the Client.ForceReboot method. +type ClientForceRebootOptions struct { + // placeholder for future optional parameters +} + +// ClientGetOptions contains the optional parameters for the Client.Get method. +type ClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. +type ClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method. +type ClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ClientListKeysOptions contains the optional parameters for the Client.ListKeys method. +type ClientListKeysOptions struct { + // placeholder for future optional parameters +} + +// ClientListUpgradeNotificationsOptions contains the optional parameters for the Client.NewListUpgradeNotificationsPager +// method. +type ClientListUpgradeNotificationsOptions struct { + // placeholder for future optional parameters +} + +// ClientRegenerateKeyOptions contains the optional parameters for the Client.RegenerateKey method. +type ClientRegenerateKeyOptions struct { + // placeholder for future optional parameters +} + +// FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method. +type FirewallRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method. +type FirewallRulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method. +type FirewallRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallRulesClientListOptions contains the optional parameters for the FirewallRulesClient.NewListPager method. +type FirewallRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// LinkedServerClientBeginCreateOptions contains the optional parameters for the LinkedServerClient.BeginCreate method. +type LinkedServerClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LinkedServerClientBeginDeleteOptions contains the optional parameters for the LinkedServerClient.BeginDelete method. +type LinkedServerClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LinkedServerClientGetOptions contains the optional parameters for the LinkedServerClient.Get method. +type LinkedServerClientGetOptions struct { + // placeholder for future optional parameters +} + +// LinkedServerClientListOptions contains the optional parameters for the LinkedServerClient.NewListPager method. +type LinkedServerClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PatchSchedulesClientCreateOrUpdateOptions contains the optional parameters for the PatchSchedulesClient.CreateOrUpdate +// method. +type PatchSchedulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// PatchSchedulesClientDeleteOptions contains the optional parameters for the PatchSchedulesClient.Delete method. +type PatchSchedulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PatchSchedulesClientGetOptions contains the optional parameters for the PatchSchedulesClient.Get method. +type PatchSchedulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PatchSchedulesClientListByRedisResourceOptions contains the optional parameters for the PatchSchedulesClient.NewListByRedisResourcePager +// method. +type PatchSchedulesClientListByRedisResourceOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginPut +// method. +type PrivateEndpointConnectionsClientBeginPutOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete +// method. +type PrivateEndpointConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListByRedisCacheOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByRedisCachePager +// method. +type PrivateLinkResourcesClientListByRedisCacheOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/redis/armredis/patchschedules_client.go b/sdk/resourcemanager/redis/armredis/patchschedules_client.go index 8778d15470ee..da6b474d3e23 100644 --- a/sdk/resourcemanager/redis/armredis/patchschedules_client.go +++ b/sdk/resourcemanager/redis/armredis/patchschedules_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis @@ -56,18 +55,21 @@ func NewPatchSchedulesClient(subscriptionID string, credential azcore.TokenCrede // - options - PatchSchedulesClientCreateOrUpdateOptions contains the optional parameters for the PatchSchedulesClient.CreateOrUpdate // method. func (client *PatchSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, defaultParam DefaultName, parameters PatchSchedule, options *PatchSchedulesClientCreateOrUpdateOptions) (PatchSchedulesClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, defaultParam, parameters, options) if err != nil { return PatchSchedulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PatchSchedulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return PatchSchedulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return PatchSchedulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +99,10 @@ func (client *PatchSchedulesClient) createOrUpdateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +123,18 @@ func (client *PatchSchedulesClient) createOrUpdateHandleResponse(resp *http.Resp // - defaultParam - Default string modeled as parameter for auto generation to work correctly. // - options - PatchSchedulesClientDeleteOptions contains the optional parameters for the PatchSchedulesClient.Delete method. func (client *PatchSchedulesClient) Delete(ctx context.Context, resourceGroupName string, name string, defaultParam DefaultName, options *PatchSchedulesClientDeleteOptions) (PatchSchedulesClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, defaultParam, options) if err != nil { return PatchSchedulesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PatchSchedulesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PatchSchedulesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PatchSchedulesClientDeleteResponse{}, err } return PatchSchedulesClientDeleteResponse{}, nil } @@ -171,18 +178,21 @@ func (client *PatchSchedulesClient) deleteCreateRequest(ctx context.Context, res // - defaultParam - Default string modeled as parameter for auto generation to work correctly. // - options - PatchSchedulesClientGetOptions contains the optional parameters for the PatchSchedulesClient.Get method. func (client *PatchSchedulesClient) Get(ctx context.Context, resourceGroupName string, name string, defaultParam DefaultName, options *PatchSchedulesClientGetOptions) (PatchSchedulesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, name, defaultParam, options) if err != nil { return PatchSchedulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PatchSchedulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PatchSchedulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PatchSchedulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/sdk/resourcemanager/redis/armredis/patchschedules_client_example_test.go b/sdk/resourcemanager/redis/armredis/patchschedules_client_example_test.go deleted file mode 100644 index aa407f144c03..000000000000 --- a/sdk/resourcemanager/redis/armredis/patchschedules_client_example_test.go +++ /dev/null @@ -1,171 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armredis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePatchSchedulesList.json -func ExamplePatchSchedulesClient_NewListByRedisResourcePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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), - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json -func ExamplePatchSchedulesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePatchSchedulesDelete.json -func ExamplePatchSchedulesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePatchSchedulesGet.json -func ExamplePatchSchedulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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), - // }}, - // }, - // } -} diff --git a/sdk/resourcemanager/redis/armredis/privateendpointconnections_client.go b/sdk/resourcemanager/redis/armredis/privateendpointconnections_client.go index 59d5b96ed632..a119c528f220 100644 --- a/sdk/resourcemanager/redis/armredis/privateendpointconnections_client.go +++ b/sdk/resourcemanager/redis/armredis/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis @@ -55,16 +54,18 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // - options - PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete // method. func (client *PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, cacheName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteOptions) (PrivateEndpointConnectionsClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, cacheName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PrivateEndpointConnectionsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientDeleteResponse{}, err } return PrivateEndpointConnectionsClientDeleteResponse{}, nil } @@ -109,18 +110,21 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, cacheName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -242,7 +246,8 @@ func (client *PrivateEndpointConnectionsClient) BeginPut(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientPutResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[PrivateEndpointConnectionsClientPutResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientPutResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -253,18 +258,20 @@ func (client *PrivateEndpointConnectionsClient) BeginPut(ctx context.Context, re // // Generated from API version 2023-04-01 func (client *PrivateEndpointConnectionsClient) put(ctx context.Context, resourceGroupName string, cacheName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginPutOptions) (*http.Response, error) { + var err error req, err := client.putCreateRequest(ctx, resourceGroupName, cacheName, privateEndpointConnectionName, properties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // putCreateRequest creates the Put request. @@ -294,5 +301,8 @@ func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Con reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/redis/armredis/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/redis/armredis/privateendpointconnections_client_example_test.go deleted file mode 100644 index 1b3bab1647c3..000000000000 --- a/sdk/resourcemanager/redis/armredis/privateendpointconnections_client_example_test.go +++ /dev/null @@ -1,179 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armredis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListPrivateEndpointConnections.json -func ExamplePrivateEndpointConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheGetPrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCachePutPrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_BeginPut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheDeletePrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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) - } -} diff --git a/sdk/resourcemanager/redis/armredis/privatelinkresources_client.go b/sdk/resourcemanager/redis/armredis/privatelinkresources_client.go index 196fdb6ace13..d6d6d6ce1e18 100644 --- a/sdk/resourcemanager/redis/armredis/privatelinkresources_client.go +++ b/sdk/resourcemanager/redis/armredis/privatelinkresources_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis diff --git a/sdk/resourcemanager/redis/armredis/privatelinkresources_client_example_test.go b/sdk/resourcemanager/redis/armredis/privatelinkresources_client_example_test.go deleted file mode 100644 index eab1c51d4279..000000000000 --- a/sdk/resourcemanager/redis/armredis/privatelinkresources_client_example_test.go +++ /dev/null @@ -1,58 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armredis_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/examples/RedisCacheListPrivateLinkResources.json -func ExamplePrivateLinkResourcesClient_NewListByRedisCachePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armredis.NewClientFactory("", 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")}, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/redis/armredis/response_types.go b/sdk/resourcemanager/redis/armredis/response_types.go index 44ada908327f..90022f8e7de0 100644 --- a/sdk/resourcemanager/redis/armredis/response_types.go +++ b/sdk/resourcemanager/redis/armredis/response_types.go @@ -3,14 +3,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis // AsyncOperationStatusClientGetResponse contains the response from method AsyncOperationStatusClient.Get. type AsyncOperationStatusClientGetResponse struct { + // Asynchronous operation status OperationStatus } @@ -21,6 +21,7 @@ type ClientCheckNameAvailabilityResponse struct { // ClientCreateResponse contains the response from method Client.BeginCreate. type ClientCreateResponse struct { + // A single Redis item in List or Get Operation. ResourceInfo } @@ -36,11 +37,13 @@ type ClientExportDataResponse struct { // ClientForceRebootResponse contains the response from method Client.ForceReboot. type ClientForceRebootResponse struct { + // Response to force reboot for Redis cache. ForceRebootResponse } // ClientGetResponse contains the response from method Client.Get. type ClientGetResponse struct { + // A single Redis item in List or Get Operation. ResourceInfo } @@ -51,36 +54,43 @@ type ClientImportDataResponse struct { // ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager. type ClientListByResourceGroupResponse struct { + // The response of list Redis operation. ListResult } // ClientListBySubscriptionResponse contains the response from method Client.NewListBySubscriptionPager. type ClientListBySubscriptionResponse struct { + // The response of list Redis operation. ListResult } // ClientListKeysResponse contains the response from method Client.ListKeys. type ClientListKeysResponse struct { + // Redis cache access keys. AccessKeys } // ClientListUpgradeNotificationsResponse contains the response from method Client.NewListUpgradeNotificationsPager. type ClientListUpgradeNotificationsResponse struct { + // The response of listUpgradeNotifications. NotificationListResponse } // ClientRegenerateKeyResponse contains the response from method Client.RegenerateKey. type ClientRegenerateKeyResponse struct { + // Redis cache access keys. AccessKeys } // ClientUpdateResponse contains the response from method Client.BeginUpdate. type ClientUpdateResponse struct { + // A single Redis item in List or Get Operation. ResourceInfo } // FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.CreateOrUpdate. 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 } @@ -91,16 +101,19 @@ type FirewallRulesClientDeleteResponse struct { // FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get. 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 } // FirewallRulesClientListResponse contains the response from method FirewallRulesClient.NewListPager. type FirewallRulesClientListResponse struct { + // The response of list firewall rules Redis operation. FirewallRuleListResult } // LinkedServerClientCreateResponse contains the response from method LinkedServerClient.BeginCreate. type LinkedServerClientCreateResponse struct { + // Response to put/get linked server (with properties) for Redis cache. LinkedServerWithProperties } @@ -111,21 +124,26 @@ type LinkedServerClientDeleteResponse struct { // LinkedServerClientGetResponse contains the response from method LinkedServerClient.Get. type LinkedServerClientGetResponse struct { + // Response to put/get linked server (with properties) for Redis cache. LinkedServerWithProperties } // LinkedServerClientListResponse contains the response from method LinkedServerClient.NewListPager. type LinkedServerClientListResponse struct { + // List of linked servers (with properties) of a Redis cache. LinkedServerWithPropertiesList } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. 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 } // PatchSchedulesClientCreateOrUpdateResponse contains the response from method PatchSchedulesClient.CreateOrUpdate. type PatchSchedulesClientCreateOrUpdateResponse struct { + // Response to put/get patch schedules for Redis cache. PatchSchedule } @@ -136,11 +154,13 @@ type PatchSchedulesClientDeleteResponse struct { // PatchSchedulesClientGetResponse contains the response from method PatchSchedulesClient.Get. type PatchSchedulesClientGetResponse struct { + // Response to put/get patch schedules for Redis cache. PatchSchedule } // PatchSchedulesClientListByRedisResourceResponse contains the response from method PatchSchedulesClient.NewListByRedisResourcePager. type PatchSchedulesClientListByRedisResourceResponse struct { + // The response of list patch schedules Redis operation. PatchScheduleListResult } @@ -151,20 +171,24 @@ type PrivateEndpointConnectionsClientDeleteResponse struct { // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // The Private Endpoint Connection resource. PrivateEndpointConnection } // PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. type PrivateEndpointConnectionsClientListResponse struct { + // List of private endpoint connection associated with the specified storage account PrivateEndpointConnectionListResult } // PrivateEndpointConnectionsClientPutResponse contains the response from method PrivateEndpointConnectionsClient.BeginPut. type PrivateEndpointConnectionsClientPutResponse struct { + // The Private Endpoint Connection resource. PrivateEndpointConnection } // PrivateLinkResourcesClientListByRedisCacheResponse contains the response from method PrivateLinkResourcesClient.NewListByRedisCachePager. type PrivateLinkResourcesClientListByRedisCacheResponse struct { + // A list of private link resources PrivateLinkResourceListResult } diff --git a/sdk/resourcemanager/redis/armredis/time_rfc3339.go b/sdk/resourcemanager/redis/armredis/time_rfc3339.go index 0da7b891813e..b970e424792d 100644 --- a/sdk/resourcemanager/redis/armredis/time_rfc3339.go +++ b/sdk/resourcemanager/redis/armredis/time_rfc3339.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armredis