From 2a21d0141f428a8b15c1c16ad956d5557a855fbe Mon Sep 17 00:00:00 2001 From: Alancere <804873052@qq.com> Date: Mon, 12 Jun 2023 13:44:24 +0800 Subject: [PATCH 1/2] [Release] sdk/resourcemanager/storagecache/armstoragecache/4.0.0 generation from spec commit: 1b33e81bbdc28fcd6644a1315b8d7b1b6d030590 --- .../storagecache/armstoragecache/CHANGELOG.md | 55 ++ .../armstoragecache/amlfilesystems_client.go | 531 ++++++++++ .../amlfilesystems_client_example_test.go | 733 ++++++++++++++ .../armstoragecache/ascoperations_client.go | 11 +- .../ascoperations_client_example_test.go | 4 +- .../armstoragecache/ascusages_client.go | 7 +- .../ascusages_client_example_test.go | 4 +- .../storagecache/armstoragecache/autorest.md | 8 +- .../armstoragecache/caches_client.go | 193 ++-- .../caches_client_example_test.go | 130 +-- .../armstoragecache/client_factory.go | 13 +- .../storagecache/armstoragecache/constants.go | 142 ++- .../storagecache/armstoragecache/go.mod | 18 +- .../storagecache/armstoragecache/go.sum | 36 +- .../armstoragecache/management_client.go | 138 +++ .../management_client_example_test.go | 66 ++ .../storagecache/armstoragecache/models.go | 896 ++++++++++++----- .../armstoragecache/models_serde.go | 922 ++++++++++++++++++ .../armstoragecache/operations_client.go | 4 +- .../operations_client_example_test.go | 4 +- .../armstoragecache/response_types.go | 50 + .../armstoragecache/skus_client.go | 7 +- .../skus_client_example_test.go | 4 +- .../armstoragecache/storagetarget_client.go | 43 +- .../storagetarget_client_example_test.go | 10 +- .../armstoragecache/storagetargets_client.go | 83 +- .../storagetargets_client_example_test.go | 18 +- .../armstoragecache/usagemodels_client.go | 9 +- .../usagemodels_client_example_test.go | 4 +- 29 files changed, 3584 insertions(+), 559 deletions(-) create mode 100644 sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client.go create mode 100644 sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client_example_test.go create mode 100644 sdk/resourcemanager/storagecache/armstoragecache/management_client.go create mode 100644 sdk/resourcemanager/storagecache/armstoragecache/management_client_example_test.go diff --git a/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md b/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md index c06b994b0c0d..dc96522b8165 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md +++ b/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md @@ -1,5 +1,60 @@ # Release History +## 4.0.0 (2023-06-23) +### Breaking Changes + +- Type of `CacheIdentity.UserAssignedIdentities` has been changed from `map[string]*UserAssignedIdentitiesValue` to `map[string]*UserAssignedIdentitiesValueAutoGenerated` + +### Features Added + +- New enum type `AmlFilesystemHealthStateType` with values `AmlFilesystemHealthStateTypeAvailable`, `AmlFilesystemHealthStateTypeDegraded`, `AmlFilesystemHealthStateTypeMaintenance`, `AmlFilesystemHealthStateTypeTransitioning`, `AmlFilesystemHealthStateTypeUnavailable` +- New enum type `AmlFilesystemIdentityType` with values `AmlFilesystemIdentityTypeNone`, `AmlFilesystemIdentityTypeUserAssigned` +- New enum type `AmlFilesystemProvisioningStateType` with values `AmlFilesystemProvisioningStateTypeCanceled`, `AmlFilesystemProvisioningStateTypeCreating`, `AmlFilesystemProvisioningStateTypeDeleting`, `AmlFilesystemProvisioningStateTypeFailed`, `AmlFilesystemProvisioningStateTypeSucceeded`, `AmlFilesystemProvisioningStateTypeUpdating` +- New enum type `ArchiveStatusType` with values `ArchiveStatusTypeCanceled`, `ArchiveStatusTypeCancelling`, `ArchiveStatusTypeCompleted`, `ArchiveStatusTypeFSScanInProgress`, `ArchiveStatusTypeFailed`, `ArchiveStatusTypeIdle`, `ArchiveStatusTypeInProgress`, `ArchiveStatusTypeNotConfigured` +- New enum type `FilesystemSubnetStatusType` with values `FilesystemSubnetStatusTypeInvalid`, `FilesystemSubnetStatusTypeOk` +- New enum type `MaintenanceDayOfWeekType` with values `MaintenanceDayOfWeekTypeFriday`, `MaintenanceDayOfWeekTypeMonday`, `MaintenanceDayOfWeekTypeSaturday`, `MaintenanceDayOfWeekTypeSunday`, `MaintenanceDayOfWeekTypeThursday`, `MaintenanceDayOfWeekTypeTuesday`, `MaintenanceDayOfWeekTypeWednesday` +- New function `NewAmlFilesystemsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AmlFilesystemsClient, error)` +- New function `*AmlFilesystemsClient.Archive(context.Context, string, string, *AmlFilesystemsClientArchiveOptions) (AmlFilesystemsClientArchiveResponse, error)` +- New function `*AmlFilesystemsClient.CancelArchive(context.Context, string, string, *AmlFilesystemsClientCancelArchiveOptions) (AmlFilesystemsClientCancelArchiveResponse, error)` +- New function `*AmlFilesystemsClient.BeginCreateOrUpdate(context.Context, string, string, AmlFilesystem, *AmlFilesystemsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AmlFilesystemsClientCreateOrUpdateResponse], error)` +- New function `*AmlFilesystemsClient.BeginDelete(context.Context, string, string, *AmlFilesystemsClientBeginDeleteOptions) (*runtime.Poller[AmlFilesystemsClientDeleteResponse], error)` +- New function `*AmlFilesystemsClient.Get(context.Context, string, string, *AmlFilesystemsClientGetOptions) (AmlFilesystemsClientGetResponse, error)` +- New function `*AmlFilesystemsClient.NewListByResourceGroupPager(string, *AmlFilesystemsClientListByResourceGroupOptions) *runtime.Pager[AmlFilesystemsClientListByResourceGroupResponse]` +- New function `*AmlFilesystemsClient.NewListPager(*AmlFilesystemsClientListOptions) *runtime.Pager[AmlFilesystemsClientListResponse]` +- New function `*AmlFilesystemsClient.BeginUpdate(context.Context, string, string, AmlFilesystemUpdate, *AmlFilesystemsClientBeginUpdateOptions) (*runtime.Poller[AmlFilesystemsClientUpdateResponse], error)` +- New function `*ClientFactory.NewAmlFilesystemsClient() *AmlFilesystemsClient` +- New function `*ClientFactory.NewManagementClient() *ManagementClient` +- New function `NewManagementClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagementClient, error)` +- New function `*ManagementClient.CheckAmlFSSubnets(context.Context, *ManagementClientCheckAmlFSSubnetsOptions) (ManagementClientCheckAmlFSSubnetsResponse, error)` +- New function `*ManagementClient.GetRequiredAmlFSSubnetsSize(context.Context, *ManagementClientGetRequiredAmlFSSubnetsSizeOptions) (ManagementClientGetRequiredAmlFSSubnetsSizeResponse, error)` +- New struct `AmlFilesystem` +- New struct `AmlFilesystemArchive` +- New struct `AmlFilesystemArchiveInfo` +- New struct `AmlFilesystemArchiveStatus` +- New struct `AmlFilesystemCheckSubnetError` +- New struct `AmlFilesystemCheckSubnetErrorFilesystemSubnet` +- New struct `AmlFilesystemClientInfo` +- New struct `AmlFilesystemContainerStorageInterface` +- New struct `AmlFilesystemEncryptionSettings` +- New struct `AmlFilesystemHealth` +- New struct `AmlFilesystemHsmSettings` +- New struct `AmlFilesystemIdentity` +- New struct `AmlFilesystemProperties` +- New struct `AmlFilesystemPropertiesHsm` +- New struct `AmlFilesystemPropertiesMaintenanceWindow` +- New struct `AmlFilesystemSubnetInfo` +- New struct `AmlFilesystemUpdate` +- New struct `AmlFilesystemUpdateProperties` +- New struct `AmlFilesystemUpdatePropertiesMaintenanceWindow` +- New struct `AmlFilesystemsListResult` +- New struct `RequiredAmlFilesystemSubnetsSize` +- New struct `RequiredAmlFilesystemSubnetsSizeInfo` +- New struct `Resource` +- New struct `SKUName` +- New struct `TrackedResource` +- New struct `UserAssignedIdentitiesValueAutoGenerated` + + ## 3.1.0 (2023-04-07) ### Features Added diff --git a/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client.go b/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client.go new file mode 100644 index 000000000000..1e4b8706cf07 --- /dev/null +++ b/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client.go @@ -0,0 +1,531 @@ +//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 armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AmlFilesystemsClient contains the methods for the AmlFilesystems group. +// Don't use this type directly, use NewAmlFilesystemsClient() instead. +type AmlFilesystemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAmlFilesystemsClient creates a new instance of AmlFilesystemsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAmlFilesystemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AmlFilesystemsClient, error) { + cl, err := arm.NewClient(moduleName+".AmlFilesystemsClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AmlFilesystemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Archive - Archive data from the AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - AmlFilesystemsClientArchiveOptions contains the optional parameters for the AmlFilesystemsClient.Archive method. +func (client *AmlFilesystemsClient) Archive(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientArchiveOptions) (AmlFilesystemsClientArchiveResponse, error) { + req, err := client.archiveCreateRequest(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return AmlFilesystemsClientArchiveResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AmlFilesystemsClientArchiveResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AmlFilesystemsClientArchiveResponse{}, runtime.NewResponseError(resp) + } + return AmlFilesystemsClientArchiveResponse{}, nil +} + +// archiveCreateRequest creates the Archive request. +func (client *AmlFilesystemsClient) archiveCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientArchiveOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/archive" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.ArchiveInfo != nil { + return req, runtime.MarshalAsJSON(req, *options.ArchiveInfo) + } + return req, nil +} + +// CancelArchive - Cancel archiving data from the AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - AmlFilesystemsClientCancelArchiveOptions contains the optional parameters for the AmlFilesystemsClient.CancelArchive +// method. +func (client *AmlFilesystemsClient) CancelArchive(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientCancelArchiveOptions) (AmlFilesystemsClientCancelArchiveResponse, error) { + req, err := client.cancelArchiveCreateRequest(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return AmlFilesystemsClientCancelArchiveResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AmlFilesystemsClientCancelArchiveResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AmlFilesystemsClientCancelArchiveResponse{}, runtime.NewResponseError(resp) + } + return AmlFilesystemsClientCancelArchiveResponse{}, nil +} + +// cancelArchiveCreateRequest creates the CancelArchive request. +func (client *AmlFilesystemsClient) cancelArchiveCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientCancelArchiveOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/cancelArchive" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginCreateOrUpdate - Create or update an AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - amlFilesystem - Object containing the user-selectable properties of the AML file system. If read-only properties are included, +// they must match the existing values of those properties. +// - options - AmlFilesystemsClientBeginCreateOrUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginCreateOrUpdate +// method. +func (client *AmlFilesystemsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystem, options *AmlFilesystemsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AmlFilesystemsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, amlFilesystemName, amlFilesystem, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AmlFilesystemsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + } else { + return runtime.NewPollerFromResumeToken[AmlFilesystemsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// CreateOrUpdate - Create or update an AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +func (client *AmlFilesystemsClient) createOrUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystem, options *AmlFilesystemsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, amlFilesystemName, amlFilesystem, options) + if err != nil { + return nil, err + } + resp, 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) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AmlFilesystemsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystem, options *AmlFilesystemsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, amlFilesystem) +} + +// BeginDelete - Schedules an AML file system for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - AmlFilesystemsClientBeginDeleteOptions contains the optional parameters for the AmlFilesystemsClient.BeginDelete +// method. +func (client *AmlFilesystemsClient) BeginDelete(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientBeginDeleteOptions) (*runtime.Poller[AmlFilesystemsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AmlFilesystemsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[AmlFilesystemsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// Delete - Schedules an AML file system for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +func (client *AmlFilesystemsClient) deleteOperation(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return nil, err + } + resp, 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) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AmlFilesystemsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns an AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - AmlFilesystemsClientGetOptions contains the optional parameters for the AmlFilesystemsClient.Get method. +func (client *AmlFilesystemsClient) Get(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientGetOptions) (AmlFilesystemsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return AmlFilesystemsClientGetResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AmlFilesystemsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AmlFilesystemsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *AmlFilesystemsClient) getCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AmlFilesystemsClient) getHandleResponse(resp *http.Response) (AmlFilesystemsClientGetResponse, error) { + result := AmlFilesystemsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AmlFilesystem); err != nil { + return AmlFilesystemsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Returns all AML file systems the user has access to under a subscription. +// +// Generated from API version 2023-05-01 +// - options - AmlFilesystemsClientListOptions contains the optional parameters for the AmlFilesystemsClient.NewListPager method. +func (client *AmlFilesystemsClient) NewListPager(options *AmlFilesystemsClientListOptions) *runtime.Pager[AmlFilesystemsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AmlFilesystemsClientListResponse]{ + More: func(page AmlFilesystemsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AmlFilesystemsClientListResponse) (AmlFilesystemsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AmlFilesystemsClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AmlFilesystemsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AmlFilesystemsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *AmlFilesystemsClient) listCreateRequest(ctx context.Context, options *AmlFilesystemsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/amlFilesystems" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AmlFilesystemsClient) listHandleResponse(resp *http.Response) (AmlFilesystemsClientListResponse, error) { + result := AmlFilesystemsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AmlFilesystemsListResult); err != nil { + return AmlFilesystemsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Returns all AML file systems the user has access to under a resource group. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - AmlFilesystemsClientListByResourceGroupOptions contains the optional parameters for the AmlFilesystemsClient.NewListByResourceGroupPager +// method. +func (client *AmlFilesystemsClient) NewListByResourceGroupPager(resourceGroupName string, options *AmlFilesystemsClientListByResourceGroupOptions) *runtime.Pager[AmlFilesystemsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[AmlFilesystemsClientListByResourceGroupResponse]{ + More: func(page AmlFilesystemsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AmlFilesystemsClientListByResourceGroupResponse) (AmlFilesystemsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AmlFilesystemsClientListByResourceGroupResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AmlFilesystemsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AmlFilesystemsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) + }, + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *AmlFilesystemsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *AmlFilesystemsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *AmlFilesystemsClient) listByResourceGroupHandleResponse(resp *http.Response) (AmlFilesystemsClientListByResourceGroupResponse, error) { + result := AmlFilesystemsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AmlFilesystemsListResult); err != nil { + return AmlFilesystemsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginUpdate - Update an AML file system instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - amlFilesystem - Object containing the user-selectable properties of the AML file system. If read-only properties are included, +// they must match the existing values of those properties. +// - options - AmlFilesystemsClientBeginUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginUpdate +// method. +func (client *AmlFilesystemsClient) BeginUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystemUpdate, options *AmlFilesystemsClientBeginUpdateOptions) (*runtime.Poller[AmlFilesystemsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, amlFilesystemName, amlFilesystem, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AmlFilesystemsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + } else { + return runtime.NewPollerFromResumeToken[AmlFilesystemsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// Update - Update an AML file system instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +func (client *AmlFilesystemsClient) update(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystemUpdate, options *AmlFilesystemsClientBeginUpdateOptions) (*http.Response, error) { + req, err := client.updateCreateRequest(ctx, resourceGroupName, amlFilesystemName, amlFilesystem, options) + if err != nil { + return nil, err + } + resp, 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) + } + return resp, nil +} + +// updateCreateRequest creates the Update request. +func (client *AmlFilesystemsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystemUpdate, options *AmlFilesystemsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, amlFilesystem) +} diff --git a/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client_example_test.go new file mode 100644 index 000000000000..e1eb8f6e3c54 --- /dev/null +++ b/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client_example_test.go @@ -0,0 +1,733 @@ +//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 armstoragecache_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/storagecache/armstoragecache/v4" +) + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_List.json +func ExampleAmlFilesystemsClient_NewListPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewAmlFilesystemsClient().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.AmlFilesystemsListResult = armstoragecache.AmlFilesystemsListResult{ + // Value: []*armstoragecache.AmlFilesystem{ + // { + // Name: to.Ptr("fs1"), + // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), + // Location: to.Ptr("eastus"), + // Tags: map[string]*string{ + // "Dept": to.Ptr("ContosoAds"), + // }, + // Identity: &armstoragecache.AmlFilesystemIdentity{ + // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ + // }, + // }, + // }, + // Properties: &armstoragecache.AmlFilesystemProperties{ + // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ + // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ + // PersistentVolume: to.Ptr(""), + // PersistentVolumeClaim: to.Ptr(""), + // StorageClass: to.Ptr(""), + // }, + // LustreVersion: to.Ptr("2.15.0"), + // MgsAddress: to.Ptr("10.0.0.4"), + // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), + // }, + // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ + // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ + // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), + // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), + // }, + // }, + // }, + // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub1"), + // Health: &armstoragecache.AmlFilesystemHealth{ + // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), + // StatusDescription: to.Ptr("amlFilesystem is ok."), + // }, + // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ + // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ + // { + // FilesystemPath: to.Ptr("/"), + // Status: &armstoragecache.AmlFilesystemArchiveStatus{ + // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), + // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), + // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), + // }, + // }}, + // Settings: &armstoragecache.AmlFilesystemHsmSettings{ + // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), + // ImportPrefix: to.Ptr("/"), + // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), + // }, + // }, + // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ + // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), + // TimeOfDayUTC: to.Ptr("22:00"), + // }, + // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), + // StorageCapacityTiB: to.Ptr[float32](16), + // ThroughputProvisionedMBps: to.Ptr[int32](500), + // }, + // SKU: &armstoragecache.SKUName{ + // Name: to.Ptr("AMLFS-Durable-Premium-250"), + // }, + // Zones: []*string{ + // to.Ptr("1")}, + // }, + // { + // Name: to.Ptr("fs2"), + // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs2"), + // Location: to.Ptr("eastus"), + // Tags: map[string]*string{ + // "Dept": to.Ptr("ContosoAds"), + // }, + // Identity: &armstoragecache.AmlFilesystemIdentity{ + // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ + // }, + // }, + // }, + // Properties: &armstoragecache.AmlFilesystemProperties{ + // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ + // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ + // PersistentVolume: to.Ptr(""), + // PersistentVolumeClaim: to.Ptr(""), + // StorageClass: to.Ptr(""), + // }, + // LustreVersion: to.Ptr("2.15.0"), + // MgsAddress: to.Ptr("10.0.0.4"), + // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), + // }, + // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ + // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ + // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), + // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), + // }, + // }, + // }, + // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub2"), + // Health: &armstoragecache.AmlFilesystemHealth{ + // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), + // StatusDescription: to.Ptr("amlFilesystem is ok."), + // }, + // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ + // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ + // { + // FilesystemPath: to.Ptr("/"), + // Status: &armstoragecache.AmlFilesystemArchiveStatus{ + // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), + // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), + // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), + // }, + // }}, + // Settings: &armstoragecache.AmlFilesystemHsmSettings{ + // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), + // ImportPrefix: to.Ptr("/"), + // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), + // }, + // }, + // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ + // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), + // TimeOfDayUTC: to.Ptr("22:00"), + // }, + // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), + // StorageCapacityTiB: to.Ptr[float32](16), + // ThroughputProvisionedMBps: to.Ptr[int32](500), + // }, + // SKU: &armstoragecache.SKUName{ + // Name: to.Ptr("AMLFS-Durable-Premium-250"), + // }, + // Zones: []*string{ + // to.Ptr("1")}, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_ListByResourceGroup.json +func ExampleAmlFilesystemsClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewAmlFilesystemsClient().NewListByResourceGroupPager("scgroup", 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.AmlFilesystemsListResult = armstoragecache.AmlFilesystemsListResult{ + // Value: []*armstoragecache.AmlFilesystem{ + // { + // Name: to.Ptr("fs1"), + // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), + // Location: to.Ptr("eastus"), + // Tags: map[string]*string{ + // "Dept": to.Ptr("ContosoAds"), + // }, + // Identity: &armstoragecache.AmlFilesystemIdentity{ + // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ + // }, + // }, + // }, + // Properties: &armstoragecache.AmlFilesystemProperties{ + // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ + // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ + // PersistentVolume: to.Ptr(""), + // PersistentVolumeClaim: to.Ptr(""), + // StorageClass: to.Ptr(""), + // }, + // LustreVersion: to.Ptr("2.15.0"), + // MgsAddress: to.Ptr("10.0.0.4"), + // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), + // }, + // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ + // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ + // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), + // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), + // }, + // }, + // }, + // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub1"), + // Health: &armstoragecache.AmlFilesystemHealth{ + // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), + // StatusDescription: to.Ptr("amlFilesystem is ok."), + // }, + // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ + // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ + // { + // FilesystemPath: to.Ptr("/"), + // Status: &armstoragecache.AmlFilesystemArchiveStatus{ + // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), + // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), + // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), + // }, + // }}, + // Settings: &armstoragecache.AmlFilesystemHsmSettings{ + // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), + // ImportPrefix: to.Ptr("/"), + // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), + // }, + // }, + // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ + // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), + // TimeOfDayUTC: to.Ptr("22:00"), + // }, + // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), + // StorageCapacityTiB: to.Ptr[float32](16), + // ThroughputProvisionedMBps: to.Ptr[int32](500), + // }, + // SKU: &armstoragecache.SKUName{ + // Name: to.Ptr("AMLFS-Durable-Premium-250"), + // }, + // Zones: []*string{ + // to.Ptr("1")}, + // }, + // { + // Name: to.Ptr("fs2"), + // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs2"), + // Location: to.Ptr("eastus"), + // Tags: map[string]*string{ + // "Dept": to.Ptr("ContosoAds"), + // }, + // Identity: &armstoragecache.AmlFilesystemIdentity{ + // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ + // }, + // }, + // }, + // Properties: &armstoragecache.AmlFilesystemProperties{ + // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ + // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ + // PersistentVolume: to.Ptr(""), + // PersistentVolumeClaim: to.Ptr(""), + // StorageClass: to.Ptr(""), + // }, + // LustreVersion: to.Ptr("2.15.0"), + // MgsAddress: to.Ptr("10.0.0.4"), + // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), + // }, + // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ + // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ + // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), + // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), + // }, + // }, + // }, + // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub2"), + // Health: &armstoragecache.AmlFilesystemHealth{ + // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), + // StatusDescription: to.Ptr("amlFilesystem is ok."), + // }, + // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ + // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ + // { + // FilesystemPath: to.Ptr("/"), + // Status: &armstoragecache.AmlFilesystemArchiveStatus{ + // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), + // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), + // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), + // }, + // }}, + // Settings: &armstoragecache.AmlFilesystemHsmSettings{ + // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), + // ImportPrefix: to.Ptr("/"), + // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), + // }, + // }, + // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ + // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), + // TimeOfDayUTC: to.Ptr("22:00"), + // }, + // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), + // StorageCapacityTiB: to.Ptr[float32](16), + // ThroughputProvisionedMBps: to.Ptr[int32](500), + // }, + // SKU: &armstoragecache.SKUName{ + // Name: to.Ptr("AMLFS-Durable-Premium-250"), + // }, + // Zones: []*string{ + // to.Ptr("1")}, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Delete.json +func ExampleAmlFilesystemsClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewAmlFilesystemsClient().BeginDelete(ctx, "scgroup", "fs1", 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/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Get.json +func ExampleAmlFilesystemsClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewAmlFilesystemsClient().Get(ctx, "scgroup", "fs1", 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.AmlFilesystem = armstoragecache.AmlFilesystem{ + // Name: to.Ptr("fs1"), + // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), + // Location: to.Ptr("eastus"), + // Tags: map[string]*string{ + // "Dept": to.Ptr("ContosoAds"), + // }, + // Identity: &armstoragecache.AmlFilesystemIdentity{ + // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ + // }, + // }, + // }, + // Properties: &armstoragecache.AmlFilesystemProperties{ + // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ + // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ + // PersistentVolume: to.Ptr(""), + // PersistentVolumeClaim: to.Ptr(""), + // StorageClass: to.Ptr(""), + // }, + // LustreVersion: to.Ptr("2.15.0"), + // MgsAddress: to.Ptr("10.0.0.4"), + // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), + // }, + // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ + // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ + // KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), + // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), + // }, + // }, + // }, + // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), + // Health: &armstoragecache.AmlFilesystemHealth{ + // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), + // StatusDescription: to.Ptr("amlFilesystem is ok."), + // }, + // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ + // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ + // { + // FilesystemPath: to.Ptr("/"), + // Status: &armstoragecache.AmlFilesystemArchiveStatus{ + // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), + // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), + // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), + // }, + // }}, + // Settings: &armstoragecache.AmlFilesystemHsmSettings{ + // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), + // ImportPrefix: to.Ptr("/"), + // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), + // }, + // }, + // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ + // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), + // TimeOfDayUTC: to.Ptr("22:00"), + // }, + // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), + // StorageCapacityTiB: to.Ptr[float32](16), + // ThroughputProvisionedMBps: to.Ptr[int32](500), + // }, + // SKU: &armstoragecache.SKUName{ + // Name: to.Ptr("AMLFS-Durable-Premium-250"), + // }, + // Zones: []*string{ + // to.Ptr("1")}, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_CreateOrUpdate.json +func ExampleAmlFilesystemsClient_BeginCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewAmlFilesystemsClient().BeginCreateOrUpdate(ctx, "scgroup", "fs1", armstoragecache.AmlFilesystem{ + Location: to.Ptr("eastus"), + Tags: map[string]*string{ + "Dept": to.Ptr("ContosoAds"), + }, + Identity: &armstoragecache.AmlFilesystemIdentity{ + Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), + UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, + }, + }, + Properties: &armstoragecache.AmlFilesystemProperties{ + EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ + KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ + KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), + SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ + ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), + }, + }, + }, + FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), + Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ + Settings: &armstoragecache.AmlFilesystemHsmSettings{ + Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), + ImportPrefix: to.Ptr("/"), + LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), + }, + }, + MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ + DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), + TimeOfDayUTC: to.Ptr("22:00"), + }, + StorageCapacityTiB: to.Ptr[float32](16), + }, + SKU: &armstoragecache.SKUName{ + Name: to.Ptr("AMLFS-Durable-Premium-250"), + }, + 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.AmlFilesystem = armstoragecache.AmlFilesystem{ + // Name: to.Ptr("fs1"), + // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), + // Location: to.Ptr("eastus"), + // Tags: map[string]*string{ + // "Dept": to.Ptr("ContosoAds"), + // }, + // Identity: &armstoragecache.AmlFilesystemIdentity{ + // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ + // }, + // }, + // }, + // Properties: &armstoragecache.AmlFilesystemProperties{ + // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ + // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ + // PersistentVolume: to.Ptr(""), + // PersistentVolumeClaim: to.Ptr(""), + // StorageClass: to.Ptr(""), + // }, + // LustreVersion: to.Ptr("2.15.0"), + // MgsAddress: to.Ptr("10.0.0.4"), + // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), + // }, + // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), + // Health: &armstoragecache.AmlFilesystemHealth{ + // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), + // StatusDescription: to.Ptr("amlFilesystem is ok."), + // }, + // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ + // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ + // { + // FilesystemPath: to.Ptr("/"), + // Status: &armstoragecache.AmlFilesystemArchiveStatus{ + // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), + // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), + // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), + // }, + // }}, + // Settings: &armstoragecache.AmlFilesystemHsmSettings{ + // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), + // ImportPrefix: to.Ptr("/"), + // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), + // }, + // }, + // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ + // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), + // TimeOfDayUTC: to.Ptr("22:00"), + // }, + // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), + // StorageCapacityTiB: to.Ptr[float32](16), + // ThroughputProvisionedMBps: to.Ptr[int32](500), + // }, + // SKU: &armstoragecache.SKUName{ + // Name: to.Ptr("AMLFS-Durable-Premium-250"), + // }, + // Zones: []*string{ + // to.Ptr("1")}, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Update.json +func ExampleAmlFilesystemsClient_BeginUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewAmlFilesystemsClient().BeginUpdate(ctx, "scgroup", "fs1", armstoragecache.AmlFilesystemUpdate{ + Properties: &armstoragecache.AmlFilesystemUpdateProperties{ + EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ + KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ + KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), + SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ + ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), + }, + }, + }, + MaintenanceWindow: &armstoragecache.AmlFilesystemUpdatePropertiesMaintenanceWindow{ + DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), + TimeOfDayUTC: to.Ptr("22:00"), + }, + }, + Tags: map[string]*string{ + "Dept": to.Ptr("ContosoAds"), + }, + }, 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.AmlFilesystem = armstoragecache.AmlFilesystem{ + // Name: to.Ptr("fs1"), + // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), + // Location: to.Ptr("eastus"), + // Tags: map[string]*string{ + // "Dept": to.Ptr("ContosoAds"), + // }, + // Identity: &armstoragecache.AmlFilesystemIdentity{ + // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ + // }, + // }, + // }, + // Properties: &armstoragecache.AmlFilesystemProperties{ + // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ + // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ + // PersistentVolume: to.Ptr(""), + // PersistentVolumeClaim: to.Ptr(""), + // StorageClass: to.Ptr(""), + // }, + // LustreVersion: to.Ptr("2.15.0"), + // MgsAddress: to.Ptr("10.0.0.4"), + // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), + // }, + // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ + // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ + // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), + // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), + // }, + // }, + // }, + // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), + // Health: &armstoragecache.AmlFilesystemHealth{ + // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), + // StatusDescription: to.Ptr("amlFilesystem is ok."), + // }, + // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ + // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ + // { + // FilesystemPath: to.Ptr("/"), + // Status: &armstoragecache.AmlFilesystemArchiveStatus{ + // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), + // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), + // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), + // }, + // }}, + // Settings: &armstoragecache.AmlFilesystemHsmSettings{ + // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), + // ImportPrefix: to.Ptr("/"), + // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), + // }, + // }, + // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ + // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), + // TimeOfDayUTC: to.Ptr("22:00"), + // }, + // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), + // StorageCapacityTiB: to.Ptr[float32](16), + // ThroughputProvisionedMBps: to.Ptr[int32](500), + // }, + // SKU: &armstoragecache.SKUName{ + // Name: to.Ptr("AMLFS-Durable-Premium-250"), + // }, + // Zones: []*string{ + // to.Ptr("1")}, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Archive.json +func ExampleAmlFilesystemsClient_Archive() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + _, err = clientFactory.NewAmlFilesystemsClient().Archive(ctx, "scgroup", "sc", &armstoragecache.AmlFilesystemsClientArchiveOptions{ArchiveInfo: &armstoragecache.AmlFilesystemArchiveInfo{ + FilesystemPath: to.Ptr("/"), + }, + }) + 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/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_CancelArchive.json +func ExampleAmlFilesystemsClient_CancelArchive() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + _, err = clientFactory.NewAmlFilesystemsClient().CancelArchive(ctx, "scgroup", "sc", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } +} diff --git a/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client.go b/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client.go index 486b3dac90d3..1ed00d0f2558 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client.go @@ -29,8 +29,7 @@ type AscOperationsClient struct { } // NewAscOperationsClient creates a new instance of AscOperationsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAscOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscOperationsClient, error) { @@ -48,9 +47,9 @@ func NewAscOperationsClient(subscriptionID string, credential azcore.TokenCreden // Get - Gets the status of an asynchronous operation for the Azure HPC Cache // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - location - The name of the region used to look up the operation. -// - operationID - The operation id which uniquely identifies the asynchronous operation. +// Generated from API version 2023-05-01 +// - location - The name of Azure region. +// - operationID - The ID of an ongoing async operation. // - options - AscOperationsClientGetOptions contains the optional parameters for the AscOperationsClient.Get method. func (client *AscOperationsClient) Get(ctx context.Context, location string, operationID string, options *AscOperationsClientGetOptions) (AscOperationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, location, operationID, options) @@ -87,7 +86,7 @@ func (client *AscOperationsClient) getCreateRequest(ctx context.Context, locatio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client_example_test.go index ddf4a0456363..c14e1b834392 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/AscOperations_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/AscOperations_Get.json func ExampleAscOperationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client.go b/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client.go index b4bd48cbf8a3..3351a07139cc 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client.go @@ -29,8 +29,7 @@ type AscUsagesClient struct { } // NewAscUsagesClient creates a new instance of AscUsagesClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAscUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscUsagesClient, error) { @@ -47,7 +46,7 @@ func NewAscUsagesClient(subscriptionID string, credential azcore.TokenCredential // NewListPager - Gets the quantity used and quota limit for resources // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 // - location - The name of the region to query for usage information. // - options - AscUsagesClientListOptions contains the optional parameters for the AscUsagesClient.NewListPager method. func (client *AscUsagesClient) NewListPager(location string, options *AscUsagesClientListOptions) *runtime.Pager[AscUsagesClientListResponse] { @@ -94,7 +93,7 @@ func (client *AscUsagesClient) listCreateRequest(ctx context.Context, location s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client_example_test.go index cbcb2c1453f5..158b17bcb86e 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/AscResourceUsages_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/AscResourceUsages_Get.json func ExampleAscUsagesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/autorest.md b/sdk/resourcemanager/storagecache/armstoragecache/autorest.md index e5c55925249f..d214222e9d60 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/autorest.md +++ b/sdk/resourcemanager/storagecache/armstoragecache/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 3.1.0 - +module-version: 4.0.0 +tag: package-2023-05 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/storagecache/armstoragecache/caches_client.go b/sdk/resourcemanager/storagecache/armstoragecache/caches_client.go index fa30ad2d7220..e9b473a10266 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/caches_client.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/caches_client.go @@ -29,8 +29,7 @@ type CachesClient struct { } // NewCachesClient creates a new instance of CachesClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCachesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CachesClient, error) { @@ -45,13 +44,13 @@ func NewCachesClient(subscriptionID string, credential azcore.TokenCredential, o return client, nil } -// BeginCreateOrUpdate - Create or update a Cache. +// BeginCreateOrUpdate - Create or update a cache. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// - cache - Object containing the user-selectable properties of the new Cache. If read-only properties are included, they must +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - cache - Object containing the user-selectable properties of the new cache. If read-only properties are included, they must // match the existing values of those properties. // - options - CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate // method. @@ -67,10 +66,10 @@ func (client *CachesClient) BeginCreateOrUpdate(ctx context.Context, resourceGro } } -// CreateOrUpdate - Create or update a Cache. +// CreateOrUpdate - Create or update a cache. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) createOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, cacheName, cache, options) if err != nil { @@ -106,18 +105,18 @@ func (client *CachesClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, cache) } -// BeginDebugInfo - Tells a Cache to write generate debug info for support to process. +// BeginDebugInfo - Tells a cache to write generate debug info for support to process. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginDebugInfoOptions contains the optional parameters for the CachesClient.BeginDebugInfo method. func (client *CachesClient) BeginDebugInfo(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*runtime.Poller[CachesClientDebugInfoResponse], error) { if options == nil || options.ResumeToken == "" { @@ -133,10 +132,10 @@ func (client *CachesClient) BeginDebugInfo(ctx context.Context, resourceGroupNam } } -// DebugInfo - Tells a Cache to write generate debug info for support to process. +// DebugInfo - Tells a cache to write generate debug info for support to process. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) debugInfo(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*http.Response, error) { req, err := client.debugInfoCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -172,18 +171,18 @@ func (client *CachesClient) debugInfoCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDelete - Schedules a Cache for deletion. +// BeginDelete - Schedules a cache for deletion. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginDeleteOptions contains the optional parameters for the CachesClient.BeginDelete method. func (client *CachesClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*runtime.Poller[CachesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { @@ -197,10 +196,10 @@ func (client *CachesClient) BeginDelete(ctx context.Context, resourceGroupName s } } -// Delete - Schedules a Cache for deletion. +// Delete - Schedules a cache for deletion. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) deleteOperation(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -236,19 +235,19 @@ func (client *CachesClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginFlush - Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors +// BeginFlush - Tells a cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors // returned until the flush is complete. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginFlushOptions contains the optional parameters for the CachesClient.BeginFlush method. func (client *CachesClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*runtime.Poller[CachesClientFlushResponse], error) { if options == nil || options.ResumeToken == "" { @@ -264,11 +263,11 @@ func (client *CachesClient) BeginFlush(ctx context.Context, resourceGroupName st } } -// Flush - Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned +// Flush - Tells a cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned // until the flush is complete. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) flush(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*http.Response, error) { req, err := client.flushCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -304,18 +303,18 @@ func (client *CachesClient) flushCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Get - Returns a Cache. +// Get - Returns a cache. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientGetOptions contains the optional parameters for the CachesClient.Get method. func (client *CachesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientGetOptions) (CachesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, cacheName, options) @@ -352,7 +351,7 @@ func (client *CachesClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -367,9 +366,9 @@ func (client *CachesClient) getHandleResponse(resp *http.Response) (CachesClient return result, nil } -// NewListPager - Returns all Caches the user has access to under a subscription. +// NewListPager - Returns all caches the user has access to under a subscription. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 // - options - CachesClientListOptions contains the optional parameters for the CachesClient.NewListPager method. func (client *CachesClient) NewListPager(options *CachesClientListOptions) *runtime.Pager[CachesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CachesClientListResponse]{ @@ -411,7 +410,7 @@ func (client *CachesClient) listCreateRequest(ctx context.Context, options *Cach return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -426,10 +425,10 @@ func (client *CachesClient) listHandleResponse(resp *http.Response) (CachesClien return result, nil } -// NewListByResourceGroupPager - Returns all Caches the user has access to under a resource group. +// NewListByResourceGroupPager - Returns all caches the user has access to under a resource group. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - CachesClientListByResourceGroupOptions contains the optional parameters for the CachesClient.NewListByResourceGroupPager // method. func (client *CachesClient) NewListByResourceGroupPager(resourceGroupName string, options *CachesClientListByResourceGroupOptions) *runtime.Pager[CachesClientListByResourceGroupResponse] { @@ -476,7 +475,7 @@ func (client *CachesClient) listByResourceGroupCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -494,9 +493,9 @@ func (client *CachesClient) listByResourceGroupHandleResponse(resp *http.Respons // BeginPausePrimingJob - Schedule a priming job to be paused. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginPausePrimingJobOptions contains the optional parameters for the CachesClient.BeginPausePrimingJob // method. func (client *CachesClient) BeginPausePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginPausePrimingJobOptions) (*runtime.Poller[CachesClientPausePrimingJobResponse], error) { @@ -516,7 +515,7 @@ func (client *CachesClient) BeginPausePrimingJob(ctx context.Context, resourceGr // PausePrimingJob - Schedule a priming job to be paused. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) pausePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginPausePrimingJobOptions) (*http.Response, error) { req, err := client.pausePrimingJobCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -552,7 +551,7 @@ func (client *CachesClient) pausePrimingJobCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.PrimingJobID != nil { @@ -564,9 +563,9 @@ func (client *CachesClient) pausePrimingJobCreateRequest(ctx context.Context, re // BeginResumePrimingJob - Resumes a paused priming job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginResumePrimingJobOptions contains the optional parameters for the CachesClient.BeginResumePrimingJob // method. func (client *CachesClient) BeginResumePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginResumePrimingJobOptions) (*runtime.Poller[CachesClientResumePrimingJobResponse], error) { @@ -586,7 +585,7 @@ func (client *CachesClient) BeginResumePrimingJob(ctx context.Context, resourceG // ResumePrimingJob - Resumes a paused priming job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) resumePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginResumePrimingJobOptions) (*http.Response, error) { req, err := client.resumePrimingJobCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -622,7 +621,7 @@ func (client *CachesClient) resumePrimingJobCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.PrimingJobID != nil { @@ -634,9 +633,9 @@ func (client *CachesClient) resumePrimingJobCreateRequest(ctx context.Context, r // BeginSpaceAllocation - Update cache space allocation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginSpaceAllocationOptions contains the optional parameters for the CachesClient.BeginSpaceAllocation // method. func (client *CachesClient) BeginSpaceAllocation(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginSpaceAllocationOptions) (*runtime.Poller[CachesClientSpaceAllocationResponse], error) { @@ -656,7 +655,7 @@ func (client *CachesClient) BeginSpaceAllocation(ctx context.Context, resourceGr // SpaceAllocation - Update cache space allocation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) spaceAllocation(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginSpaceAllocationOptions) (*http.Response, error) { req, err := client.spaceAllocationCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -692,7 +691,7 @@ func (client *CachesClient) spaceAllocationCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.SpaceAllocation != nil { @@ -701,12 +700,12 @@ func (client *CachesClient) spaceAllocationCreateRequest(ctx context.Context, re return req, nil } -// BeginStart - Tells a Stopped state Cache to transition to Active state. +// BeginStart - Tells a Stopped state cache to transition to Active state. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginStartOptions contains the optional parameters for the CachesClient.BeginStart method. func (client *CachesClient) BeginStart(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*runtime.Poller[CachesClientStartResponse], error) { if options == nil || options.ResumeToken == "" { @@ -722,10 +721,10 @@ func (client *CachesClient) BeginStart(ctx context.Context, resourceGroupName st } } -// Start - Tells a Stopped state Cache to transition to Active state. +// Start - Tells a Stopped state cache to transition to Active state. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) start(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -761,7 +760,7 @@ func (client *CachesClient) startCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -770,9 +769,9 @@ func (client *CachesClient) startCreateRequest(ctx context.Context, resourceGrou // BeginStartPrimingJob - Create a priming job. This operation is only allowed when the cache is healthy. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginStartPrimingJobOptions contains the optional parameters for the CachesClient.BeginStartPrimingJob // method. func (client *CachesClient) BeginStartPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartPrimingJobOptions) (*runtime.Poller[CachesClientStartPrimingJobResponse], error) { @@ -792,7 +791,7 @@ func (client *CachesClient) BeginStartPrimingJob(ctx context.Context, resourceGr // StartPrimingJob - Create a priming job. This operation is only allowed when the cache is healthy. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) startPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartPrimingJobOptions) (*http.Response, error) { req, err := client.startPrimingJobCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -828,7 +827,7 @@ func (client *CachesClient) startPrimingJobCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Primingjob != nil { @@ -837,12 +836,12 @@ func (client *CachesClient) startPrimingJobCreateRequest(ctx context.Context, re return req, nil } -// BeginStop - Tells an Active Cache to transition to Stopped state. +// BeginStop - Tells an Active cache to transition to Stopped state. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginStopOptions contains the optional parameters for the CachesClient.BeginStop method. func (client *CachesClient) BeginStop(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*runtime.Poller[CachesClientStopResponse], error) { if options == nil || options.ResumeToken == "" { @@ -858,10 +857,10 @@ func (client *CachesClient) BeginStop(ctx context.Context, resourceGroupName str } } -// Stop - Tells an Active Cache to transition to Stopped state. +// Stop - Tells an Active cache to transition to Stopped state. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) stop(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -897,7 +896,7 @@ func (client *CachesClient) stopCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -906,9 +905,9 @@ func (client *CachesClient) stopCreateRequest(ctx context.Context, resourceGroup // BeginStopPrimingJob - Schedule a priming job for deletion. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginStopPrimingJobOptions contains the optional parameters for the CachesClient.BeginStopPrimingJob // method. func (client *CachesClient) BeginStopPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopPrimingJobOptions) (*runtime.Poller[CachesClientStopPrimingJobResponse], error) { @@ -928,7 +927,7 @@ func (client *CachesClient) BeginStopPrimingJob(ctx context.Context, resourceGro // StopPrimingJob - Schedule a priming job for deletion. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) stopPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopPrimingJobOptions) (*http.Response, error) { req, err := client.stopPrimingJobCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -964,7 +963,7 @@ func (client *CachesClient) stopPrimingJobCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.PrimingJobID != nil { @@ -973,13 +972,13 @@ func (client *CachesClient) stopPrimingJobCreateRequest(ctx context.Context, res return req, nil } -// BeginUpdate - Update a Cache instance. +// BeginUpdate - Update a cache instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// - cache - Object containing the user-selectable properties of the Cache. If read-only properties are included, they must +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - cache - Object containing the user-selectable properties of the cache. If read-only properties are included, they must // match the existing values of those properties. // - options - CachesClientBeginUpdateOptions contains the optional parameters for the CachesClient.BeginUpdate method. func (client *CachesClient) BeginUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginUpdateOptions) (*runtime.Poller[CachesClientUpdateResponse], error) { @@ -996,10 +995,10 @@ func (client *CachesClient) BeginUpdate(ctx context.Context, resourceGroupName s } } -// Update - Update a Cache instance. +// Update - Update a cache instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) update(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, cacheName, cache, options) if err != nil { @@ -1035,18 +1034,18 @@ func (client *CachesClient) updateCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, cache) } -// BeginUpgradeFirmware - Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect. +// BeginUpgradeFirmware - Upgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - CachesClientBeginUpgradeFirmwareOptions contains the optional parameters for the CachesClient.BeginUpgradeFirmware // method. func (client *CachesClient) BeginUpgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*runtime.Poller[CachesClientUpgradeFirmwareResponse], error) { @@ -1063,10 +1062,10 @@ func (client *CachesClient) BeginUpgradeFirmware(ctx context.Context, resourceGr } } -// UpgradeFirmware - Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect. +// UpgradeFirmware - Upgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *CachesClient) upgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*http.Response, error) { req, err := client.upgradeFirmwareCreateRequest(ctx, resourceGroupName, cacheName, options) if err != nil { @@ -1102,7 +1101,7 @@ func (client *CachesClient) upgradeFirmwareCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagecache/armstoragecache/caches_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/caches_client_example_test.go index efa967a6d673..28afae118fab 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/caches_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/caches_client_example_test.go @@ -17,10 +17,10 @@ import ( "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/storagecache/armstoragecache/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_List.json func ExampleCachesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -62,14 +62,14 @@ func ExampleCachesClient_NewListPager() { // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), - // CaCertificateURI: to.Ptr(""), + // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), - // GroupFileURI: to.Ptr(""), + // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), - // UserFileURI: to.Ptr(""), + // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, @@ -138,11 +138,11 @@ func ExampleCachesClient_NewListPager() { // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ - // CurrentFirmwareVersion: to.Ptr("V5.1.12"), + // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), - // PendingFirmwareVersion: to.Ptr("V5.1.15"), + // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // }, // SKU: &armstoragecache.CacheSKU{ @@ -178,14 +178,14 @@ func ExampleCachesClient_NewListPager() { // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), - // CaCertificateURI: to.Ptr(""), + // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), - // GroupFileURI: to.Ptr(""), + // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr(""), // LdapServer: to.Ptr(""), // RequireValidCertificate: to.Ptr(false), - // UserFileURI: to.Ptr(""), + // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceAD), // }, @@ -258,11 +258,11 @@ func ExampleCachesClient_NewListPager() { // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ - // CurrentFirmwareVersion: to.Ptr("V5.1.12"), + // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), - // PendingFirmwareVersion: to.Ptr("V5.1.15"), + // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, @@ -286,7 +286,7 @@ func ExampleCachesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_ListByResourceGroup.json func ExampleCachesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -328,14 +328,14 @@ func ExampleCachesClient_NewListByResourceGroupPager() { // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), - // CaCertificateURI: to.Ptr(""), + // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), - // GroupFileURI: to.Ptr(""), + // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), - // UserFileURI: to.Ptr(""), + // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, @@ -404,11 +404,11 @@ func ExampleCachesClient_NewListByResourceGroupPager() { // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ - // CurrentFirmwareVersion: to.Ptr("V5.1.12"), + // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), - // PendingFirmwareVersion: to.Ptr("V5.1.15"), + // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, @@ -446,14 +446,14 @@ func ExampleCachesClient_NewListByResourceGroupPager() { // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), - // CaCertificateURI: to.Ptr(""), + // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), - // GroupFileURI: to.Ptr(""), + // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr(""), // LdapServer: to.Ptr(""), // RequireValidCertificate: to.Ptr(false), - // UserFileURI: to.Ptr(""), + // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceAD), // }, @@ -526,11 +526,11 @@ func ExampleCachesClient_NewListByResourceGroupPager() { // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ - // CurrentFirmwareVersion: to.Ptr("V5.1.12"), + // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), - // PendingFirmwareVersion: to.Ptr("V5.1.15"), + // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("2")}, @@ -554,7 +554,7 @@ func ExampleCachesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Delete.json func ExampleCachesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -575,7 +575,7 @@ func ExampleCachesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Get.json func ExampleCachesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -611,14 +611,14 @@ func ExampleCachesClient_Get() { // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), - // CaCertificateURI: to.Ptr(""), + // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), - // GroupFileURI: to.Ptr(""), + // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), - // UserFileURI: to.Ptr(""), + // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, @@ -702,11 +702,11 @@ func ExampleCachesClient_Get() { // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ - // CurrentFirmwareVersion: to.Ptr("V5.1.12"), + // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), - // PendingFirmwareVersion: to.Ptr("V5.1.15"), + // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, @@ -728,7 +728,7 @@ func ExampleCachesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_CreateOrUpdate.json func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -742,7 +742,7 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdate() { poller, err := clientFactory.NewCachesClient().BeginCreateOrUpdate(ctx, "scgroup", "sc1", armstoragecache.Cache{ Identity: &armstoragecache.CacheIdentity{ Type: to.Ptr(armstoragecache.CacheIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ + UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValueAutoGenerated{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -835,14 +835,14 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdate() { // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), - // CaCertificateURI: to.Ptr(""), + // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), - // GroupFileURI: to.Ptr(""), + // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), - // UserFileURI: to.Ptr(""), + // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, @@ -915,11 +915,11 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdate() { // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ - // CurrentFirmwareVersion: to.Ptr("V5.1.12"), + // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), - // PendingFirmwareVersion: to.Ptr("V5.1.15"), + // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, @@ -941,7 +941,7 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_CreateOrUpdate_ldap_only.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_CreateOrUpdate_ldap_only.json func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdateLdapOnly() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1023,14 +1023,14 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdateLdapOnly() { // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), - // CaCertificateURI: to.Ptr(""), + // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), - // GroupFileURI: to.Ptr(""), + // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), - // UserFileURI: to.Ptr(""), + // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, @@ -1103,11 +1103,11 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdateLdapOnly() { // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ - // CurrentFirmwareVersion: to.Ptr("V5.1.12"), + // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), - // PendingFirmwareVersion: to.Ptr("V5.1.15"), + // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, @@ -1129,7 +1129,7 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdateLdapOnly() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Update.json func ExampleCachesClient_BeginUpdate_cachesUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1249,14 +1249,14 @@ func ExampleCachesClient_BeginUpdate_cachesUpdate() { // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), - // CaCertificateURI: to.Ptr(""), + // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), - // GroupFileURI: to.Ptr(""), + // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr(""), // LdapServer: to.Ptr(""), // RequireValidCertificate: to.Ptr(false), - // UserFileURI: to.Ptr(""), + // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceAD), // }, @@ -1361,11 +1361,11 @@ func ExampleCachesClient_BeginUpdate_cachesUpdate() { // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ - // CurrentFirmwareVersion: to.Ptr("V5.1.12"), + // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), - // PendingFirmwareVersion: to.Ptr("V5.1.15"), + // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // }, // SKU: &armstoragecache.CacheSKU{ @@ -1385,7 +1385,7 @@ func ExampleCachesClient_BeginUpdate_cachesUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Update_ldap_only.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Update_ldap_only.json func ExampleCachesClient_BeginUpdate_cachesUpdateLdapOnly() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1496,14 +1496,14 @@ func ExampleCachesClient_BeginUpdate_cachesUpdateLdapOnly() { // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), - // CaCertificateURI: to.Ptr(""), + // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), - // GroupFileURI: to.Ptr(""), + // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), - // UserFileURI: to.Ptr(""), + // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeNo), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, @@ -1597,11 +1597,11 @@ func ExampleCachesClient_BeginUpdate_cachesUpdateLdapOnly() { // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ - // CurrentFirmwareVersion: to.Ptr("V5.1.12"), + // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), - // PendingFirmwareVersion: to.Ptr("V5.1.15"), + // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // }, // SKU: &armstoragecache.CacheSKU{ @@ -1621,7 +1621,7 @@ func ExampleCachesClient_BeginUpdate_cachesUpdateLdapOnly() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_DebugInfo.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_DebugInfo.json func ExampleCachesClient_BeginDebugInfo() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1642,7 +1642,7 @@ func ExampleCachesClient_BeginDebugInfo() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Flush.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Flush.json func ExampleCachesClient_BeginFlush() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1663,7 +1663,7 @@ func ExampleCachesClient_BeginFlush() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Start.json func ExampleCachesClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1684,7 +1684,7 @@ func ExampleCachesClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Stop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Stop.json func ExampleCachesClient_BeginStop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1705,7 +1705,7 @@ func ExampleCachesClient_BeginStop() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StartPrimingJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StartPrimingJob.json func ExampleCachesClient_BeginStartPrimingJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1730,7 +1730,7 @@ func ExampleCachesClient_BeginStartPrimingJob() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StopPrimingJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StopPrimingJob.json func ExampleCachesClient_BeginStopPrimingJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1754,7 +1754,7 @@ func ExampleCachesClient_BeginStopPrimingJob() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/PausePrimingJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/PausePrimingJob.json func ExampleCachesClient_BeginPausePrimingJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1778,7 +1778,7 @@ func ExampleCachesClient_BeginPausePrimingJob() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/ResumePrimingJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/ResumePrimingJob.json func ExampleCachesClient_BeginResumePrimingJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1802,7 +1802,7 @@ func ExampleCachesClient_BeginResumePrimingJob() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_UpgradeFirmware.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_UpgradeFirmware.json func ExampleCachesClient_BeginUpgradeFirmware() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1823,7 +1823,7 @@ func ExampleCachesClient_BeginUpgradeFirmware() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/SpaceAllocation_Post.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/SpaceAllocation_Post.json func ExampleCachesClient_BeginSpaceAllocation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/client_factory.go b/sdk/resourcemanager/storagecache/armstoragecache/client_factory.go index 79548a0c0276..cb357904d27e 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/client_factory.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/client_factory.go @@ -24,8 +24,7 @@ type ClientFactory struct { // NewClientFactory creates a new instance of ClientFactory with the specified values. // The parameter values will be propagated to any client created from this factory. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { @@ -39,6 +38,16 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +func (c *ClientFactory) NewAmlFilesystemsClient() *AmlFilesystemsClient { + subClient, _ := NewAmlFilesystemsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewManagementClient() *ManagementClient { + subClient, _ := NewManagementClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewOperationsClient() *OperationsClient { subClient, _ := NewOperationsClient(c.credential, c.options) return subClient diff --git a/sdk/resourcemanager/storagecache/armstoragecache/constants.go b/sdk/resourcemanager/storagecache/armstoragecache/constants.go index ffeb533187ac..0c3cb0edc4f8 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/constants.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/constants.go @@ -11,9 +11,99 @@ package armstoragecache const ( moduleName = "armstoragecache" - moduleVersion = "v3.1.0" + moduleVersion = "v4.0.0" ) +// AmlFilesystemHealthStateType - List of AML file system health states. +type AmlFilesystemHealthStateType string + +const ( + AmlFilesystemHealthStateTypeAvailable AmlFilesystemHealthStateType = "Available" + AmlFilesystemHealthStateTypeDegraded AmlFilesystemHealthStateType = "Degraded" + AmlFilesystemHealthStateTypeMaintenance AmlFilesystemHealthStateType = "Maintenance" + AmlFilesystemHealthStateTypeTransitioning AmlFilesystemHealthStateType = "Transitioning" + AmlFilesystemHealthStateTypeUnavailable AmlFilesystemHealthStateType = "Unavailable" +) + +// PossibleAmlFilesystemHealthStateTypeValues returns the possible values for the AmlFilesystemHealthStateType const type. +func PossibleAmlFilesystemHealthStateTypeValues() []AmlFilesystemHealthStateType { + return []AmlFilesystemHealthStateType{ + AmlFilesystemHealthStateTypeAvailable, + AmlFilesystemHealthStateTypeDegraded, + AmlFilesystemHealthStateTypeMaintenance, + AmlFilesystemHealthStateTypeTransitioning, + AmlFilesystemHealthStateTypeUnavailable, + } +} + +// AmlFilesystemIdentityType - The type of identity used for the resource. +type AmlFilesystemIdentityType string + +const ( + AmlFilesystemIdentityTypeUserAssigned AmlFilesystemIdentityType = "UserAssigned" + AmlFilesystemIdentityTypeNone AmlFilesystemIdentityType = "None" +) + +// PossibleAmlFilesystemIdentityTypeValues returns the possible values for the AmlFilesystemIdentityType const type. +func PossibleAmlFilesystemIdentityTypeValues() []AmlFilesystemIdentityType { + return []AmlFilesystemIdentityType{ + AmlFilesystemIdentityTypeUserAssigned, + AmlFilesystemIdentityTypeNone, + } +} + +// AmlFilesystemProvisioningStateType - ARM provisioning state. +type AmlFilesystemProvisioningStateType string + +const ( + AmlFilesystemProvisioningStateTypeCanceled AmlFilesystemProvisioningStateType = "Canceled" + AmlFilesystemProvisioningStateTypeCreating AmlFilesystemProvisioningStateType = "Creating" + AmlFilesystemProvisioningStateTypeDeleting AmlFilesystemProvisioningStateType = "Deleting" + AmlFilesystemProvisioningStateTypeFailed AmlFilesystemProvisioningStateType = "Failed" + AmlFilesystemProvisioningStateTypeSucceeded AmlFilesystemProvisioningStateType = "Succeeded" + AmlFilesystemProvisioningStateTypeUpdating AmlFilesystemProvisioningStateType = "Updating" +) + +// PossibleAmlFilesystemProvisioningStateTypeValues returns the possible values for the AmlFilesystemProvisioningStateType const type. +func PossibleAmlFilesystemProvisioningStateTypeValues() []AmlFilesystemProvisioningStateType { + return []AmlFilesystemProvisioningStateType{ + AmlFilesystemProvisioningStateTypeCanceled, + AmlFilesystemProvisioningStateTypeCreating, + AmlFilesystemProvisioningStateTypeDeleting, + AmlFilesystemProvisioningStateTypeFailed, + AmlFilesystemProvisioningStateTypeSucceeded, + AmlFilesystemProvisioningStateTypeUpdating, + } +} + +// ArchiveStatusType - The state of the archive operation +type ArchiveStatusType string + +const ( + ArchiveStatusTypeCanceled ArchiveStatusType = "Canceled" + ArchiveStatusTypeCancelling ArchiveStatusType = "Cancelling" + ArchiveStatusTypeCompleted ArchiveStatusType = "Completed" + ArchiveStatusTypeFSScanInProgress ArchiveStatusType = "FSScanInProgress" + ArchiveStatusTypeFailed ArchiveStatusType = "Failed" + ArchiveStatusTypeIdle ArchiveStatusType = "Idle" + ArchiveStatusTypeInProgress ArchiveStatusType = "InProgress" + ArchiveStatusTypeNotConfigured ArchiveStatusType = "NotConfigured" +) + +// PossibleArchiveStatusTypeValues returns the possible values for the ArchiveStatusType const type. +func PossibleArchiveStatusTypeValues() []ArchiveStatusType { + return []ArchiveStatusType{ + ArchiveStatusTypeCanceled, + ArchiveStatusTypeCancelling, + ArchiveStatusTypeCompleted, + ArchiveStatusTypeFSScanInProgress, + ArchiveStatusTypeFailed, + ArchiveStatusTypeIdle, + ArchiveStatusTypeInProgress, + ArchiveStatusTypeNotConfigured, + } +} + // CacheIdentityType - The type of identity used for the cache type CacheIdentityType string @@ -72,7 +162,23 @@ func PossibleDomainJoinedTypeValues() []DomainJoinedType { } } -// FirmwareStatusType - True if there is a firmware update ready to install on this Cache. The firmware will automatically +// FilesystemSubnetStatusType - The status of the AML file system subnet check. +type FilesystemSubnetStatusType string + +const ( + FilesystemSubnetStatusTypeInvalid FilesystemSubnetStatusType = "Invalid" + FilesystemSubnetStatusTypeOk FilesystemSubnetStatusType = "Ok" +) + +// PossibleFilesystemSubnetStatusTypeValues returns the possible values for the FilesystemSubnetStatusType const type. +func PossibleFilesystemSubnetStatusTypeValues() []FilesystemSubnetStatusType { + return []FilesystemSubnetStatusType{ + FilesystemSubnetStatusTypeInvalid, + FilesystemSubnetStatusTypeOk, + } +} + +// FirmwareStatusType - True if there is a firmware update ready to install on this cache. The firmware will automatically // be installed after firmwareUpdateDeadline if not triggered earlier via the upgrade operation. type FirmwareStatusType string @@ -89,7 +195,11 @@ func PossibleFirmwareStatusTypeValues() []FirmwareStatusType { } } -// HealthStateType - List of Cache health states. +// HealthStateType - List of cache health states. Down is when the cluster is not responding. Degraded is when its functioning +// but has some alerts. Transitioning when it is creating or deleting. Unknown will be returned +// in old api versions when a new value is added in future versions. WaitingForKey is when the create is waiting for the system +// assigned identity to be given access to the encryption key in the +// encryption settings. type HealthStateType string const ( @@ -125,6 +235,32 @@ func PossibleHealthStateTypeValues() []HealthStateType { } } +// MaintenanceDayOfWeekType - Day of the week on which the maintenance window will occur. +type MaintenanceDayOfWeekType string + +const ( + MaintenanceDayOfWeekTypeMonday MaintenanceDayOfWeekType = "Monday" + MaintenanceDayOfWeekTypeTuesday MaintenanceDayOfWeekType = "Tuesday" + MaintenanceDayOfWeekTypeWednesday MaintenanceDayOfWeekType = "Wednesday" + MaintenanceDayOfWeekTypeThursday MaintenanceDayOfWeekType = "Thursday" + MaintenanceDayOfWeekTypeFriday MaintenanceDayOfWeekType = "Friday" + MaintenanceDayOfWeekTypeSaturday MaintenanceDayOfWeekType = "Saturday" + MaintenanceDayOfWeekTypeSunday MaintenanceDayOfWeekType = "Sunday" +) + +// PossibleMaintenanceDayOfWeekTypeValues returns the possible values for the MaintenanceDayOfWeekType const type. +func PossibleMaintenanceDayOfWeekTypeValues() []MaintenanceDayOfWeekType { + return []MaintenanceDayOfWeekType{ + MaintenanceDayOfWeekTypeMonday, + MaintenanceDayOfWeekTypeTuesday, + MaintenanceDayOfWeekTypeWednesday, + MaintenanceDayOfWeekTypeThursday, + MaintenanceDayOfWeekTypeFriday, + MaintenanceDayOfWeekTypeSaturday, + MaintenanceDayOfWeekTypeSunday, + } +} + type MetricAggregationType string const ( diff --git a/sdk/resourcemanager/storagecache/armstoragecache/go.mod b/sdk/resourcemanager/storagecache/armstoragecache/go.mod index 8b928a474039..c85339917d5e 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/go.mod +++ b/sdk/resourcemanager/storagecache/armstoragecache/go.mod @@ -1,21 +1,21 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4 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.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // 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/crypto 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 ) diff --git a/sdk/resourcemanager/storagecache/armstoragecache/go.sum b/sdk/resourcemanager/storagecache/armstoragecache/go.sum index 8ba445a8c4da..21718b486698 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/go.sum +++ b/sdk/resourcemanager/storagecache/armstoragecache/go.sum @@ -1,13 +1,13 @@ -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/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/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 h1:8kDqDngH+DmVBiCtIjCFTGa7MBnsIOkF9IccInFEbjk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +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/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -18,14 +18,14 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -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/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +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/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/storagecache/armstoragecache/management_client.go b/sdk/resourcemanager/storagecache/armstoragecache/management_client.go new file mode 100644 index 000000000000..db6c8df93700 --- /dev/null +++ b/sdk/resourcemanager/storagecache/armstoragecache/management_client.go @@ -0,0 +1,138 @@ +//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 armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagementClient contains the methods for the StorageCacheManagementClient group. +// Don't use this type directly, use NewManagementClient() instead. +type ManagementClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagementClient creates a new instance of ManagementClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error) { + cl, err := arm.NewClient(moduleName+".ManagementClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagementClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckAmlFSSubnets - Check that subnets will be valid for AML file system create calls. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - options - ManagementClientCheckAmlFSSubnetsOptions contains the optional parameters for the ManagementClient.CheckAmlFSSubnets +// method. +func (client *ManagementClient) CheckAmlFSSubnets(ctx context.Context, options *ManagementClientCheckAmlFSSubnetsOptions) (ManagementClientCheckAmlFSSubnetsResponse, error) { + req, err := client.checkAmlFSSubnetsCreateRequest(ctx, options) + if err != nil { + return ManagementClientCheckAmlFSSubnetsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientCheckAmlFSSubnetsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagementClientCheckAmlFSSubnetsResponse{}, runtime.NewResponseError(resp) + } + return ManagementClientCheckAmlFSSubnetsResponse{}, nil +} + +// checkAmlFSSubnetsCreateRequest creates the CheckAmlFSSubnets request. +func (client *ManagementClient) checkAmlFSSubnetsCreateRequest(ctx context.Context, options *ManagementClientCheckAmlFSSubnetsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/checkAmlFSSubnets" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.AmlFilesystemSubnetInfo != nil { + return req, runtime.MarshalAsJSON(req, *options.AmlFilesystemSubnetInfo) + } + return req, nil +} + +// GetRequiredAmlFSSubnetsSize - Get the number of available IP addresses needed for the AML file system information provided. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - options - ManagementClientGetRequiredAmlFSSubnetsSizeOptions contains the optional parameters for the ManagementClient.GetRequiredAmlFSSubnetsSize +// method. +func (client *ManagementClient) GetRequiredAmlFSSubnetsSize(ctx context.Context, options *ManagementClientGetRequiredAmlFSSubnetsSizeOptions) (ManagementClientGetRequiredAmlFSSubnetsSizeResponse, error) { + req, err := client.getRequiredAmlFSSubnetsSizeCreateRequest(ctx, options) + if err != nil { + return ManagementClientGetRequiredAmlFSSubnetsSizeResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientGetRequiredAmlFSSubnetsSizeResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagementClientGetRequiredAmlFSSubnetsSizeResponse{}, runtime.NewResponseError(resp) + } + return client.getRequiredAmlFSSubnetsSizeHandleResponse(resp) +} + +// getRequiredAmlFSSubnetsSizeCreateRequest creates the GetRequiredAmlFSSubnetsSize request. +func (client *ManagementClient) getRequiredAmlFSSubnetsSizeCreateRequest(ctx context.Context, options *ManagementClientGetRequiredAmlFSSubnetsSizeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/getRequiredAmlFSSubnetsSize" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.RequiredAMLFilesystemSubnetsSizeInfo != nil { + return req, runtime.MarshalAsJSON(req, *options.RequiredAMLFilesystemSubnetsSizeInfo) + } + return req, nil +} + +// getRequiredAmlFSSubnetsSizeHandleResponse handles the GetRequiredAmlFSSubnetsSize response. +func (client *ManagementClient) getRequiredAmlFSSubnetsSizeHandleResponse(resp *http.Response) (ManagementClientGetRequiredAmlFSSubnetsSizeResponse, error) { + result := ManagementClientGetRequiredAmlFSSubnetsSizeResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RequiredAmlFilesystemSubnetsSize); err != nil { + return ManagementClientGetRequiredAmlFSSubnetsSizeResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/storagecache/armstoragecache/management_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/management_client_example_test.go new file mode 100644 index 000000000000..58a81bd07c2d --- /dev/null +++ b/sdk/resourcemanager/storagecache/armstoragecache/management_client_example_test.go @@ -0,0 +1,66 @@ +//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 armstoragecache_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/storagecache/armstoragecache/v4" +) + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/checkAmlFSSubnets.json +func ExampleManagementClient_CheckAmlFSSubnets() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + _, err = clientFactory.NewManagementClient().CheckAmlFSSubnets(ctx, &armstoragecache.ManagementClientCheckAmlFSSubnetsOptions{AmlFilesystemSubnetInfo: &armstoragecache.AmlFilesystemSubnetInfo{ + FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), + SKU: &armstoragecache.SKUName{ + Name: to.Ptr("AMLFS-Durable-Premium-125"), + }, + StorageCapacityTiB: to.Ptr[float32](16), + }, + }) + 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/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/getRequiredAmlFSSubnetsSize.json +func ExampleManagementClient_GetRequiredAmlFSSubnetsSize() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragecache.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewManagementClient().GetRequiredAmlFSSubnetsSize(ctx, &armstoragecache.ManagementClientGetRequiredAmlFSSubnetsSizeOptions{RequiredAMLFilesystemSubnetsSizeInfo: 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.RequiredAmlFilesystemSubnetsSize = armstoragecache.RequiredAmlFilesystemSubnetsSize{ + // FilesystemSubnetSize: to.Ptr[int32](24), + // } +} diff --git a/sdk/resourcemanager/storagecache/armstoragecache/models.go b/sdk/resourcemanager/storagecache/armstoragecache/models.go index 8d258408a43c..01e67d7b8879 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/models.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/models.go @@ -14,89 +14,397 @@ import "time" // APIOperation - REST API operation description: see https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/openapi-authoring-automated-guidelines.md#r3023-operationsapiimplementation type APIOperation struct { // The object that represents the operation. - Display *APIOperationDisplay `json:"display,omitempty"` + Display *APIOperationDisplay // The flag that indicates whether the operation applies to data plane. - IsDataAction *bool `json:"isDataAction,omitempty"` + IsDataAction *bool // Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` + Name *string // Origin of the operation. - Origin *string `json:"origin,omitempty"` + Origin *string // Additional details about an operation. - Properties *APIOperationProperties `json:"properties,omitempty"` + Properties *APIOperationProperties } // APIOperationDisplay - The object that represents the operation. type APIOperationDisplay struct { // The description of the operation - Description *string `json:"description,omitempty"` + Description *string // Operation type: Read, write, delete, etc. - Operation *string `json:"operation,omitempty"` + Operation *string // Service provider: Microsoft.StorageCache - Provider *string `json:"provider,omitempty"` + Provider *string // Resource on which the operation is performed: Cache, etc. - Resource *string `json:"resource,omitempty"` + Resource *string } // APIOperationListResult - Result of the request to list Resource Provider operations. It contains a list of operations and // a URL link to get the next set of results. type APIOperationListResult struct { // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // List of Resource Provider operations supported by the Microsoft.StorageCache resource provider. - Value []*APIOperation `json:"value,omitempty"` + Value []*APIOperation } // APIOperationProperties - Additional details about an operation. type APIOperationProperties struct { // Specification of the all the metrics provided for a resource type. - ServiceSpecification *APIOperationPropertiesServiceSpecification `json:"serviceSpecification,omitempty"` + ServiceSpecification *APIOperationPropertiesServiceSpecification } // APIOperationPropertiesServiceSpecification - Specification of the all the metrics provided for a resource type. type APIOperationPropertiesServiceSpecification struct { // Details about operations related to logs. - LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"` + LogSpecifications []*LogSpecification // Details about operations related to metrics. - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` + MetricSpecifications []*MetricSpecification +} + +// AmlFilesystem - An AML file system instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md +type AmlFilesystem struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // The managed identity used by the AML file system, if configured. + Identity *AmlFilesystemIdentity + + // Properties of the AML file system. + Properties *AmlFilesystemProperties + + // SKU for the resource. + SKU *SKUName + + // Resource tags. + Tags map[string]*string + + // Availability zones for resources. This field should only contain a single element in the array. + Zones []*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AmlFilesystemArchive - Information about the AML file system archive +type AmlFilesystemArchive struct { + // READ-ONLY; Lustre file system path to archive relative to the file system root. Specify '/' to archive all modified data. + FilesystemPath *string + + // READ-ONLY; The status of the archive + Status *AmlFilesystemArchiveStatus +} + +// AmlFilesystemArchiveInfo - Information required to execute the archive operation +type AmlFilesystemArchiveInfo struct { + // Lustre file system path to archive relative to the file system root. Specify '/' to archive all modified data. + FilesystemPath *string +} + +// AmlFilesystemArchiveStatus - The status of the archive +type AmlFilesystemArchiveStatus struct { + // READ-ONLY; Server-defined error code for the archive operation + ErrorCode *string + + // READ-ONLY; Server-defined error message for the archive operation + ErrorMessage *string + + // READ-ONLY; The time of the last completed archive operation + LastCompletionTime *time.Time + + // READ-ONLY; The time the latest archive operation started + LastStartedTime *time.Time + + // READ-ONLY; The completion percentage of the archive operation + PercentComplete *int32 + + // READ-ONLY; The state of the archive operation + State *ArchiveStatusType +} + +// AmlFilesystemCheckSubnetError - The error details provided when the checkAmlFSSubnets call fails. +type AmlFilesystemCheckSubnetError struct { + // The error details for the AML file system's subnet. + FilesystemSubnet *AmlFilesystemCheckSubnetErrorFilesystemSubnet +} + +// AmlFilesystemCheckSubnetErrorFilesystemSubnet - The error details for the AML file system's subnet. +type AmlFilesystemCheckSubnetErrorFilesystemSubnet struct { + // The details of the AML file system subnet check. + Message *string + + // The status of the AML file system subnet check. + Status *FilesystemSubnetStatusType +} + +// AmlFilesystemClientInfo - AML file system client information +type AmlFilesystemClientInfo struct { + // READ-ONLY; Container Storage Interface information for the AML file system. + ContainerStorageInterface *AmlFilesystemContainerStorageInterface + + // READ-ONLY; The version of Lustre running in the AML file system + LustreVersion *string + + // READ-ONLY; The IPv4 address used by clients to mount the AML file system's Lustre Management Service (MGS). + MgsAddress *string + + // READ-ONLY; Recommended command to mount the AML file system + MountCommand *string +} + +// AmlFilesystemContainerStorageInterface - AML file system container storage interface information +type AmlFilesystemContainerStorageInterface struct { + // READ-ONLY; Recommended AKS Persistent Volume for the CSI driver, in Base64 encoded YAML + PersistentVolume *string + + // READ-ONLY; Recommended AKS Persistent Volume Claim for the CSI driver, in Base64 encoded YAML + PersistentVolumeClaim *string + + // READ-ONLY; Recommended AKS Storage Class for the CSI driver, in Base64 encoded YAML + StorageClass *string +} + +// AmlFilesystemEncryptionSettings - AML file system encryption settings. +type AmlFilesystemEncryptionSettings struct { + // Specifies the location of the encryption key in Key Vault. + KeyEncryptionKey *KeyVaultKeyReference +} + +// AmlFilesystemHealth - An indication of AML file system health. Gives more information about health than just that related +// to provisioning. +type AmlFilesystemHealth struct { + // List of AML file system health states. + State *AmlFilesystemHealthStateType + + // Server-defined error code for the AML file system health + StatusCode *string + + // Describes the health state. + StatusDescription *string +} + +// AmlFilesystemHsmSettings - AML file system HSM settings. +type AmlFilesystemHsmSettings struct { + // REQUIRED; Resource ID of storage container used for hydrating the namespace and archiving from the namespace. The resource + // provider must have permission to create SAS tokens on the storage account. + Container *string + + // REQUIRED; Resource ID of storage container used for logging events and errors. Must be a separate container in the same + // storage account as the hydration and archive container. The resource provider must have + // permission to create SAS tokens on the storage account. + LoggingContainer *string + + // Only blobs in the non-logging container that start with this path/prefix get hydrated into the cluster namespace. + ImportPrefix *string +} + +// AmlFilesystemIdentity - Managed Identity properties. +type AmlFilesystemIdentity struct { + // The type of identity used for the resource. + Type *AmlFilesystemIdentityType + + // A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary. + UserAssignedIdentities map[string]*UserAssignedIdentitiesValue + + // READ-ONLY; The principal ID for the user-assigned identity of the resource. + PrincipalID *string + + // READ-ONLY; The tenant ID associated with the resource. + TenantID *string +} + +// AmlFilesystemProperties - Properties of the AML file system. +type AmlFilesystemProperties struct { + // REQUIRED; Subnet used for managing the AML file system and for client-facing operations. This subnet should have at least + // a /24 subnet mask within the VNET's address space. + FilesystemSubnet *string + + // REQUIRED; Start time of a 30-minute weekly maintenance window. + MaintenanceWindow *AmlFilesystemPropertiesMaintenanceWindow + + // REQUIRED; The size of the AML file system, in TiB. This might be rounded up. + StorageCapacityTiB *float32 + + // Specifies encryption settings of the AML file system. + EncryptionSettings *AmlFilesystemEncryptionSettings + + // Hydration and archive settings and status + Hsm *AmlFilesystemPropertiesHsm + + // READ-ONLY; Client information for the AML file system. + ClientInfo *AmlFilesystemClientInfo + + // READ-ONLY; Health of the AML file system. + Health *AmlFilesystemHealth + + // READ-ONLY; ARM provisioning state. + ProvisioningState *AmlFilesystemProvisioningStateType + + // READ-ONLY; Throughput provisioned in MB per sec, calculated as storageCapacityTiB * per-unit storage throughput + ThroughputProvisionedMBps *int32 +} + +// AmlFilesystemPropertiesHsm - Hydration and archive settings and status +type AmlFilesystemPropertiesHsm struct { + // Specifies HSM settings of the AML file system. + Settings *AmlFilesystemHsmSettings + + // READ-ONLY; Archive status + ArchiveStatus []*AmlFilesystemArchive +} + +// AmlFilesystemPropertiesMaintenanceWindow - Start time of a 30-minute weekly maintenance window. +type AmlFilesystemPropertiesMaintenanceWindow struct { + // Day of the week on which the maintenance window will occur. + DayOfWeek *MaintenanceDayOfWeekType + + // The time of day (in UTC) to start the maintenance window. + TimeOfDayUTC *string +} + +// AmlFilesystemSubnetInfo - Information required to validate the subnet that will be used in AML file system create +type AmlFilesystemSubnetInfo struct { + // Subnet used for managing the AML file system and for client-facing operations. This subnet should have at least a /24 subnet + // mask within the VNET's address space. + FilesystemSubnet *string + + // Region that the AML file system will be created in. + Location *string + + // SKU for the resource. + SKU *SKUName + + // The size of the AML file system, in TiB. + StorageCapacityTiB *float32 +} + +// AmlFilesystemUpdate - An AML file system update instance. +type AmlFilesystemUpdate struct { + // Properties of the AML file system. + Properties *AmlFilesystemUpdateProperties + + // Resource tags. + Tags map[string]*string +} + +// AmlFilesystemUpdateProperties - Properties of the AML file system. +type AmlFilesystemUpdateProperties struct { + // Specifies encryption settings of the AML file system. + EncryptionSettings *AmlFilesystemEncryptionSettings + + // Start time of a 30-minute weekly maintenance window. + MaintenanceWindow *AmlFilesystemUpdatePropertiesMaintenanceWindow +} + +// AmlFilesystemUpdatePropertiesMaintenanceWindow - Start time of a 30-minute weekly maintenance window. +type AmlFilesystemUpdatePropertiesMaintenanceWindow struct { + // Day of the week on which the maintenance window will occur. + DayOfWeek *MaintenanceDayOfWeekType + + // The time of day (in UTC) to start the maintenance window. + TimeOfDayUTC *string +} + +// AmlFilesystemsClientArchiveOptions contains the optional parameters for the AmlFilesystemsClient.Archive method. +type AmlFilesystemsClientArchiveOptions struct { + // Information about the archive operation + ArchiveInfo *AmlFilesystemArchiveInfo +} + +// AmlFilesystemsClientBeginCreateOrUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginCreateOrUpdate +// method. +type AmlFilesystemsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AmlFilesystemsClientBeginDeleteOptions contains the optional parameters for the AmlFilesystemsClient.BeginDelete method. +type AmlFilesystemsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AmlFilesystemsClientBeginUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginUpdate method. +type AmlFilesystemsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AmlFilesystemsClientCancelArchiveOptions contains the optional parameters for the AmlFilesystemsClient.CancelArchive method. +type AmlFilesystemsClientCancelArchiveOptions struct { + // placeholder for future optional parameters +} + +// AmlFilesystemsClientGetOptions contains the optional parameters for the AmlFilesystemsClient.Get method. +type AmlFilesystemsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AmlFilesystemsClientListByResourceGroupOptions contains the optional parameters for the AmlFilesystemsClient.NewListByResourceGroupPager +// method. +type AmlFilesystemsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AmlFilesystemsClientListOptions contains the optional parameters for the AmlFilesystemsClient.NewListPager method. +type AmlFilesystemsClientListOptions struct { + // placeholder for future optional parameters +} + +// AmlFilesystemsListResult - Result of the request to list AML file systems. It contains a list of AML file systems and a +// URL link to get the next set of results. +type AmlFilesystemsListResult struct { + // URL to get the next set of AML file system list results, if there are any. + NextLink *string + + // List of AML file systems. + Value []*AmlFilesystem } // AscOperation - The status of operation. type AscOperation struct { // The end time of the operation. - EndTime *string `json:"endTime,omitempty"` + EndTime *string // The error detail of the operation if any. - Error *ErrorResponse `json:"error,omitempty"` + Error *ErrorResponse // The operation Id. - ID *string `json:"id,omitempty"` + ID *string // The operation name. - Name *string `json:"name,omitempty"` + Name *string // Additional operation-specific properties - Properties *AscOperationProperties `json:"properties,omitempty"` + Properties *AscOperationProperties // The start time of the operation. - StartTime *string `json:"startTime,omitempty"` + StartTime *string // The status of the operation. - Status *string `json:"status,omitempty"` + Status *string } // AscOperationProperties - Additional operation-specific output. type AscOperationProperties struct { // Additional operation-specific output. - Output map[string]any `json:"output,omitempty"` + Output map[string]any } // AscOperationsClientGetOptions contains the optional parameters for the AscOperationsClient.Get method. @@ -112,285 +420,288 @@ type AscUsagesClientListOptions struct { // BlobNfsTarget - Properties pertaining to the BlobNfsTarget. type BlobNfsTarget struct { // Resource ID of the storage container. - Target *string `json:"target,omitempty"` + Target *string // Identifies the StorageCache usage model to be used for this storage target. - UsageModel *string `json:"usageModel,omitempty"` + UsageModel *string // Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. - VerificationTimer *int32 `json:"verificationTimer,omitempty"` + VerificationTimer *int32 // Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to back-end storage. - WriteBackTimer *int32 `json:"writeBackTimer,omitempty"` + WriteBackTimer *int32 } -// Cache - A Cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md +// Cache - A cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md type Cache struct { // The identity of the cache, if configured. - Identity *CacheIdentity `json:"identity,omitempty"` + Identity *CacheIdentity // Region name string. - Location *string `json:"location,omitempty"` + Location *string - // Properties of the Cache. - Properties *CacheProperties `json:"properties,omitempty"` + // Properties of the cache. + Properties *CacheProperties - // SKU for the Cache. - SKU *CacheSKU `json:"sku,omitempty"` + // SKU for the cache. + SKU *CacheSKU // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string - // READ-ONLY; Resource ID of the Cache. - ID *string `json:"id,omitempty" azure:"ro"` + // READ-ONLY; Resource ID of the cache. + ID *string - // READ-ONLY; Name of Cache. - Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Name of cache. + Name *string // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData - // READ-ONLY; Type of the Cache; Microsoft.StorageCache/Cache - Type *string `json:"type,omitempty" azure:"ro"` + // READ-ONLY; Type of the cache; Microsoft.StorageCache/Cache + Type *string } // CacheActiveDirectorySettings - Active Directory settings used to join a cache to a domain. type CacheActiveDirectorySettings struct { // REQUIRED; The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server. Length must // 1-15 characters from the class [-0-9a-zA-Z]. - CacheNetBiosName *string `json:"cacheNetBiosName,omitempty"` + CacheNetBiosName *string // REQUIRED; The fully qualified domain name of the Active Directory domain controller. - DomainName *string `json:"domainName,omitempty"` + DomainName *string // REQUIRED; The Active Directory domain's NetBIOS name. - DomainNetBiosName *string `json:"domainNetBiosName,omitempty"` + DomainNetBiosName *string // REQUIRED; Primary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. - PrimaryDNSIPAddress *string `json:"primaryDnsIpAddress,omitempty"` + PrimaryDNSIPAddress *string // Active Directory admin credentials used to join the HPC Cache to a domain. - Credentials *CacheActiveDirectorySettingsCredentials `json:"credentials,omitempty"` + Credentials *CacheActiveDirectorySettingsCredentials // Secondary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. - SecondaryDNSIPAddress *string `json:"secondaryDnsIpAddress,omitempty"` + SecondaryDNSIPAddress *string // READ-ONLY; True if the HPC Cache is joined to the Active Directory domain. - DomainJoined *DomainJoinedType `json:"domainJoined,omitempty" azure:"ro"` + DomainJoined *DomainJoinedType } // CacheActiveDirectorySettingsCredentials - Active Directory admin credentials used to join the HPC Cache to a domain. type CacheActiveDirectorySettingsCredentials struct { - // REQUIRED; Plain text password of the Active Directory domain administrator. This value is stored encrypted and not returned - // on response. - Password *string `json:"password,omitempty"` - // REQUIRED; Username of the Active Directory domain administrator. This value is stored encrypted and not returned on response. - Username *string `json:"username,omitempty"` + Username *string + + // Plain text password of the Active Directory domain administrator. This value is stored encrypted and not returned on response. + Password *string } // CacheDirectorySettings - Cache Directory Services settings. type CacheDirectorySettings struct { // Specifies settings for joining the HPC Cache to an Active Directory domain. - ActiveDirectory *CacheActiveDirectorySettings `json:"activeDirectory,omitempty"` + ActiveDirectory *CacheActiveDirectorySettings // Specifies settings for Extended Groups. Extended Groups allows users to be members of more than 16 groups. - UsernameDownload *CacheUsernameDownloadSettings `json:"usernameDownload,omitempty"` + UsernameDownload *CacheUsernameDownloadSettings } // CacheEncryptionSettings - Cache encryption settings. type CacheEncryptionSettings struct { - // Specifies the location of the key encryption key in Key Vault. - KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"` + // Specifies the location of the key encryption key in key vault. + KeyEncryptionKey *KeyVaultKeyReference - // Specifies whether the service will automatically rotate to the newest version of the key in the Key Vault. - RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` + // Specifies whether the service will automatically rotate to the newest version of the key in the key vault. + RotationToLatestKeyVersionEnabled *bool } -// CacheHealth - An indication of Cache health. Gives more information about health than just that related to provisioning. +// CacheHealth - An indication of cache health. Gives more information about health than just that related to provisioning. type CacheHealth struct { - // List of Cache health states. - State *HealthStateType `json:"state,omitempty"` + // List of cache health states. Down is when the cluster is not responding. Degraded is when its functioning but has some + // alerts. Transitioning when it is creating or deleting. Unknown will be returned + // in old api versions when a new value is added in future versions. WaitingForKey is when the create is waiting for the system + // assigned identity to be given access to the encryption key in the + // encryption settings. + State *HealthStateType // Describes explanation of state. - StatusDescription *string `json:"statusDescription,omitempty"` + StatusDescription *string // READ-ONLY; Outstanding conditions that need to be investigated and resolved. - Conditions []*Condition `json:"conditions,omitempty" azure:"ro"` + Conditions []*Condition } // CacheIdentity - Cache identity properties. type CacheIdentity struct { // The type of identity used for the cache - Type *CacheIdentityType `json:"type,omitempty"` + Type *CacheIdentityType // A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary. - UserAssignedIdentities map[string]*UserAssignedIdentitiesValue `json:"userAssignedIdentities,omitempty"` + UserAssignedIdentities map[string]*UserAssignedIdentitiesValueAutoGenerated // READ-ONLY; The principal ID for the system-assigned identity of the cache. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + PrincipalID *string // READ-ONLY; The tenant ID associated with the cache. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string } // CacheNetworkSettings - Cache network settings. type CacheNetworkSettings struct { // DNS search domain - DNSSearchDomain *string `json:"dnsSearchDomain,omitempty"` + DNSSearchDomain *string // DNS servers for the cache to use. It will be set from the network configuration if no value is provided. - DNSServers []*string `json:"dnsServers,omitempty"` + DNSServers []*string // The IPv4 maximum transmission unit configured for the subnet. - Mtu *int32 `json:"mtu,omitempty"` + Mtu *int32 // NTP server IP Address or FQDN for the cache to use. The default is time.windows.com. - NtpServer *string `json:"ntpServer,omitempty"` + NtpServer *string - // READ-ONLY; Array of additional IP addresses used by this Cache. - UtilityAddresses []*string `json:"utilityAddresses,omitempty" azure:"ro"` + // READ-ONLY; Array of additional IP addresses used by this cache. + UtilityAddresses []*string } -// CacheProperties - Properties of the Cache. +// CacheProperties - Properties of the cache. type CacheProperties struct { // The size of this Cache, in GB. - CacheSizeGB *int32 `json:"cacheSizeGB,omitempty"` + CacheSizeGB *int32 // Specifies Directory Services settings of the cache. - DirectoryServicesSettings *CacheDirectorySettings `json:"directoryServicesSettings,omitempty"` + DirectoryServicesSettings *CacheDirectorySettings // Specifies encryption settings of the cache. - EncryptionSettings *CacheEncryptionSettings `json:"encryptionSettings,omitempty"` + EncryptionSettings *CacheEncryptionSettings // Specifies network settings of the cache. - NetworkSettings *CacheNetworkSettings `json:"networkSettings,omitempty"` + NetworkSettings *CacheNetworkSettings // Specifies security settings of the cache. - SecuritySettings *CacheSecuritySettings `json:"securitySettings,omitempty"` + SecuritySettings *CacheSecuritySettings - // Subnet used for the Cache. - Subnet *string `json:"subnet,omitempty"` + // Subnet used for the cache. + Subnet *string - // Upgrade settings of the Cache. - UpgradeSettings *CacheUpgradeSettings `json:"upgradeSettings,omitempty"` + // Upgrade settings of the cache. + UpgradeSettings *CacheUpgradeSettings // Availability zones for resources. This field should only contain a single element in the array. - Zones []*string `json:"zones,omitempty"` + Zones []*string - // READ-ONLY; Health of the Cache. - Health *CacheHealth `json:"health,omitempty" azure:"ro"` + // READ-ONLY; Health of the cache. + Health *CacheHealth - // READ-ONLY; Array of IP addresses that can be used by clients mounting this Cache. - MountAddresses []*string `json:"mountAddresses,omitempty" azure:"ro"` + // READ-ONLY; Array of IPv4 addresses that can be used by clients mounting this cache. + MountAddresses []*string // READ-ONLY; Specifies the priming jobs defined in the cache. - PrimingJobs []*PrimingJob `json:"primingJobs,omitempty" azure:"ro"` + PrimingJobs []*PrimingJob // READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property - ProvisioningState *ProvisioningStateType `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningStateType // READ-ONLY; Specifies the space allocation percentage for each storage target in the cache. - SpaceAllocation []*StorageTargetSpaceAllocation `json:"spaceAllocation,omitempty" azure:"ro"` + SpaceAllocation []*StorageTargetSpaceAllocation - // READ-ONLY; Upgrade status of the Cache. - UpgradeStatus *CacheUpgradeStatus `json:"upgradeStatus,omitempty" azure:"ro"` + // READ-ONLY; Upgrade status of the cache. + UpgradeStatus *CacheUpgradeStatus } -// CacheSKU - SKU for the Cache. +// CacheSKU - SKU for the cache. type CacheSKU struct { - // SKU name for this Cache. - Name *string `json:"name,omitempty"` + // SKU name for this cache. + Name *string } // CacheSecuritySettings - Cache security settings. type CacheSecuritySettings struct { // NFS access policies defined for this cache. - AccessPolicies []*NfsAccessPolicy `json:"accessPolicies,omitempty"` + AccessPolicies []*NfsAccessPolicy } // CacheUpgradeSettings - Cache Upgrade Settings. type CacheUpgradeSettings struct { // When upgradeScheduleEnabled is true, this field holds the user-chosen upgrade time. At the user-chosen time, the firmware // update will automatically be installed on the cache. - ScheduledTime *time.Time `json:"scheduledTime,omitempty"` + ScheduledTime *time.Time // True if the user chooses to select an installation time between now and firmwareUpdateDeadline. Else the firmware will // automatically be installed after firmwareUpdateDeadline if not triggered earlier // via the upgrade operation. - UpgradeScheduleEnabled *bool `json:"upgradeScheduleEnabled,omitempty"` + UpgradeScheduleEnabled *bool } -// CacheUpgradeStatus - Properties describing the software upgrade state of the Cache. +// CacheUpgradeStatus - Properties describing the software upgrade state of the cache. type CacheUpgradeStatus struct { - // READ-ONLY; Version string of the firmware currently installed on this Cache. - CurrentFirmwareVersion *string `json:"currentFirmwareVersion,omitempty" azure:"ro"` + // READ-ONLY; Version string of the firmware currently installed on this cache. + CurrentFirmwareVersion *string - // READ-ONLY; Time at which the pending firmware update will automatically be installed on the Cache. - FirmwareUpdateDeadline *time.Time `json:"firmwareUpdateDeadline,omitempty" azure:"ro"` + // READ-ONLY; Time at which the pending firmware update will automatically be installed on the cache. + FirmwareUpdateDeadline *time.Time - // READ-ONLY; True if there is a firmware update ready to install on this Cache. The firmware will automatically be installed + // READ-ONLY; True if there is a firmware update ready to install on this cache. The firmware will automatically be installed // after firmwareUpdateDeadline if not triggered earlier via the upgrade operation. - FirmwareUpdateStatus *FirmwareStatusType `json:"firmwareUpdateStatus,omitempty" azure:"ro"` + FirmwareUpdateStatus *FirmwareStatusType // READ-ONLY; Time of the last successful firmware update. - LastFirmwareUpdate *time.Time `json:"lastFirmwareUpdate,omitempty" azure:"ro"` + LastFirmwareUpdate *time.Time // READ-ONLY; When firmwareUpdateAvailable is true, this field holds the version string for the update. - PendingFirmwareVersion *string `json:"pendingFirmwareVersion,omitempty" azure:"ro"` + PendingFirmwareVersion *string } // CacheUsernameDownloadSettings - Settings for Extended Groups username and group download. type CacheUsernameDownloadSettings struct { // Determines if the certificate should be automatically downloaded. This applies to 'caCertificateURI' only if 'requireValidCertificate' // is true. - AutoDownloadCertificate *bool `json:"autoDownloadCertificate,omitempty"` + AutoDownloadCertificate *bool // The URI of the CA certificate to validate the LDAP secure connection. This field must be populated when 'requireValidCertificate' // is set to true. - CaCertificateURI *string `json:"caCertificateURI,omitempty"` + CaCertificateURI *string // When present, these are the credentials for the secure LDAP connection. - Credentials *CacheUsernameDownloadSettingsCredentials `json:"credentials,omitempty"` + Credentials *CacheUsernameDownloadSettingsCredentials // Whether or not the LDAP connection should be encrypted. - EncryptLdapConnection *bool `json:"encryptLdapConnection,omitempty"` + EncryptLdapConnection *bool // Whether or not Extended Groups is enabled. - ExtendedGroups *bool `json:"extendedGroups,omitempty"` + ExtendedGroups *bool // The URI of the file containing group information (in /etc/group file format). This field must be populated when 'usernameSource' // is set to 'File'. - GroupFileURI *string `json:"groupFileURI,omitempty"` + GroupFileURI *string // The base distinguished name for the LDAP domain. - LdapBaseDN *string `json:"ldapBaseDN,omitempty"` + LdapBaseDN *string // The fully qualified domain name or IP address of the LDAP server to use. - LdapServer *string `json:"ldapServer,omitempty"` + LdapServer *string // Determines if the certificates must be validated by a certificate authority. When true, caCertificateURI must be provided. - RequireValidCertificate *bool `json:"requireValidCertificate,omitempty"` + RequireValidCertificate *bool // The URI of the file containing user information (in /etc/passwd file format). This field must be populated when 'usernameSource' // is set to 'File'. - UserFileURI *string `json:"userFileURI,omitempty"` + UserFileURI *string // This setting determines how the cache gets username and group names for clients. - UsernameSource *UsernameSource `json:"usernameSource,omitempty"` + UsernameSource *UsernameSource // READ-ONLY; Indicates whether or not the HPC Cache has performed the username download successfully. - UsernameDownloaded *UsernameDownloadedType `json:"usernameDownloaded,omitempty" azure:"ro"` + UsernameDownloaded *UsernameDownloadedType } // CacheUsernameDownloadSettingsCredentials - When present, these are the credentials for the secure LDAP connection. type CacheUsernameDownloadSettingsCredentials struct { // The Bind Distinguished Name identity to be used in the secure LDAP connection. This value is stored encrypted and not returned // on response. - BindDn *string `json:"bindDn,omitempty"` + BindDn *string // The Bind password to be used in the secure LDAP connection. This value is stored encrypted and not returned on response. - BindPassword *string `json:"bindPassword,omitempty"` + BindPassword *string } // CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate method. @@ -497,189 +808,202 @@ type CachesClientListOptions struct { // placeholder for future optional parameters } -// CachesListResult - Result of the request to list Caches. It contains a list of Caches and a URL link to get the next set +// CachesListResult - Result of the request to list caches. It contains a list of caches and a URL link to get the next set // of results. type CachesListResult struct { - // URL to get the next set of Cache list results, if there are any. - NextLink *string `json:"nextLink,omitempty"` + // URL to get the next set of cache list results, if there are any. + NextLink *string // List of Caches. - Value []*Cache `json:"value,omitempty"` + Value []*Cache } // ClfsTarget - Properties pertaining to the ClfsTarget type ClfsTarget struct { // Resource ID of storage container. - Target *string `json:"target,omitempty"` + Target *string } // CloudErrorBody - An error response. type CloudErrorBody struct { // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` + Code *string // A list of additional details about the error. - Details []*CloudErrorBody `json:"details,omitempty"` + Details []*CloudErrorBody // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` + Message *string // The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` + Target *string } // Condition - Outstanding conditions that will need to be resolved. type Condition struct { // READ-ONLY; The issue requiring attention. - Message *string `json:"message,omitempty" azure:"ro"` + Message *string // READ-ONLY; The time when the condition was raised. - Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` + Timestamp *time.Time } // ErrorResponse - Describes the format of Error response. type ErrorResponse struct { // Error code - Code *string `json:"code,omitempty"` + Code *string // Error message indicating why the operation failed. - Message *string `json:"message,omitempty"` + Message *string } -// KeyVaultKeyReference - Describes a reference to Key Vault Key. +// KeyVaultKeyReference - Describes a reference to key vault key. type KeyVaultKeyReference struct { - // REQUIRED; The URL referencing a key encryption key in Key Vault. - KeyURL *string `json:"keyUrl,omitempty"` + // REQUIRED; The URL referencing a key encryption key in key vault. + KeyURL *string - // REQUIRED; Describes a resource Id to source Key Vault. - SourceVault *KeyVaultKeyReferenceSourceVault `json:"sourceVault,omitempty"` + // REQUIRED; Describes a resource Id to source key vault. + SourceVault *KeyVaultKeyReferenceSourceVault } -// KeyVaultKeyReferenceSourceVault - Describes a resource Id to source Key Vault. +// KeyVaultKeyReferenceSourceVault - Describes a resource Id to source key vault. type KeyVaultKeyReferenceSourceVault struct { // Resource Id. - ID *string `json:"id,omitempty"` + ID *string } // LogSpecification - Details about operation related to logs. type LogSpecification struct { // Localized display name of the log. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // The name of the log. - Name *string `json:"name,omitempty"` + Name *string +} + +// ManagementClientCheckAmlFSSubnetsOptions contains the optional parameters for the ManagementClient.CheckAmlFSSubnets method. +type ManagementClientCheckAmlFSSubnetsOptions struct { + // Information about the subnets to validate. + AmlFilesystemSubnetInfo *AmlFilesystemSubnetInfo +} + +// ManagementClientGetRequiredAmlFSSubnetsSizeOptions contains the optional parameters for the ManagementClient.GetRequiredAmlFSSubnetsSize +// method. +type ManagementClientGetRequiredAmlFSSubnetsSizeOptions struct { + // Information to determine the number of available IPs a subnet will need to host the AML file system. + RequiredAMLFilesystemSubnetsSizeInfo *RequiredAmlFilesystemSubnetsSizeInfo } // MetricDimension - Specifications of the Dimension of metrics. type MetricDimension struct { // Localized friendly display name of the dimension - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Internal name of the dimension. - InternalName *string `json:"internalName,omitempty"` + InternalName *string // Name of the dimension - Name *string `json:"name,omitempty"` + Name *string // To be exported to shoe box. - ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` + ToBeExportedForShoebox *bool } // MetricSpecification - Details about operation related to metrics. type MetricSpecification struct { // The type of metric aggregation. - AggregationType *string `json:"aggregationType,omitempty"` + AggregationType *string // Dimensions of the metric - Dimensions []*MetricDimension `json:"dimensions,omitempty"` + Dimensions []*MetricDimension // The description of the metric. - DisplayDescription *string `json:"displayDescription,omitempty"` + DisplayDescription *string // Localized display name of the metric. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Type of metrics. - MetricClass *string `json:"metricClass,omitempty"` + MetricClass *string // The name of the metric. - Name *string `json:"name,omitempty"` + Name *string // Support metric aggregation type. - SupportedAggregationTypes []*MetricAggregationType `json:"supportedAggregationTypes,omitempty"` + SupportedAggregationTypes []*MetricAggregationType // The unit that the metric is measured in. - Unit *string `json:"unit,omitempty"` + Unit *string } // NamespaceJunction - A namespace junction. type NamespaceJunction struct { - // Namespace path on a Cache for a Storage Target. - NamespacePath *string `json:"namespacePath,omitempty"` + // Namespace path on a cache for a Storage Target. + NamespacePath *string // Name of the access policy applied to this junction. - NfsAccessPolicy *string `json:"nfsAccessPolicy,omitempty"` + NfsAccessPolicy *string // NFS export where targetPath exists. - NfsExport *string `json:"nfsExport,omitempty"` + NfsExport *string // Path in Storage Target to which namespacePath points. - TargetPath *string `json:"targetPath,omitempty"` + TargetPath *string } // Nfs3Target - Properties pertaining to the Nfs3Target type Nfs3Target struct { // IP address or host name of an NFSv3 host (e.g., 10.0.44.44). - Target *string `json:"target,omitempty"` + Target *string // Identifies the StorageCache usage model to be used for this storage target. - UsageModel *string `json:"usageModel,omitempty"` + UsageModel *string // Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. - VerificationTimer *int32 `json:"verificationTimer,omitempty"` + VerificationTimer *int32 // Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to back-end storage. - WriteBackTimer *int32 `json:"writeBackTimer,omitempty"` + WriteBackTimer *int32 } // NfsAccessPolicy - A set of rules describing access policies applied to NFSv3 clients of the cache. type NfsAccessPolicy struct { // REQUIRED; The set of rules describing client accesses allowed under this policy. - AccessRules []*NfsAccessRule `json:"accessRules,omitempty"` + AccessRules []*NfsAccessRule // REQUIRED; Name identifying this policy. Access Policy names are not case sensitive. - Name *string `json:"name,omitempty"` + Name *string } // NfsAccessRule - Rule to place restrictions on portions of the cache namespace being presented to clients. type NfsAccessRule struct { // REQUIRED; Access allowed by this rule. - Access *NfsAccessRuleAccess `json:"access,omitempty"` + Access *NfsAccessRuleAccess // REQUIRED; Scope for this rule. The scope and filter determine which clients match the rule. - Scope *NfsAccessRuleScope `json:"scope,omitempty"` + Scope *NfsAccessRuleScope // GID value that replaces 0 when rootSquash is true. This will use the value of anonymousUID if not provided. - AnonymousGID *string `json:"anonymousGID,omitempty"` + AnonymousGID *string // UID value that replaces 0 when rootSquash is true. 65534 will be used if not provided. - AnonymousUID *string `json:"anonymousUID,omitempty"` + AnonymousUID *string // Filter applied to the scope for this rule. The filter's format depends on its scope. 'default' scope matches all clients // and has no filter value. 'network' scope takes a filter in CIDR format (for // example, 10.99.1.0/24). 'host' takes an IP address or fully qualified domain name as filter. If a client does not match // any filter rule and there is no default rule, access is denied. - Filter *string `json:"filter,omitempty"` + Filter *string // Map root accesses to anonymousUID and anonymousGID. - RootSquash *bool `json:"rootSquash,omitempty"` + RootSquash *bool // For the default policy, allow access to subdirectories under the root export. If this is set to no, clients can only mount // the path '/'. If set to yes, clients can mount a deeper path, like '/a/b'. - SubmountAccess *bool `json:"submountAccess,omitempty"` + SubmountAccess *bool // Allow SUID semantics. - Suid *bool `json:"suid,omitempty"` + Suid *bool } // OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. @@ -690,116 +1014,148 @@ type OperationsClientListOptions struct { // PrimingJob - A priming job instance. type PrimingJob struct { // REQUIRED; The priming job name. - PrimingJobName *string `json:"primingJobName,omitempty"` + PrimingJobName *string // REQUIRED; The URL for the priming manifest file to download. This file must be readable from the HPC Cache. When the file // is in Azure blob storage the URL should include a Shared Access Signature (SAS) granting // read permissions on the blob. - PrimingManifestURL *string `json:"primingManifestUrl,omitempty"` + PrimingManifestURL *string // READ-ONLY; The job details or error information if any. - PrimingJobDetails *string `json:"primingJobDetails,omitempty" azure:"ro"` + PrimingJobDetails *string // READ-ONLY; The unique identifier of the priming job. - PrimingJobID *string `json:"primingJobId,omitempty" azure:"ro"` + PrimingJobID *string // READ-ONLY; The current progress of the priming job, as a percentage. - PrimingJobPercentComplete *float64 `json:"primingJobPercentComplete,omitempty" azure:"ro"` + PrimingJobPercentComplete *float64 // READ-ONLY; The state of the priming operation. - PrimingJobState *PrimingJobState `json:"primingJobState,omitempty" azure:"ro"` + PrimingJobState *PrimingJobState // READ-ONLY; The status code of the priming job. - PrimingJobStatus *string `json:"primingJobStatus,omitempty" azure:"ro"` + PrimingJobStatus *string } // PrimingJobIDParameter - Object containing the priming job ID. type PrimingJobIDParameter struct { // REQUIRED; The unique identifier of the priming job. - PrimingJobID *string `json:"primingJobId,omitempty"` + PrimingJobID *string +} + +// RequiredAmlFilesystemSubnetsSize - Information about the number of available IP addresses that are required for the AML +// file system. +type RequiredAmlFilesystemSubnetsSize struct { + // The number of available IP addresses that are required for the AML file system. + FilesystemSubnetSize *int32 +} + +// RequiredAmlFilesystemSubnetsSizeInfo - Information required to get the number of available IP addresses a subnet should +// have that will be used in AML file system create +type RequiredAmlFilesystemSubnetsSizeInfo struct { + // SKU for the resource. + SKU *SKUName + + // The size of the AML file system, in TiB. + StorageCapacityTiB *float32 +} + +// Resource - Common fields that are returned in the response for all Azure Resource Manager resources +type Resource struct { + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string } // ResourceSKU - A resource SKU. type ResourceSKU struct { // A list of capabilities of this SKU, such as throughput or ops/sec. - Capabilities []*ResourceSKUCapabilities `json:"capabilities,omitempty"` + Capabilities []*ResourceSKUCapabilities // The set of locations where the SKU is available. - LocationInfo []*ResourceSKULocationInfo `json:"locationInfo,omitempty"` + LocationInfo []*ResourceSKULocationInfo // The name of this SKU. - Name *string `json:"name,omitempty"` + Name *string // The restrictions preventing this SKU from being used. This is empty if there are no restrictions. - Restrictions []*Restriction `json:"restrictions,omitempty"` + Restrictions []*Restriction // READ-ONLY; The set of locations where the SKU is available. This is the supported and registered Azure Geo Regions (e.g., // West US, East US, Southeast Asia, etc.). - Locations []*string `json:"locations,omitempty" azure:"ro"` + Locations []*string // READ-ONLY; The type of resource the SKU applies to. - ResourceType *string `json:"resourceType,omitempty" azure:"ro"` + ResourceType *string } // ResourceSKUCapabilities - A resource SKU capability. type ResourceSKUCapabilities struct { // Name of a capability, such as ops/sec. - Name *string `json:"name,omitempty"` + Name *string // Quantity, if the capability is measured by quantity. - Value *string `json:"value,omitempty"` + Value *string } // ResourceSKULocationInfo - Resource SKU location information. type ResourceSKULocationInfo struct { // Location where this SKU is available. - Location *string `json:"location,omitempty"` + Location *string // Zones if any. - Zones []*string `json:"zones,omitempty"` + Zones []*string } // ResourceSKUsResult - The response from the List Cache SKUs operation. type ResourceSKUsResult struct { - // The URI to fetch the next page of Cache SKUs. - NextLink *string `json:"nextLink,omitempty"` + // The URI to fetch the next page of cache SKUs. + NextLink *string // READ-ONLY; The list of SKUs available for the subscription. - Value []*ResourceSKU `json:"value,omitempty" azure:"ro"` + Value []*ResourceSKU } // ResourceUsage - The usage and limit (quota) for a resource. type ResourceUsage struct { // READ-ONLY; The current usage of this resource. - CurrentValue *int32 `json:"currentValue,omitempty" azure:"ro"` + CurrentValue *int32 // READ-ONLY; The limit (quota) for this resource. - Limit *int32 `json:"limit,omitempty" azure:"ro"` + Limit *int32 // READ-ONLY; Naming information for this resource type. - Name *ResourceUsageName `json:"name,omitempty" azure:"ro"` + Name *ResourceUsageName // READ-ONLY; Unit that the limit and usages are expressed in, such as 'Count'. - Unit *string `json:"unit,omitempty" azure:"ro"` + Unit *string } // ResourceUsageName - Naming information for this resource type. type ResourceUsageName struct { // Localized name for this resource type. - LocalizedValue *string `json:"localizedValue,omitempty"` + LocalizedValue *string // Canonical name for this resource type. - Value *string `json:"value,omitempty"` + Value *string } // ResourceUsagesListResult - Result of the request to list resource usages. It contains a list of resource usages & limits // and a URL link to get the next set of results. type ResourceUsagesListResult struct { // READ-ONLY; URL to get the next set of resource usage list results if there are any. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string // READ-ONLY; List of usages and limits for resources controlled by the Microsoft.StorageCache resource provider. - Value []*ResourceUsage `json:"value,omitempty" azure:"ro"` + Value []*ResourceUsage } // Restriction - The restrictions preventing this SKU from being used. @@ -807,14 +1163,20 @@ type Restriction struct { // The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set when // the SKU has requiredQuotas parameter as the subscription does not belong to that // quota. "NotAvailableForSubscription" is related to capacity at the datacenter. - ReasonCode *ReasonCode `json:"reasonCode,omitempty"` + ReasonCode *ReasonCode // READ-ONLY; The type of restrictions. In this version, the only possible value for this is location. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string // READ-ONLY; The value of restrictions. If the restriction type is set to location, then this would be the different locations // where the SKU is restricted. - Values []*string `json:"values,omitempty" azure:"ro"` + Values []*string +} + +// SKUName - SKU for the resource. +type SKUName struct { + // SKU name for this resource. + Name *string } // SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. @@ -825,22 +1187,22 @@ type SKUsClientListOptions struct { // StorageTarget - Type of the Storage Target. type StorageTarget struct { // StorageTarget properties - Properties *StorageTargetProperties `json:"properties,omitempty"` + Properties *StorageTargetProperties // READ-ONLY; Resource ID of the Storage Target. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Region name string. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the Storage Target. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // StorageTargetClientBeginFlushOptions contains the optional parameters for the StorageTargetClient.BeginFlush method. @@ -871,58 +1233,58 @@ type StorageTargetClientBeginSuspendOptions struct { // StorageTargetProperties - Properties of the Storage Target. type StorageTargetProperties struct { // REQUIRED; Type of the Storage Target. - TargetType *StorageTargetType `json:"targetType,omitempty"` + TargetType *StorageTargetType // Properties when targetType is blobNfs. - BlobNfs *BlobNfsTarget `json:"blobNfs,omitempty"` + BlobNfs *BlobNfsTarget // Properties when targetType is clfs. - Clfs *ClfsTarget `json:"clfs,omitempty"` + Clfs *ClfsTarget - // List of Cache namespace junctions to target for namespace associations. - Junctions []*NamespaceJunction `json:"junctions,omitempty"` + // List of cache namespace junctions to target for namespace associations. + Junctions []*NamespaceJunction // Properties when targetType is nfs3. - Nfs3 *Nfs3Target `json:"nfs3,omitempty"` + Nfs3 *Nfs3Target // Storage target operational state. - State *OperationalStateType `json:"state,omitempty"` + State *OperationalStateType // Properties when targetType is unknown. - Unknown *UnknownTarget `json:"unknown,omitempty"` + Unknown *UnknownTarget // READ-ONLY; The percentage of cache space allocated for this storage target - AllocationPercentage *int32 `json:"allocationPercentage,omitempty" azure:"ro"` + AllocationPercentage *int32 // READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property - ProvisioningState *ProvisioningStateType `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningStateType } -// StorageTargetResource - Resource used by a Cache. +// StorageTargetResource - Resource used by a cache. type StorageTargetResource struct { // READ-ONLY; Resource ID of the Storage Target. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Region name string. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the Storage Target. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // StorageTargetSpaceAllocation - Storage Target space allocation properties. type StorageTargetSpaceAllocation struct { // The percentage of cache space allocated for this storage target - AllocationPercentage *int32 `json:"allocationPercentage,omitempty"` + AllocationPercentage *int32 // Name of the storage target. - Name *string `json:"name,omitempty"` + Name *string } // StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate @@ -969,55 +1331,77 @@ type StorageTargetsClientListByCacheOptions struct { // StorageTargetsResult - A list of Storage Targets. type StorageTargetsResult struct { // The URI to fetch the next page of Storage Targets. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string - // The list of Storage Targets defined for the Cache. - Value []*StorageTarget `json:"value,omitempty"` + // The list of Storage Targets defined for the cache. + Value []*StorageTarget } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` + CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` + LastModifiedByType *CreatedByType +} + +// TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' +// and a 'location' +type TrackedResource struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string } // UnknownTarget - Properties pertaining to the UnknownTarget type UnknownTarget struct { // Dictionary of string->string pairs containing information about the Storage Target. - Attributes map[string]*string `json:"attributes,omitempty"` + Attributes map[string]*string } // UsageModel - A usage model. type UsageModel struct { // Localized information describing this usage model. - Display *UsageModelDisplay `json:"display,omitempty"` + Display *UsageModelDisplay // Non-localized keyword name for this usage model. - ModelName *string `json:"modelName,omitempty"` + ModelName *string // The type of Storage Target to which this model is applicable (only nfs3 as of this version). - TargetType *string `json:"targetType,omitempty"` + TargetType *string } // UsageModelDisplay - Localized information describing this usage model. type UsageModelDisplay struct { // String to display for this usage model. - Description *string `json:"description,omitempty"` + Description *string } // UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.NewListPager method. @@ -1025,19 +1409,27 @@ type UsageModelsClientListOptions struct { // placeholder for future optional parameters } -// UsageModelsResult - A list of Cache usage models. +// UsageModelsResult - A list of cache usage models. type UsageModelsResult struct { - // The URI to fetch the next page of Cache usage models. - NextLink *string `json:"nextLink,omitempty"` + // The URI to fetch the next page of cache usage models. + NextLink *string // The list of usage models available for the subscription. - Value []*UsageModel `json:"value,omitempty"` + Value []*UsageModel } type UserAssignedIdentitiesValue struct { // READ-ONLY; The client ID of the user-assigned identity. - ClientID *string `json:"clientId,omitempty" azure:"ro"` + ClientID *string + + // READ-ONLY; The principal ID of the user-assigned identity. + PrincipalID *string +} + +type UserAssignedIdentitiesValueAutoGenerated struct { + // READ-ONLY; The client ID of the user-assigned identity. + ClientID *string // READ-ONLY; The principal ID of the user-assigned identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + PrincipalID *string } diff --git a/sdk/resourcemanager/storagecache/armstoragecache/models_serde.go b/sdk/resourcemanager/storagecache/armstoragecache/models_serde.go index 65d6aae302f8..b6eaf7619da3 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/models_serde.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/models_serde.go @@ -187,6 +187,726 @@ func (a *APIOperationPropertiesServiceSpecification) UnmarshalJSON(data []byte) return nil } +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystem. +func (a AmlFilesystem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + populate(objectMap, "zones", a.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystem. +func (a *AmlFilesystem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &a.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemArchive. +func (a AmlFilesystemArchive) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filesystemPath", a.FilesystemPath) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemArchive. +func (a *AmlFilesystemArchive) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filesystemPath": + err = unpopulate(val, "FilesystemPath", &a.FilesystemPath) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemArchiveInfo. +func (a AmlFilesystemArchiveInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filesystemPath", a.FilesystemPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemArchiveInfo. +func (a *AmlFilesystemArchiveInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filesystemPath": + err = unpopulate(val, "FilesystemPath", &a.FilesystemPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemArchiveStatus. +func (a AmlFilesystemArchiveStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", a.ErrorCode) + populate(objectMap, "errorMessage", a.ErrorMessage) + populateTimeRFC3339(objectMap, "lastCompletionTime", a.LastCompletionTime) + populateTimeRFC3339(objectMap, "lastStartedTime", a.LastStartedTime) + populate(objectMap, "percentComplete", a.PercentComplete) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemArchiveStatus. +func (a *AmlFilesystemArchiveStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &a.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &a.ErrorMessage) + delete(rawMsg, key) + case "lastCompletionTime": + err = unpopulateTimeRFC3339(val, "LastCompletionTime", &a.LastCompletionTime) + delete(rawMsg, key) + case "lastStartedTime": + err = unpopulateTimeRFC3339(val, "LastStartedTime", &a.LastStartedTime) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &a.PercentComplete) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemCheckSubnetError. +func (a AmlFilesystemCheckSubnetError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filesystemSubnet", a.FilesystemSubnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemCheckSubnetError. +func (a *AmlFilesystemCheckSubnetError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filesystemSubnet": + err = unpopulate(val, "FilesystemSubnet", &a.FilesystemSubnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemCheckSubnetErrorFilesystemSubnet. +func (a AmlFilesystemCheckSubnetErrorFilesystemSubnet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", a.Message) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemCheckSubnetErrorFilesystemSubnet. +func (a *AmlFilesystemCheckSubnetErrorFilesystemSubnet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &a.Message) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemClientInfo. +func (a AmlFilesystemClientInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerStorageInterface", a.ContainerStorageInterface) + populate(objectMap, "lustreVersion", a.LustreVersion) + populate(objectMap, "mgsAddress", a.MgsAddress) + populate(objectMap, "mountCommand", a.MountCommand) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemClientInfo. +func (a *AmlFilesystemClientInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerStorageInterface": + err = unpopulate(val, "ContainerStorageInterface", &a.ContainerStorageInterface) + delete(rawMsg, key) + case "lustreVersion": + err = unpopulate(val, "LustreVersion", &a.LustreVersion) + delete(rawMsg, key) + case "mgsAddress": + err = unpopulate(val, "MgsAddress", &a.MgsAddress) + delete(rawMsg, key) + case "mountCommand": + err = unpopulate(val, "MountCommand", &a.MountCommand) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemContainerStorageInterface. +func (a AmlFilesystemContainerStorageInterface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "persistentVolume", a.PersistentVolume) + populate(objectMap, "persistentVolumeClaim", a.PersistentVolumeClaim) + populate(objectMap, "storageClass", a.StorageClass) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemContainerStorageInterface. +func (a *AmlFilesystemContainerStorageInterface) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "persistentVolume": + err = unpopulate(val, "PersistentVolume", &a.PersistentVolume) + delete(rawMsg, key) + case "persistentVolumeClaim": + err = unpopulate(val, "PersistentVolumeClaim", &a.PersistentVolumeClaim) + delete(rawMsg, key) + case "storageClass": + err = unpopulate(val, "StorageClass", &a.StorageClass) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemEncryptionSettings. +func (a AmlFilesystemEncryptionSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyEncryptionKey", a.KeyEncryptionKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemEncryptionSettings. +func (a *AmlFilesystemEncryptionSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyEncryptionKey": + err = unpopulate(val, "KeyEncryptionKey", &a.KeyEncryptionKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemHealth. +func (a AmlFilesystemHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", a.State) + populate(objectMap, "statusCode", a.StatusCode) + populate(objectMap, "statusDescription", a.StatusDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemHealth. +func (a *AmlFilesystemHealth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + case "statusCode": + err = unpopulate(val, "StatusCode", &a.StatusCode) + delete(rawMsg, key) + case "statusDescription": + err = unpopulate(val, "StatusDescription", &a.StatusDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemHsmSettings. +func (a AmlFilesystemHsmSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "container", a.Container) + populate(objectMap, "importPrefix", a.ImportPrefix) + populate(objectMap, "loggingContainer", a.LoggingContainer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemHsmSettings. +func (a *AmlFilesystemHsmSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "container": + err = unpopulate(val, "Container", &a.Container) + delete(rawMsg, key) + case "importPrefix": + err = unpopulate(val, "ImportPrefix", &a.ImportPrefix) + delete(rawMsg, key) + case "loggingContainer": + err = unpopulate(val, "LoggingContainer", &a.LoggingContainer) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemIdentity. +func (a AmlFilesystemIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", a.PrincipalID) + populate(objectMap, "tenantId", a.TenantID) + populate(objectMap, "type", a.Type) + populate(objectMap, "userAssignedIdentities", a.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemIdentity. +func (a *AmlFilesystemIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &a.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &a.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &a.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemProperties. +func (a AmlFilesystemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientInfo", a.ClientInfo) + populate(objectMap, "encryptionSettings", a.EncryptionSettings) + populate(objectMap, "filesystemSubnet", a.FilesystemSubnet) + populate(objectMap, "health", a.Health) + populate(objectMap, "hsm", a.Hsm) + populate(objectMap, "maintenanceWindow", a.MaintenanceWindow) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "storageCapacityTiB", a.StorageCapacityTiB) + populate(objectMap, "throughputProvisionedMBps", a.ThroughputProvisionedMBps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemProperties. +func (a *AmlFilesystemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientInfo": + err = unpopulate(val, "ClientInfo", &a.ClientInfo) + delete(rawMsg, key) + case "encryptionSettings": + err = unpopulate(val, "EncryptionSettings", &a.EncryptionSettings) + delete(rawMsg, key) + case "filesystemSubnet": + err = unpopulate(val, "FilesystemSubnet", &a.FilesystemSubnet) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &a.Health) + delete(rawMsg, key) + case "hsm": + err = unpopulate(val, "Hsm", &a.Hsm) + delete(rawMsg, key) + case "maintenanceWindow": + err = unpopulate(val, "MaintenanceWindow", &a.MaintenanceWindow) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "storageCapacityTiB": + err = unpopulate(val, "StorageCapacityTiB", &a.StorageCapacityTiB) + delete(rawMsg, key) + case "throughputProvisionedMBps": + err = unpopulate(val, "ThroughputProvisionedMBps", &a.ThroughputProvisionedMBps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemPropertiesHsm. +func (a AmlFilesystemPropertiesHsm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "archiveStatus", a.ArchiveStatus) + populate(objectMap, "settings", a.Settings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemPropertiesHsm. +func (a *AmlFilesystemPropertiesHsm) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "archiveStatus": + err = unpopulate(val, "ArchiveStatus", &a.ArchiveStatus) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &a.Settings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemPropertiesMaintenanceWindow. +func (a AmlFilesystemPropertiesMaintenanceWindow) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dayOfWeek", a.DayOfWeek) + populate(objectMap, "timeOfDayUTC", a.TimeOfDayUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemPropertiesMaintenanceWindow. +func (a *AmlFilesystemPropertiesMaintenanceWindow) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dayOfWeek": + err = unpopulate(val, "DayOfWeek", &a.DayOfWeek) + delete(rawMsg, key) + case "timeOfDayUTC": + err = unpopulate(val, "TimeOfDayUTC", &a.TimeOfDayUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemSubnetInfo. +func (a AmlFilesystemSubnetInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filesystemSubnet", a.FilesystemSubnet) + populate(objectMap, "location", a.Location) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "storageCapacityTiB", a.StorageCapacityTiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemSubnetInfo. +func (a *AmlFilesystemSubnetInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filesystemSubnet": + err = unpopulate(val, "FilesystemSubnet", &a.FilesystemSubnet) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "storageCapacityTiB": + err = unpopulate(val, "StorageCapacityTiB", &a.StorageCapacityTiB) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemUpdate. +func (a AmlFilesystemUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemUpdate. +func (a *AmlFilesystemUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemUpdateProperties. +func (a AmlFilesystemUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encryptionSettings", a.EncryptionSettings) + populate(objectMap, "maintenanceWindow", a.MaintenanceWindow) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemUpdateProperties. +func (a *AmlFilesystemUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "encryptionSettings": + err = unpopulate(val, "EncryptionSettings", &a.EncryptionSettings) + delete(rawMsg, key) + case "maintenanceWindow": + err = unpopulate(val, "MaintenanceWindow", &a.MaintenanceWindow) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemUpdatePropertiesMaintenanceWindow. +func (a AmlFilesystemUpdatePropertiesMaintenanceWindow) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dayOfWeek", a.DayOfWeek) + populate(objectMap, "timeOfDayUTC", a.TimeOfDayUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemUpdatePropertiesMaintenanceWindow. +func (a *AmlFilesystemUpdatePropertiesMaintenanceWindow) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dayOfWeek": + err = unpopulate(val, "DayOfWeek", &a.DayOfWeek) + delete(rawMsg, key) + case "timeOfDayUTC": + err = unpopulate(val, "TimeOfDayUTC", &a.TimeOfDayUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemsListResult. +func (a AmlFilesystemsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemsListResult. +func (a *AmlFilesystemsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AscOperation. func (a AscOperation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1517,6 +2237,103 @@ func (p *PrimingJobIDParameter) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type RequiredAmlFilesystemSubnetsSize. +func (r RequiredAmlFilesystemSubnetsSize) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filesystemSubnetSize", r.FilesystemSubnetSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequiredAmlFilesystemSubnetsSize. +func (r *RequiredAmlFilesystemSubnetsSize) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filesystemSubnetSize": + err = unpopulate(val, "FilesystemSubnetSize", &r.FilesystemSubnetSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequiredAmlFilesystemSubnetsSizeInfo. +func (r RequiredAmlFilesystemSubnetsSizeInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sku", r.SKU) + populate(objectMap, "storageCapacityTiB", r.StorageCapacityTiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequiredAmlFilesystemSubnetsSizeInfo. +func (r *RequiredAmlFilesystemSubnetsSizeInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sku": + err = unpopulate(val, "SKU", &r.SKU) + delete(rawMsg, key) + case "storageCapacityTiB": + err = unpopulate(val, "StorageCapacityTiB", &r.StorageCapacityTiB) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ResourceSKU. func (r ResourceSKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1793,6 +2610,33 @@ func (r *Restriction) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SKUName. +func (s SKUName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUName. +func (s *SKUName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type StorageTarget. func (s StorageTarget) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2051,6 +2895,53 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type TrackedResource. +func (t TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + populate(objectMap, "systemData", t.SystemData) + populate(objectMap, "tags", t.Tags) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. +func (t *TrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &t.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &t.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type UnknownTarget. func (u UnknownTarget) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2202,6 +3093,37 @@ func (u *UserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentitiesValueAutoGenerated. +func (u UserAssignedIdentitiesValueAutoGenerated) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentitiesValueAutoGenerated. +func (u *UserAssignedIdentitiesValueAutoGenerated) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + func populate(m map[string]any, k string, v any) { if v == nil { return diff --git a/sdk/resourcemanager/storagecache/armstoragecache/operations_client.go b/sdk/resourcemanager/storagecache/armstoragecache/operations_client.go index b4d5f49059be..95306cf2c01d 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/operations_client.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Resource Provider operations. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagecache/armstoragecache/operations_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/operations_client_example_test.go index dc867b34dc2e..8d96b8e5a464 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/operations_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/operations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Operations_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Operations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/response_types.go b/sdk/resourcemanager/storagecache/armstoragecache/response_types.go index 526991d96999..39378f553f88 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/response_types.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/response_types.go @@ -9,6 +9,46 @@ package armstoragecache +// AmlFilesystemsClientArchiveResponse contains the response from method AmlFilesystemsClient.Archive. +type AmlFilesystemsClientArchiveResponse struct { + // placeholder for future response values +} + +// AmlFilesystemsClientCancelArchiveResponse contains the response from method AmlFilesystemsClient.CancelArchive. +type AmlFilesystemsClientCancelArchiveResponse struct { + // placeholder for future response values +} + +// AmlFilesystemsClientCreateOrUpdateResponse contains the response from method AmlFilesystemsClient.BeginCreateOrUpdate. +type AmlFilesystemsClientCreateOrUpdateResponse struct { + AmlFilesystem +} + +// AmlFilesystemsClientDeleteResponse contains the response from method AmlFilesystemsClient.BeginDelete. +type AmlFilesystemsClientDeleteResponse struct { + // placeholder for future response values +} + +// AmlFilesystemsClientGetResponse contains the response from method AmlFilesystemsClient.Get. +type AmlFilesystemsClientGetResponse struct { + AmlFilesystem +} + +// AmlFilesystemsClientListByResourceGroupResponse contains the response from method AmlFilesystemsClient.NewListByResourceGroupPager. +type AmlFilesystemsClientListByResourceGroupResponse struct { + AmlFilesystemsListResult +} + +// AmlFilesystemsClientListResponse contains the response from method AmlFilesystemsClient.NewListPager. +type AmlFilesystemsClientListResponse struct { + AmlFilesystemsListResult +} + +// AmlFilesystemsClientUpdateResponse contains the response from method AmlFilesystemsClient.BeginUpdate. +type AmlFilesystemsClientUpdateResponse struct { + AmlFilesystem +} + // AscOperationsClientGetResponse contains the response from method AscOperationsClient.Get. type AscOperationsClientGetResponse struct { AscOperation @@ -99,6 +139,16 @@ type CachesClientUpgradeFirmwareResponse struct { // placeholder for future response values } +// ManagementClientCheckAmlFSSubnetsResponse contains the response from method ManagementClient.CheckAmlFSSubnets. +type ManagementClientCheckAmlFSSubnetsResponse struct { + // placeholder for future response values +} + +// ManagementClientGetRequiredAmlFSSubnetsSizeResponse contains the response from method ManagementClient.GetRequiredAmlFSSubnetsSize. +type ManagementClientGetRequiredAmlFSSubnetsSizeResponse struct { + RequiredAmlFilesystemSubnetsSize +} + // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { APIOperationListResult diff --git a/sdk/resourcemanager/storagecache/armstoragecache/skus_client.go b/sdk/resourcemanager/storagecache/armstoragecache/skus_client.go index d74e6d30547e..eda0ca0f66f5 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/skus_client.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/skus_client.go @@ -29,8 +29,7 @@ type SKUsClient struct { } // NewSKUsClient creates a new instance of SKUsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { @@ -47,7 +46,7 @@ func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, opt // NewListPager - Get the list of StorageCache.Cache SKUs available to this subscription. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 // - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ @@ -89,7 +88,7 @@ func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsCl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagecache/armstoragecache/skus_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/skus_client_example_test.go index 564fe0f99c3e..1369e11ffdc0 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/skus_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/skus_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Skus_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Skus_List.json func ExampleSKUsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client.go b/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client.go index b8990df08bf3..3d2c952ac454 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client.go @@ -29,8 +29,7 @@ type StorageTargetClient struct { } // NewStorageTargetClient creates a new instance of StorageTargetClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewStorageTargetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetClient, error) { @@ -49,9 +48,9 @@ func NewStorageTargetClient(subscriptionID string, credential azcore.TokenCreden // target's namespace will return errors until the flush operation completes. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - storageTargetName - Name of Storage Target. // - options - StorageTargetClientBeginFlushOptions contains the optional parameters for the StorageTargetClient.BeginFlush // method. @@ -73,7 +72,7 @@ func (client *StorageTargetClient) BeginFlush(ctx context.Context, resourceGroup // target's namespace will return errors until the flush operation completes. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *StorageTargetClient) flush(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginFlushOptions) (*http.Response, error) { req, err := client.flushCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) if err != nil { @@ -113,7 +112,7 @@ func (client *StorageTargetClient) flushCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -123,9 +122,9 @@ func (client *StorageTargetClient) flushCreateRequest(ctx context.Context, resou // end on the next request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - storageTargetName - Name of Storage Target. // - options - StorageTargetClientBeginInvalidateOptions contains the optional parameters for the StorageTargetClient.BeginInvalidate // method. @@ -147,7 +146,7 @@ func (client *StorageTargetClient) BeginInvalidate(ctx context.Context, resource // on the next request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *StorageTargetClient) invalidate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*http.Response, error) { req, err := client.invalidateCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) if err != nil { @@ -187,7 +186,7 @@ func (client *StorageTargetClient) invalidateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,9 +195,9 @@ func (client *StorageTargetClient) invalidateCreateRequest(ctx context.Context, // BeginResume - Resumes client access to a previously suspended storage target. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - storageTargetName - Name of Storage Target. // - options - StorageTargetClientBeginResumeOptions contains the optional parameters for the StorageTargetClient.BeginResume // method. @@ -219,7 +218,7 @@ func (client *StorageTargetClient) BeginResume(ctx context.Context, resourceGrou // Resume - Resumes client access to a previously suspended storage target. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *StorageTargetClient) resume(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*http.Response, error) { req, err := client.resumeCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) if err != nil { @@ -259,7 +258,7 @@ func (client *StorageTargetClient) resumeCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -268,9 +267,9 @@ func (client *StorageTargetClient) resumeCreateRequest(ctx context.Context, reso // BeginSuspend - Suspends client access to a storage target. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - storageTargetName - Name of Storage Target. // - options - StorageTargetClientBeginSuspendOptions contains the optional parameters for the StorageTargetClient.BeginSuspend // method. @@ -291,7 +290,7 @@ func (client *StorageTargetClient) BeginSuspend(ctx context.Context, resourceGro // Suspend - Suspends client access to a storage target. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *StorageTargetClient) suspend(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*http.Response, error) { req, err := client.suspendCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) if err != nil { @@ -331,7 +330,7 @@ func (client *StorageTargetClient) suspendCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client_example_test.go index 2bf9021bed2b..d2923c268abe 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Flush.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Flush.json func ExampleStorageTargetClient_BeginFlush() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -38,7 +38,7 @@ func ExampleStorageTargetClient_BeginFlush() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Suspend.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Suspend.json func ExampleStorageTargetClient_BeginSuspend() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,7 +59,7 @@ func ExampleStorageTargetClient_BeginSuspend() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Resume.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Resume.json func ExampleStorageTargetClient_BeginResume() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,7 +80,7 @@ func ExampleStorageTargetClient_BeginResume() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Invalidate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Invalidate.json func ExampleStorageTargetClient_BeginInvalidate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client.go b/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client.go index 70bcea04e460..216e0a04cb1c 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client.go @@ -29,8 +29,7 @@ type StorageTargetsClient struct { } // NewStorageTargetsClient creates a new instance of StorageTargetsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewStorageTargetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetsClient, error) { @@ -45,14 +44,14 @@ func NewStorageTargetsClient(subscriptionID string, credential azcore.TokenCrede return client, nil } -// BeginCreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down -// or unhealthy, the actual creation/modification of the Storage Target may be delayed until the Cache +// BeginCreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the cache is down +// or unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache // is healthy again. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - storageTargetName - Name of Storage Target. // - storagetarget - Object containing the definition of a Storage Target. // - options - StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate @@ -69,12 +68,12 @@ func (client *StorageTargetsClient) BeginCreateOrUpdate(ctx context.Context, res } } -// CreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or -// unhealthy, the actual creation/modification of the Storage Target may be delayed until the Cache +// CreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the cache is down or +// unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache // is healthy again. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *StorageTargetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, storagetarget StorageTarget, options *StorageTargetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, storagetarget, options) if err != nil { @@ -114,7 +113,7 @@ func (client *StorageTargetsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, storagetarget) @@ -123,9 +122,9 @@ func (client *StorageTargetsClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDNSRefresh - Tells a storage target to refresh its DNS information. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - storageTargetName - Name of Storage Target. // - options - StorageTargetsClientBeginDNSRefreshOptions contains the optional parameters for the StorageTargetsClient.BeginDNSRefresh // method. @@ -146,7 +145,7 @@ func (client *StorageTargetsClient) BeginDNSRefresh(ctx context.Context, resourc // DNSRefresh - Tells a storage target to refresh its DNS information. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *StorageTargetsClient) dNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*http.Response, error) { req, err := client.dnsRefreshCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) if err != nil { @@ -186,21 +185,21 @@ func (client *StorageTargetsClient) dnsRefreshCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDelete - Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or -// unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy -// again. Note that if the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target +// BeginDelete - Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is down or +// unhealthy, the actual removal of the Storage Target may be delayed until the cache is healthy +// again. Note that if the cache has data to flush to the Storage Target, the data will be flushed before the Storage Target // will be deleted. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - storageTargetName - Name of Storage Target. // - options - StorageTargetsClientBeginDeleteOptions contains the optional parameters for the StorageTargetsClient.BeginDelete // method. @@ -216,13 +215,13 @@ func (client *StorageTargetsClient) BeginDelete(ctx context.Context, resourceGro } } -// Delete - Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or unhealthy, -// the actual removal of the Storage Target may be delayed until the Cache is healthy -// again. Note that if the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target +// Delete - Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is down or unhealthy, +// the actual removal of the Storage Target may be delayed until the cache is healthy +// again. Note that if the cache has data to flush to the Storage Target, the data will be flushed before the Storage Target // will be deleted. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *StorageTargetsClient) deleteOperation(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) if err != nil { @@ -262,7 +261,7 @@ func (client *StorageTargetsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") if options != nil && options.Force != nil { reqQP.Set("force", *options.Force) } @@ -271,12 +270,12 @@ func (client *StorageTargetsClient) deleteCreateRequest(ctx context.Context, res return req, nil } -// Get - Returns a Storage Target from a Cache. +// Get - Returns a Storage Target from a cache. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - storageTargetName - Name of Storage Target. // - options - StorageTargetsClientGetOptions contains the optional parameters for the StorageTargetsClient.Get method. func (client *StorageTargetsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientGetOptions) (StorageTargetsClientGetResponse, error) { @@ -318,7 +317,7 @@ func (client *StorageTargetsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -333,11 +332,11 @@ func (client *StorageTargetsClient) getHandleResponse(resp *http.Response) (Stor return result, nil } -// NewListByCachePager - Returns a list of Storage Targets for the specified Cache. +// NewListByCachePager - Returns a list of Storage Targets for the specified cache. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - options - StorageTargetsClientListByCacheOptions contains the optional parameters for the StorageTargetsClient.NewListByCachePager // method. func (client *StorageTargetsClient) NewListByCachePager(resourceGroupName string, cacheName string, options *StorageTargetsClientListByCacheOptions) *runtime.Pager[StorageTargetsClientListByCacheResponse] { @@ -388,7 +387,7 @@ func (client *StorageTargetsClient) listByCacheCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -406,9 +405,9 @@ func (client *StorageTargetsClient) listByCacheHandleResponse(resp *http.Respons // BeginRestoreDefaults - Tells a storage target to restore its settings to their default values. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 -// - resourceGroupName - Target resource group. -// - cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. // - storageTargetName - Name of Storage Target. // - options - StorageTargetsClientBeginRestoreDefaultsOptions contains the optional parameters for the StorageTargetsClient.BeginRestoreDefaults // method. @@ -429,7 +428,7 @@ func (client *StorageTargetsClient) BeginRestoreDefaults(ctx context.Context, re // RestoreDefaults - Tells a storage target to restore its settings to their default values. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 func (client *StorageTargetsClient) restoreDefaults(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginRestoreDefaultsOptions) (*http.Response, error) { req, err := client.restoreDefaultsCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) if err != nil { @@ -469,7 +468,7 @@ func (client *StorageTargetsClient) restoreDefaultsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client_example_test.go index 3cbf13f393c2..30f6ae69959a 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/storagecache/armstoragecache/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_DnsRefresh.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_DnsRefresh.json func ExampleStorageTargetsClient_BeginDNSRefresh() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -39,7 +39,7 @@ func ExampleStorageTargetsClient_BeginDNSRefresh() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_ListByCache.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_ListByCache.json func ExampleStorageTargetsClient_NewListByCachePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -160,7 +160,7 @@ func ExampleStorageTargetsClient_NewListByCachePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Delete.json func ExampleStorageTargetsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -181,7 +181,7 @@ func ExampleStorageTargetsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Get.json func ExampleStorageTargetsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -236,7 +236,7 @@ func ExampleStorageTargetsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate.json func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -317,7 +317,7 @@ func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdat // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdateBlobNfs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -382,7 +382,7 @@ func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdat // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdateNoJunctions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -437,7 +437,7 @@ func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdat // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_RestoreDefaults.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_RestoreDefaults.json func ExampleStorageTargetsClient_BeginRestoreDefaults() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client.go b/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client.go index 6a2a6d7a3d65..134756ccc631 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client.go @@ -29,8 +29,7 @@ type UsageModelsClient struct { } // NewUsageModelsClient creates a new instance of UsageModelsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewUsageModelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsageModelsClient, error) { @@ -45,9 +44,9 @@ func NewUsageModelsClient(subscriptionID string, credential azcore.TokenCredenti return client, nil } -// NewListPager - Get the list of Cache Usage Models available to this subscription. +// NewListPager - Get the list of cache usage models available to this subscription. // -// Generated from API version 2023-01-01 +// Generated from API version 2023-05-01 // - options - UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.NewListPager method. func (client *UsageModelsClient) NewListPager(options *UsageModelsClientListOptions) *runtime.Pager[UsageModelsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[UsageModelsClientListResponse]{ @@ -89,7 +88,7 @@ func (client *UsageModelsClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-01-01") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client_example_test.go index a61648d7450e..e5095a870cc0 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/402006d2796cdd3894d013d83e77b46a5c844005/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/UsageModels_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/UsageModels_List.json func ExampleUsageModelsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { From ec6aeca2db9d00309dd675498e353d205c330026 Mon Sep 17 00:00:00 2001 From: Alancere <804873052@qq.com> Date: Wed, 14 Jun 2023 10:05:21 +0800 Subject: [PATCH 2/2] update --- .../storagecache/armstoragecache/CHANGELOG.md | 7 +--- .../amlfilesystems_client_example_test.go | 18 ++++----- .../ascoperations_client_example_test.go | 4 +- .../ascusages_client_example_test.go | 4 +- .../storagecache/armstoragecache/autorest.md | 6 +-- .../caches_client_example_test.go | 40 +++++++++---------- .../storagecache/armstoragecache/constants.go | 2 +- .../storagecache/armstoragecache/go.mod | 2 +- .../management_client_example_test.go | 6 +-- .../storagecache/armstoragecache/models.go | 10 +---- .../armstoragecache/models_serde.go | 31 -------------- .../operations_client_example_test.go | 4 +- .../skus_client_example_test.go | 4 +- .../storagetarget_client_example_test.go | 10 ++--- .../storagetargets_client_example_test.go | 18 ++++----- .../usagemodels_client_example_test.go | 4 +- 16 files changed, 63 insertions(+), 107 deletions(-) diff --git a/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md b/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md index dc96522b8165..b44a6a53f36a 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md +++ b/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md @@ -1,10 +1,6 @@ # Release History -## 4.0.0 (2023-06-23) -### Breaking Changes - -- Type of `CacheIdentity.UserAssignedIdentities` has been changed from `map[string]*UserAssignedIdentitiesValue` to `map[string]*UserAssignedIdentitiesValueAutoGenerated` - +## 3.2.0 (2023-06-23) ### Features Added - New enum type `AmlFilesystemHealthStateType` with values `AmlFilesystemHealthStateTypeAvailable`, `AmlFilesystemHealthStateTypeDegraded`, `AmlFilesystemHealthStateTypeMaintenance`, `AmlFilesystemHealthStateTypeTransitioning`, `AmlFilesystemHealthStateTypeUnavailable` @@ -52,7 +48,6 @@ - New struct `Resource` - New struct `SKUName` - New struct `TrackedResource` -- New struct `UserAssignedIdentitiesValueAutoGenerated` ## 3.1.0 (2023-04-07) diff --git a/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client_example_test.go index e1eb8f6e3c54..527159106d8f 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/amlfilesystems_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_List.json func ExampleAmlFilesystemsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -184,7 +184,7 @@ func ExampleAmlFilesystemsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_ListByResourceGroup.json func ExampleAmlFilesystemsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -350,7 +350,7 @@ func ExampleAmlFilesystemsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Delete.json func ExampleAmlFilesystemsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -371,7 +371,7 @@ func ExampleAmlFilesystemsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Get.json func ExampleAmlFilesystemsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -460,7 +460,7 @@ func ExampleAmlFilesystemsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_CreateOrUpdate.json func ExampleAmlFilesystemsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -584,7 +584,7 @@ func ExampleAmlFilesystemsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Update.json func ExampleAmlFilesystemsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -695,7 +695,7 @@ func ExampleAmlFilesystemsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Archive.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Archive.json func ExampleAmlFilesystemsClient_Archive() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -715,7 +715,7 @@ func ExampleAmlFilesystemsClient_Archive() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_CancelArchive.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_CancelArchive.json func ExampleAmlFilesystemsClient_CancelArchive() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client_example_test.go index c14e1b834392..b51c819fdc7b 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/ascoperations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/AscOperations_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/AscOperations_Get.json func ExampleAscOperationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client_example_test.go index 158b17bcb86e..dead62e3080c 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/ascusages_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/AscResourceUsages_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/AscResourceUsages_Get.json func ExampleAscUsagesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/autorest.md b/sdk/resourcemanager/storagecache/armstoragecache/autorest.md index d214222e9d60..057897b265fe 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/autorest.md +++ b/sdk/resourcemanager/storagecache/armstoragecache/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 4.0.0 +module-version: 3.2.0 tag: package-2023-05 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/storagecache/armstoragecache/caches_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/caches_client_example_test.go index 28afae118fab..e6d239e61cdd 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/caches_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/caches_client_example_test.go @@ -17,10 +17,10 @@ import ( "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/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_List.json func ExampleCachesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -286,7 +286,7 @@ func ExampleCachesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_ListByResourceGroup.json func ExampleCachesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -554,7 +554,7 @@ func ExampleCachesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Delete.json func ExampleCachesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -575,7 +575,7 @@ func ExampleCachesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Get.json func ExampleCachesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -728,7 +728,7 @@ func ExampleCachesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_CreateOrUpdate.json func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -742,7 +742,7 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdate() { poller, err := clientFactory.NewCachesClient().BeginCreateOrUpdate(ctx, "scgroup", "sc1", armstoragecache.Cache{ Identity: &armstoragecache.CacheIdentity{ Type: to.Ptr(armstoragecache.CacheIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValueAutoGenerated{ + UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, @@ -941,7 +941,7 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_CreateOrUpdate_ldap_only.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_CreateOrUpdate_ldap_only.json func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdateLdapOnly() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1129,7 +1129,7 @@ func ExampleCachesClient_BeginCreateOrUpdate_cachesCreateOrUpdateLdapOnly() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Update.json func ExampleCachesClient_BeginUpdate_cachesUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1385,7 +1385,7 @@ func ExampleCachesClient_BeginUpdate_cachesUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Update_ldap_only.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Update_ldap_only.json func ExampleCachesClient_BeginUpdate_cachesUpdateLdapOnly() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1621,7 +1621,7 @@ func ExampleCachesClient_BeginUpdate_cachesUpdateLdapOnly() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_DebugInfo.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_DebugInfo.json func ExampleCachesClient_BeginDebugInfo() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1642,7 +1642,7 @@ func ExampleCachesClient_BeginDebugInfo() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Flush.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Flush.json func ExampleCachesClient_BeginFlush() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1663,7 +1663,7 @@ func ExampleCachesClient_BeginFlush() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Start.json func ExampleCachesClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1684,7 +1684,7 @@ func ExampleCachesClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Stop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Stop.json func ExampleCachesClient_BeginStop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1705,7 +1705,7 @@ func ExampleCachesClient_BeginStop() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StartPrimingJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StartPrimingJob.json func ExampleCachesClient_BeginStartPrimingJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1730,7 +1730,7 @@ func ExampleCachesClient_BeginStartPrimingJob() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StopPrimingJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StopPrimingJob.json func ExampleCachesClient_BeginStopPrimingJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1754,7 +1754,7 @@ func ExampleCachesClient_BeginStopPrimingJob() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/PausePrimingJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/PausePrimingJob.json func ExampleCachesClient_BeginPausePrimingJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1778,7 +1778,7 @@ func ExampleCachesClient_BeginPausePrimingJob() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/ResumePrimingJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/ResumePrimingJob.json func ExampleCachesClient_BeginResumePrimingJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1802,7 +1802,7 @@ func ExampleCachesClient_BeginResumePrimingJob() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_UpgradeFirmware.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_UpgradeFirmware.json func ExampleCachesClient_BeginUpgradeFirmware() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1823,7 +1823,7 @@ func ExampleCachesClient_BeginUpgradeFirmware() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/SpaceAllocation_Post.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/SpaceAllocation_Post.json func ExampleCachesClient_BeginSpaceAllocation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/constants.go b/sdk/resourcemanager/storagecache/armstoragecache/constants.go index 0c3cb0edc4f8..7e99d986d4f1 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/constants.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/constants.go @@ -11,7 +11,7 @@ package armstoragecache const ( moduleName = "armstoragecache" - moduleVersion = "v4.0.0" + moduleVersion = "v3.2.0" ) // AmlFilesystemHealthStateType - List of AML file system health states. diff --git a/sdk/resourcemanager/storagecache/armstoragecache/go.mod b/sdk/resourcemanager/storagecache/armstoragecache/go.mod index c85339917d5e..dac92373893c 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/go.mod +++ b/sdk/resourcemanager/storagecache/armstoragecache/go.mod @@ -1,4 +1,4 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3 go 1.18 diff --git a/sdk/resourcemanager/storagecache/armstoragecache/management_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/management_client_example_test.go index 58a81bd07c2d..b1e5777c346b 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/management_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/management_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/checkAmlFSSubnets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/checkAmlFSSubnets.json func ExampleManagementClient_CheckAmlFSSubnets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -42,7 +42,7 @@ func ExampleManagementClient_CheckAmlFSSubnets() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/getRequiredAmlFSSubnetsSize.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/getRequiredAmlFSSubnetsSize.json func ExampleManagementClient_GetRequiredAmlFSSubnetsSize() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/models.go b/sdk/resourcemanager/storagecache/armstoragecache/models.go index 01e67d7b8879..750b927d5aac 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/models.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/models.go @@ -536,7 +536,7 @@ type CacheIdentity struct { Type *CacheIdentityType // A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary. - UserAssignedIdentities map[string]*UserAssignedIdentitiesValueAutoGenerated + UserAssignedIdentities map[string]*UserAssignedIdentitiesValue // READ-ONLY; The principal ID for the system-assigned identity of the cache. PrincipalID *string @@ -1425,11 +1425,3 @@ type UserAssignedIdentitiesValue struct { // READ-ONLY; The principal ID of the user-assigned identity. PrincipalID *string } - -type UserAssignedIdentitiesValueAutoGenerated struct { - // READ-ONLY; The client ID of the user-assigned identity. - ClientID *string - - // READ-ONLY; The principal ID of the user-assigned identity. - PrincipalID *string -} diff --git a/sdk/resourcemanager/storagecache/armstoragecache/models_serde.go b/sdk/resourcemanager/storagecache/armstoragecache/models_serde.go index b6eaf7619da3..99e415b054ce 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/models_serde.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/models_serde.go @@ -3093,37 +3093,6 @@ func (u *UserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentitiesValueAutoGenerated. -func (u UserAssignedIdentitiesValueAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientId", u.ClientID) - populate(objectMap, "principalId", u.PrincipalID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentitiesValueAutoGenerated. -func (u *UserAssignedIdentitiesValueAutoGenerated) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &u.ClientID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &u.PrincipalID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - func populate(m map[string]any, k string, v any) { if v == nil { return diff --git a/sdk/resourcemanager/storagecache/armstoragecache/operations_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/operations_client_example_test.go index 8d96b8e5a464..bc14051a0bcd 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/operations_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/operations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Operations_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Operations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/skus_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/skus_client_example_test.go index 1369e11ffdc0..ce59cbfb7611 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/skus_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/skus_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Skus_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Skus_List.json func ExampleSKUsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client_example_test.go index d2923c268abe..637da81472ec 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/storagetarget_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Flush.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Flush.json func ExampleStorageTargetClient_BeginFlush() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -38,7 +38,7 @@ func ExampleStorageTargetClient_BeginFlush() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Suspend.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Suspend.json func ExampleStorageTargetClient_BeginSuspend() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,7 +59,7 @@ func ExampleStorageTargetClient_BeginSuspend() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Resume.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Resume.json func ExampleStorageTargetClient_BeginResume() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,7 +80,7 @@ func ExampleStorageTargetClient_BeginResume() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Invalidate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Invalidate.json func ExampleStorageTargetClient_BeginInvalidate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client_example_test.go index 30f6ae69959a..825eabbe08cb 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/storagetargets_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_DnsRefresh.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_DnsRefresh.json func ExampleStorageTargetsClient_BeginDNSRefresh() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -39,7 +39,7 @@ func ExampleStorageTargetsClient_BeginDNSRefresh() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_ListByCache.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_ListByCache.json func ExampleStorageTargetsClient_NewListByCachePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -160,7 +160,7 @@ func ExampleStorageTargetsClient_NewListByCachePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Delete.json func ExampleStorageTargetsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -181,7 +181,7 @@ func ExampleStorageTargetsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Get.json func ExampleStorageTargetsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -236,7 +236,7 @@ func ExampleStorageTargetsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate.json func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -317,7 +317,7 @@ func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdat // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdateBlobNfs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -382,7 +382,7 @@ func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdat // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdateNoJunctions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -437,7 +437,7 @@ func ExampleStorageTargetsClient_BeginCreateOrUpdate_storageTargetsCreateOrUpdat // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_RestoreDefaults.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_RestoreDefaults.json func ExampleStorageTargetsClient_BeginRestoreDefaults() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client_example_test.go b/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client_example_test.go index e5095a870cc0..1e61270ee059 100644 --- a/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client_example_test.go +++ b/sdk/resourcemanager/storagecache/armstoragecache/usagemodels_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1b33e81bbdc28fcd6644a1315b8d7b1b6d030590/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/UsageModels_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e2b5f9323c4214408969a6e953b4075cfdc693b6/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/UsageModels_List.json func ExampleUsageModelsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {