From 163fbab53a59e5629e11c1793a9e906f801cbedc Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Fri, 26 Apr 2024 10:11:11 +0000 Subject: [PATCH] Update Azure storage api version to 2022-05-01 Signed-off-by: Jeremi Piotrowski --- cmd/plume/prerelease.go | 2 +- platform/api/azure/api.go | 2 +- platform/api/azure/storage.go | 2 +- .../storage/CHANGELOG.md | 0 .../storage/_meta.json | 8 +- .../storage/accounts.go | 240 +++++- .../storage/blobcontainers.go | 128 +++- .../storage/blobinventorypolicies.go | 9 +- .../storage/blobservices.go | 6 +- .../storage/client.go | 2 +- .../storage/deletedaccounts.go | 4 +- .../storage/encryptionscopes.go | 8 +- .../storage/enums.go | 334 ++++++-- .../storage/fileservices.go | 6 +- .../storage/fileshares.go | 165 +++- .../mgmt/2022-05-01/storage/localusers.go | 610 +++++++++++++++ .../storage/managementpolicies.go | 6 +- .../storage/models.go | 711 +++++++++++++++++- .../storage/objectreplicationpolicies.go | 23 +- .../storage/operations.go | 2 +- .../storage/privateendpointconnections.go | 8 +- .../storage/privatelinkresources.go | 2 +- .../storage/queue.go | 10 +- .../storage/queueservices.go | 6 +- .../storage/skus.go | 2 +- .../storage/table.go | 34 +- .../storage/tableservices.go | 6 +- .../storage/usages.go | 2 +- .../storage/version.go | 2 +- vendor/modules.txt | 2 +- 30 files changed, 2109 insertions(+), 233 deletions(-) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/CHANGELOG.md (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/_meta.json (73%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/accounts.go (84%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/blobcontainers.go (92%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/blobinventorypolicies.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/blobservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/client.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/deletedaccounts.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/encryptionscopes.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/enums.go (71%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/fileservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/fileshares.go (81%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/localusers.go rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/managementpolicies.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/models.go (82%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/objectreplicationpolicies.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/operations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/privateendpointconnections.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/privatelinkresources.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/queue.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/queueservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/skus.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/table.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/tableservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/usages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-01-01 => 2022-05-01}/storage/version.go (90%) diff --git a/cmd/plume/prerelease.go b/cmd/plume/prerelease.go index 787f290cc..e0ec910a9 100644 --- a/cmd/plume/prerelease.go +++ b/cmd/plume/prerelease.go @@ -28,7 +28,7 @@ import ( "sort" "strings" - azurestorage "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage" + azurestorage "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage" "github.com/Microsoft/azure-vhd-utils/vhdcore/validator" "github.com/spf13/cobra" "golang.org/x/net/context" diff --git a/platform/api/azure/api.go b/platform/api/azure/api.go index e2ecf4328..151bf9274 100644 --- a/platform/api/azure/api.go +++ b/platform/api/azure/api.go @@ -29,7 +29,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network" "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-10-01/resources" "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2021-01-01/subscriptions" - armStorage "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage" + armStorage "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage" "github.com/Azure/azure-sdk-for-go/storage" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure/auth" diff --git a/platform/api/azure/storage.go b/platform/api/azure/storage.go index b9b5ca32d..a4bc3ddda 100644 --- a/platform/api/azure/storage.go +++ b/platform/api/azure/storage.go @@ -24,7 +24,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/classic/management" "github.com/Azure/azure-sdk-for-go/services/classic/management/storageservice" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage" ) var ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/CHANGELOG.md similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/CHANGELOG.md rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/CHANGELOG.md diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/_meta.json similarity index 73% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/_meta.json rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/_meta.json index 0108ce774..b4946a6af 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/_meta.json +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/_meta.json @@ -1,10 +1,10 @@ { - "commit": "92ab22b49bd085116af0c61fada2c6c360702e9e", + "commit": "1c8d7850afbec9ede6de6f2d14bcc30896a74ed6", "readme": "/_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", - "tag": "package-2021-01", - "use": "@microsoft.azure/autorest.go@2.1.187", + "tag": "package-2022-05", + "use": "@microsoft.azure/autorest.go@2.1.188", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.188 --tag=package-2022-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/accounts.go similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/accounts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/accounts.go index 1773e1e93..b248c8fe5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/accounts.go @@ -31,6 +31,99 @@ func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) Account return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } +// AbortHierarchicalNamespaceMigration abort live Migration of storage account to enable Hns +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client AccountsClient) AbortHierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string) (result AccountsAbortHierarchicalNamespaceMigrationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.AbortHierarchicalNamespaceMigration") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.AccountsClient", "AbortHierarchicalNamespaceMigration", err.Error()) + } + + req, err := client.AbortHierarchicalNamespaceMigrationPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "AbortHierarchicalNamespaceMigration", nil, "Failure preparing request") + return + } + + result, err = client.AbortHierarchicalNamespaceMigrationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "AbortHierarchicalNamespaceMigration", result.Response(), "Failure sending request") + return + } + + return +} + +// AbortHierarchicalNamespaceMigrationPreparer prepares the AbortHierarchicalNamespaceMigration request. +func (client AccountsClient) AbortHierarchicalNamespaceMigrationPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/aborthnsonmigration", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AbortHierarchicalNamespaceMigrationSender sends the AbortHierarchicalNamespaceMigration request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) AbortHierarchicalNamespaceMigrationSender(req *http.Request) (future AccountsAbortHierarchicalNamespaceMigrationFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// AbortHierarchicalNamespaceMigrationResponder handles the response to the AbortHierarchicalNamespaceMigration request. The method always +// closes the http.Response Body. +func (client AccountsClient) AbortHierarchicalNamespaceMigrationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // CheckNameAvailability checks that the storage account name is valid and is not already in use. // Parameters: // accountName - the name of the storage account within the specified resource group. Storage account names @@ -83,7 +176,7 @@ func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -149,16 +242,26 @@ func (client AccountsClient) Create(ctx context.Context, resourceGroupName strin Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.AccountPropertiesCreateParameters", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.CustomDomain", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.CustomDomain.Name", Name: validation.Null, Rule: true, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.SasPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.SasPolicy.SasExpirationPeriod", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AccountPropertiesCreateParameters.SasPolicy.ExpirationAction", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.AccountPropertiesCreateParameters.KeyPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.KeyPolicy.KeyExpirationPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.AccountPropertiesCreateParameters.CustomDomain", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.CustomDomain.Name", Name: validation.Null, Rule: true, Chain: nil}}}, {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.DomainName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.NetBiosDomainName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.ForestName", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.DomainGUID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.DomainSid", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.AzureStorageSid", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning.ImmutabilityPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning.ImmutabilityPolicy.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning.ImmutabilityPolicy.ImmutabilityPeriodSinceCreationInDays", Name: validation.InclusiveMaximum, Rule: int64(146000), Chain: nil}, + {Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning.ImmutabilityPolicy.ImmutabilityPeriodSinceCreationInDays", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, }}, }}, }}}}, @@ -190,7 +293,7 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -293,7 +396,7 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -378,7 +481,7 @@ func (client AccountsClient) FailoverPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -481,7 +584,7 @@ func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -515,6 +618,103 @@ func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result return } +// HierarchicalNamespaceMigration live Migration of storage account to enable Hns +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// requestType - required. Hierarchical namespace migration type can either be a hierarchical namespace +// validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation +// request will validate the migration whereas the hydration request will migrate the account. +func (client AccountsClient) HierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, requestType string) (result AccountsHierarchicalNamespaceMigrationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.HierarchicalNamespaceMigration") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.AccountsClient", "HierarchicalNamespaceMigration", err.Error()) + } + + req, err := client.HierarchicalNamespaceMigrationPreparer(ctx, resourceGroupName, accountName, requestType) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "HierarchicalNamespaceMigration", nil, "Failure preparing request") + return + } + + result, err = client.HierarchicalNamespaceMigrationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "HierarchicalNamespaceMigration", result.Response(), "Failure sending request") + return + } + + return +} + +// HierarchicalNamespaceMigrationPreparer prepares the HierarchicalNamespaceMigration request. +func (client AccountsClient) HierarchicalNamespaceMigrationPreparer(ctx context.Context, resourceGroupName string, accountName string, requestType string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "requestType": autorest.Encode("query", requestType), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/hnsonmigration", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// HierarchicalNamespaceMigrationSender sends the HierarchicalNamespaceMigration request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) HierarchicalNamespaceMigrationSender(req *http.Request) (future AccountsHierarchicalNamespaceMigrationFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// HierarchicalNamespaceMigrationResponder handles the response to the HierarchicalNamespaceMigration request. The method always +// closes the http.Response Body. +func (client AccountsClient) HierarchicalNamespaceMigrationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // List lists all the storage accounts available under the subscription. Note that storage keys are not returned; use // the ListKeys operation for this. func (client AccountsClient) List(ctx context.Context) (result AccountListResultPage, err error) { @@ -567,7 +767,7 @@ func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -698,7 +898,7 @@ func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -791,7 +991,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -920,7 +1120,7 @@ func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1019,7 +1219,7 @@ func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1115,7 +1315,7 @@ func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1205,7 +1405,7 @@ func (client AccountsClient) RestoreBlobRangesPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1308,7 +1508,7 @@ func (client AccountsClient) RevokeUserDelegationKeysPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1404,7 +1604,7 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/blobcontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/blobcontainers.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/blobcontainers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/blobcontainers.go index 19cc2942b..65c026678 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/blobcontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/blobcontainers.go @@ -102,7 +102,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -206,7 +206,7 @@ func (client BlobContainersClient) CreatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -315,7 +315,7 @@ func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -422,7 +422,7 @@ func (client BlobContainersClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -526,7 +526,7 @@ func (client BlobContainersClient) DeleteImmutabilityPolicyPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -633,7 +633,7 @@ func (client BlobContainersClient) ExtendImmutabilityPolicyPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -737,7 +737,7 @@ func (client BlobContainersClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -840,7 +840,7 @@ func (client BlobContainersClient) GetImmutabilityPolicyPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -944,7 +944,7 @@ func (client BlobContainersClient) LeasePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1049,7 +1049,7 @@ func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1197,7 +1197,7 @@ func (client BlobContainersClient) LockImmutabilityPolicyPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1229,6 +1229,108 @@ func (client BlobContainersClient) LockImmutabilityPolicyResponder(resp *http.Re return } +// ObjectLevelWorm this operation migrates a blob container from container level WORM to object level immutability +// enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, +// Account level versioning must be enabled and there should be no Legal hold on the container. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// containerName - the name of the blob container within the specified storage account. Blob container names +// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every +// dash (-) character must be immediately preceded and followed by a letter or number. +func (client BlobContainersClient) ObjectLevelWorm(ctx context.Context, resourceGroupName string, accountName string, containerName string) (result BlobContainersObjectLevelWormFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.ObjectLevelWorm") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: containerName, + Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.BlobContainersClient", "ObjectLevelWorm", err.Error()) + } + + req, err := client.ObjectLevelWormPreparer(ctx, resourceGroupName, accountName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ObjectLevelWorm", nil, "Failure preparing request") + return + } + + result, err = client.ObjectLevelWormSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ObjectLevelWorm", result.Response(), "Failure sending request") + return + } + + return +} + +// ObjectLevelWormPreparer prepares the ObjectLevelWorm request. +func (client BlobContainersClient) ObjectLevelWormPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/migrate", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ObjectLevelWormSender sends the ObjectLevelWorm request. The method will close the +// http.Response Body if it receives an error. +func (client BlobContainersClient) ObjectLevelWormSender(req *http.Request) (future BlobContainersObjectLevelWormFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ObjectLevelWormResponder handles the response to the ObjectLevelWorm request. The method always +// closes the http.Response Body. +func (client BlobContainersClient) ObjectLevelWormResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // SetLegalHold sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an // append pattern and does not clear out the existing tags that are not specified in the request. // Parameters: @@ -1300,7 +1402,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1403,7 +1505,7 @@ func (client BlobContainersClient) UpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/blobinventorypolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/blobinventorypolicies.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/blobinventorypolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/blobinventorypolicies.go index f99f64c47..f52512e48 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/blobinventorypolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/blobinventorypolicies.go @@ -64,7 +64,6 @@ func (client BlobInventoryPoliciesClient) CreateOrUpdate(ctx context.Context, re Constraints: []validation.Constraint{{Target: "properties.BlobInventoryPolicyProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "properties.BlobInventoryPolicyProperties.Policy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "properties.BlobInventoryPolicyProperties.Policy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "properties.BlobInventoryPolicyProperties.Policy.Destination", Name: validation.Null, Rule: true, Chain: nil}, {Target: "properties.BlobInventoryPolicyProperties.Policy.Type", Name: validation.Null, Rule: true, Chain: nil}, {Target: "properties.BlobInventoryPolicyProperties.Policy.Rules", Name: validation.Null, Rule: true, Chain: nil}, }}, @@ -103,7 +102,7 @@ func (client BlobInventoryPoliciesClient) CreateOrUpdatePreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -197,7 +196,7 @@ func (client BlobInventoryPoliciesClient) DeletePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -288,7 +287,7 @@ func (client BlobInventoryPoliciesClient) GetPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -379,7 +378,7 @@ func (client BlobInventoryPoliciesClient) ListPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/blobservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/blobservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/blobservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/blobservices.go index 1f463553e..7528b02c3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/blobservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/blobservices.go @@ -93,7 +93,7 @@ func (client BlobServicesClient) GetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client BlobServicesClient) ListPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -309,7 +309,7 @@ func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/client.go index 0bb2f318f..5053dbd8b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/client.go @@ -1,6 +1,6 @@ // Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. // -// Package storage implements the Azure ARM Storage service API version 2021-01-01. +// Package storage implements the Azure ARM Storage service API version 2022-05-01. // // The Azure Storage Management API. package storage diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/deletedaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/deletedaccounts.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/deletedaccounts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/deletedaccounts.go index b0aa191a3..07db576b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/deletedaccounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/deletedaccounts.go @@ -85,7 +85,7 @@ func (client DeletedAccountsClient) GetPreparer(ctx context.Context, deletedAcco "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -167,7 +167,7 @@ func (client DeletedAccountsClient) ListPreparer(ctx context.Context) (*http.Req "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/encryptionscopes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/encryptionscopes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/encryptionscopes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/encryptionscopes.go index 06aba107f..a1eaef9dd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/encryptionscopes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/encryptionscopes.go @@ -99,7 +99,7 @@ func (client EncryptionScopesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -195,7 +195,7 @@ func (client EncryptionScopesClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -332,7 +332,7 @@ func (client EncryptionScopesClient) PatchPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -435,7 +435,7 @@ func (client EncryptionScopesClient) PutPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/enums.go similarity index 71% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/enums.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/enums.go index 8dad5f099..920f9e222 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/enums.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/enums.go @@ -14,11 +14,13 @@ const ( Cool AccessTier = "Cool" // Hot ... Hot AccessTier = "Hot" + // Premium ... + Premium AccessTier = "Premium" ) // PossibleAccessTierValues returns an array of possible values for the AccessTier const type. func PossibleAccessTierValues() []AccessTier { - return []AccessTier{Cool, Hot} + return []AccessTier{Cool, Hot, Premium} } // AccountExpand enumerates the values for account expand. @@ -36,6 +38,23 @@ func PossibleAccountExpandValues() []AccountExpand { return []AccountExpand{AccountExpandBlobRestoreStatus, AccountExpandGeoReplicationStats} } +// AccountImmutabilityPolicyState enumerates the values for account immutability policy state. +type AccountImmutabilityPolicyState string + +const ( + // Disabled ... + Disabled AccountImmutabilityPolicyState = "Disabled" + // Locked ... + Locked AccountImmutabilityPolicyState = "Locked" + // Unlocked ... + Unlocked AccountImmutabilityPolicyState = "Unlocked" +) + +// PossibleAccountImmutabilityPolicyStateValues returns an array of possible values for the AccountImmutabilityPolicyState const type. +func PossibleAccountImmutabilityPolicyStateValues() []AccountImmutabilityPolicyState { + return []AccountImmutabilityPolicyState{Disabled, Locked, Unlocked} +} + // AccountStatus enumerates the values for account status. type AccountStatus string @@ -51,6 +70,21 @@ func PossibleAccountStatusValues() []AccountStatus { return []AccountStatus{Available, Unavailable} } +// AccountType enumerates the values for account type. +type AccountType string + +const ( + // Computer ... + Computer AccountType = "Computer" + // User ... + User AccountType = "User" +) + +// PossibleAccountTypeValues returns an array of possible values for the AccountType const type. +func PossibleAccountTypeValues() []AccountType { + return []AccountType{Computer, User} +} + // Action enumerates the values for action. type Action string @@ -64,25 +98,46 @@ func PossibleActionValues() []Action { return []Action{Allow} } -// Action1 enumerates the values for action 1. -type Action1 string +// AllowedCopyScope enumerates the values for allowed copy scope. +type AllowedCopyScope string const ( - // Acquire ... - Acquire Action1 = "Acquire" - // Break ... - Break Action1 = "Break" - // Change ... - Change Action1 = "Change" - // Release ... - Release Action1 = "Release" - // Renew ... - Renew Action1 = "Renew" + // AAD ... + AAD AllowedCopyScope = "AAD" + // PrivateLink ... + PrivateLink AllowedCopyScope = "PrivateLink" ) -// PossibleAction1Values returns an array of possible values for the Action1 const type. -func PossibleAction1Values() []Action1 { - return []Action1{Acquire, Break, Change, Release, Renew} +// PossibleAllowedCopyScopeValues returns an array of possible values for the AllowedCopyScope const type. +func PossibleAllowedCopyScopeValues() []AllowedCopyScope { + return []AllowedCopyScope{AAD, PrivateLink} +} + +// AllowedMethods enumerates the values for allowed methods. +type AllowedMethods string + +const ( + // DELETE ... + DELETE AllowedMethods = "DELETE" + // GET ... + GET AllowedMethods = "GET" + // HEAD ... + HEAD AllowedMethods = "HEAD" + // MERGE ... + MERGE AllowedMethods = "MERGE" + // OPTIONS ... + OPTIONS AllowedMethods = "OPTIONS" + // PATCH ... + PATCH AllowedMethods = "PATCH" + // POST ... + POST AllowedMethods = "POST" + // PUT ... + PUT AllowedMethods = "PUT" +) + +// PossibleAllowedMethodsValues returns an array of possible values for the AllowedMethods const type. +func PossibleAllowedMethodsValues() []AllowedMethods { + return []AllowedMethods{DELETE, GET, HEAD, MERGE, OPTIONS, PATCH, POST, PUT} } // BlobRestoreProgressStatus enumerates the values for blob restore progress status. @@ -125,19 +180,19 @@ func PossibleBypassValues() []Bypass { type CreatedByType string const ( - // Application ... - Application CreatedByType = "Application" - // Key ... - Key CreatedByType = "Key" - // ManagedIdentity ... - ManagedIdentity CreatedByType = "ManagedIdentity" - // User ... - User CreatedByType = "User" + // CreatedByTypeApplication ... + CreatedByTypeApplication CreatedByType = "Application" + // CreatedByTypeKey ... + CreatedByTypeKey CreatedByType = "Key" + // CreatedByTypeManagedIdentity ... + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + // CreatedByTypeUser ... + CreatedByTypeUser CreatedByType = "User" ) // PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type. func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{Application, Key, ManagedIdentity, User} + return []CreatedByType{CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser} } // DefaultAction enumerates the values for default action. @@ -155,12 +210,33 @@ func PossibleDefaultActionValues() []DefaultAction { return []DefaultAction{DefaultActionAllow, DefaultActionDeny} } +// DefaultSharePermission enumerates the values for default share permission. +type DefaultSharePermission string + +const ( + // DefaultSharePermissionNone ... + DefaultSharePermissionNone DefaultSharePermission = "None" + // DefaultSharePermissionStorageFileDataSmbShareContributor ... + DefaultSharePermissionStorageFileDataSmbShareContributor DefaultSharePermission = "StorageFileDataSmbShareContributor" + // DefaultSharePermissionStorageFileDataSmbShareElevatedContributor ... + DefaultSharePermissionStorageFileDataSmbShareElevatedContributor DefaultSharePermission = "StorageFileDataSmbShareElevatedContributor" + // DefaultSharePermissionStorageFileDataSmbShareReader ... + DefaultSharePermissionStorageFileDataSmbShareReader DefaultSharePermission = "StorageFileDataSmbShareReader" +) + +// PossibleDefaultSharePermissionValues returns an array of possible values for the DefaultSharePermission const type. +func PossibleDefaultSharePermissionValues() []DefaultSharePermission { + return []DefaultSharePermission{DefaultSharePermissionNone, DefaultSharePermissionStorageFileDataSmbShareContributor, DefaultSharePermissionStorageFileDataSmbShareElevatedContributor, DefaultSharePermissionStorageFileDataSmbShareReader} +} + // DirectoryServiceOptions enumerates the values for directory service options. type DirectoryServiceOptions string const ( // DirectoryServiceOptionsAADDS ... DirectoryServiceOptionsAADDS DirectoryServiceOptions = "AADDS" + // DirectoryServiceOptionsAADKERB ... + DirectoryServiceOptionsAADKERB DirectoryServiceOptions = "AADKERB" // DirectoryServiceOptionsAD ... DirectoryServiceOptionsAD DirectoryServiceOptions = "AD" // DirectoryServiceOptionsNone ... @@ -169,7 +245,22 @@ const ( // PossibleDirectoryServiceOptionsValues returns an array of possible values for the DirectoryServiceOptions const type. func PossibleDirectoryServiceOptionsValues() []DirectoryServiceOptions { - return []DirectoryServiceOptions{DirectoryServiceOptionsAADDS, DirectoryServiceOptionsAD, DirectoryServiceOptionsNone} + return []DirectoryServiceOptions{DirectoryServiceOptionsAADDS, DirectoryServiceOptionsAADKERB, DirectoryServiceOptionsAD, DirectoryServiceOptionsNone} +} + +// DNSEndpointType enumerates the values for dns endpoint type. +type DNSEndpointType string + +const ( + // AzureDNSZone ... + AzureDNSZone DNSEndpointType = "AzureDnsZone" + // Standard ... + Standard DNSEndpointType = "Standard" +) + +// PossibleDNSEndpointTypeValues returns an array of possible values for the DNSEndpointType const type. +func PossibleDNSEndpointTypeValues() []DNSEndpointType { + return []DNSEndpointType{AzureDNSZone, Standard} } // EnabledProtocols enumerates the values for enabled protocols. @@ -206,15 +297,15 @@ func PossibleEncryptionScopeSourceValues() []EncryptionScopeSource { type EncryptionScopeState string const ( - // Disabled ... - Disabled EncryptionScopeState = "Disabled" - // Enabled ... - Enabled EncryptionScopeState = "Enabled" + // EncryptionScopeStateDisabled ... + EncryptionScopeStateDisabled EncryptionScopeState = "Disabled" + // EncryptionScopeStateEnabled ... + EncryptionScopeStateEnabled EncryptionScopeState = "Enabled" ) // PossibleEncryptionScopeStateValues returns an array of possible values for the EncryptionScopeState const type. func PossibleEncryptionScopeStateValues() []EncryptionScopeState { - return []EncryptionScopeState{Disabled, Enabled} + return []EncryptionScopeState{EncryptionScopeStateDisabled, EncryptionScopeStateEnabled} } // ExtendedLocationTypes enumerates the values for extended location types. @@ -230,6 +321,21 @@ func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { return []ExtendedLocationTypes{EdgeZone} } +// Format enumerates the values for format. +type Format string + +const ( + // Csv ... + Csv Format = "Csv" + // Parquet ... + Parquet Format = "Parquet" +) + +// PossibleFormatValues returns an array of possible values for the Format const type. +func PossibleFormatValues() []Format { + return []Format{Csv, Parquet} +} + // GeoReplicationStatus enumerates the values for geo replication status. type GeoReplicationStatus string @@ -247,19 +353,6 @@ func PossibleGeoReplicationStatusValues() []GeoReplicationStatus { return []GeoReplicationStatus{GeoReplicationStatusBootstrap, GeoReplicationStatusLive, GeoReplicationStatusUnavailable} } -// GetShareExpand enumerates the values for get share expand. -type GetShareExpand string - -const ( - // Stats ... - Stats GetShareExpand = "stats" -) - -// PossibleGetShareExpandValues returns an array of possible values for the GetShareExpand const type. -func PossibleGetShareExpandValues() []GetShareExpand { - return []GetShareExpand{Stats} -} - // HTTPProtocol enumerates the values for http protocol. type HTTPProtocol string @@ -298,15 +391,15 @@ func PossibleIdentityTypeValues() []IdentityType { type ImmutabilityPolicyState string const ( - // Locked ... - Locked ImmutabilityPolicyState = "Locked" - // Unlocked ... - Unlocked ImmutabilityPolicyState = "Unlocked" + // ImmutabilityPolicyStateLocked ... + ImmutabilityPolicyStateLocked ImmutabilityPolicyState = "Locked" + // ImmutabilityPolicyStateUnlocked ... + ImmutabilityPolicyStateUnlocked ImmutabilityPolicyState = "Unlocked" ) // PossibleImmutabilityPolicyStateValues returns an array of possible values for the ImmutabilityPolicyState const type. func PossibleImmutabilityPolicyStateValues() []ImmutabilityPolicyState { - return []ImmutabilityPolicyState{Locked, Unlocked} + return []ImmutabilityPolicyState{ImmutabilityPolicyStateLocked, ImmutabilityPolicyStateUnlocked} } // ImmutabilityPolicyUpdateType enumerates the values for immutability policy update type. @@ -407,6 +500,27 @@ func PossibleLargeFileSharesStateValues() []LargeFileSharesState { return []LargeFileSharesState{LargeFileSharesStateDisabled, LargeFileSharesStateEnabled} } +// LeaseContainerRequestAction enumerates the values for lease container request action. +type LeaseContainerRequestAction string + +const ( + // Acquire ... + Acquire LeaseContainerRequestAction = "Acquire" + // Break ... + Break LeaseContainerRequestAction = "Break" + // Change ... + Change LeaseContainerRequestAction = "Change" + // Release ... + Release LeaseContainerRequestAction = "Release" + // Renew ... + Renew LeaseContainerRequestAction = "Renew" +) + +// PossibleLeaseContainerRequestActionValues returns an array of possible values for the LeaseContainerRequestAction const type. +func PossibleLeaseContainerRequestActionValues() []LeaseContainerRequestAction { + return []LeaseContainerRequestAction{Acquire, Break, Change, Release, Renew} +} + // LeaseDuration enumerates the values for lease duration. type LeaseDuration string @@ -422,6 +536,27 @@ func PossibleLeaseDurationValues() []LeaseDuration { return []LeaseDuration{Fixed, Infinite} } +// LeaseShareAction enumerates the values for lease share action. +type LeaseShareAction string + +const ( + // LeaseShareActionAcquire ... + LeaseShareActionAcquire LeaseShareAction = "Acquire" + // LeaseShareActionBreak ... + LeaseShareActionBreak LeaseShareAction = "Break" + // LeaseShareActionChange ... + LeaseShareActionChange LeaseShareAction = "Change" + // LeaseShareActionRelease ... + LeaseShareActionRelease LeaseShareAction = "Release" + // LeaseShareActionRenew ... + LeaseShareActionRenew LeaseShareAction = "Renew" +) + +// PossibleLeaseShareActionValues returns an array of possible values for the LeaseShareAction const type. +func PossibleLeaseShareActionValues() []LeaseShareAction { + return []LeaseShareAction{LeaseShareActionAcquire, LeaseShareActionBreak, LeaseShareActionChange, LeaseShareActionRelease, LeaseShareActionRenew} +} + // LeaseState enumerates the values for lease state. type LeaseState string @@ -484,19 +619,19 @@ func PossibleListKeyExpandValues() []ListKeyExpand { return []ListKeyExpand{Kerb} } -// ListSharesExpand enumerates the values for list shares expand. -type ListSharesExpand string +// MigrationState enumerates the values for migration state. +type MigrationState string const ( - // ListSharesExpandDeleted ... - ListSharesExpandDeleted ListSharesExpand = "deleted" - // ListSharesExpandSnapshots ... - ListSharesExpandSnapshots ListSharesExpand = "snapshots" + // MigrationStateCompleted ... + MigrationStateCompleted MigrationState = "Completed" + // MigrationStateInProgress ... + MigrationStateInProgress MigrationState = "InProgress" ) -// PossibleListSharesExpandValues returns an array of possible values for the ListSharesExpand const type. -func PossibleListSharesExpandValues() []ListSharesExpand { - return []ListSharesExpand{ListSharesExpandDeleted, ListSharesExpandSnapshots} +// PossibleMigrationStateValues returns an array of possible values for the MigrationState const type. +func PossibleMigrationStateValues() []MigrationState { + return []MigrationState{MigrationStateCompleted, MigrationStateInProgress} } // MinimumTLSVersion enumerates the values for minimum tls version. @@ -529,6 +664,21 @@ func PossibleNameValues() []Name { return []Name{AccessTimeTracking} } +// ObjectType enumerates the values for object type. +type ObjectType string + +const ( + // Blob ... + Blob ObjectType = "Blob" + // Container ... + Container ObjectType = "Container" +) + +// PossibleObjectTypeValues returns an array of possible values for the ObjectType const type. +func PossibleObjectTypeValues() []ObjectType { + return []ObjectType{Blob, Container} +} + // Permissions enumerates the values for permissions. type Permissions string @@ -627,17 +777,19 @@ func PossiblePublicAccessValues() []PublicAccess { return []PublicAccess{PublicAccessBlob, PublicAccessContainer, PublicAccessNone} } -// PutSharesExpand enumerates the values for put shares expand. -type PutSharesExpand string +// PublicNetworkAccess enumerates the values for public network access. +type PublicNetworkAccess string const ( - // Snapshots ... - Snapshots PutSharesExpand = "snapshots" + // PublicNetworkAccessDisabled ... + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + // PublicNetworkAccessEnabled ... + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" ) -// PossiblePutSharesExpandValues returns an array of possible values for the PutSharesExpand const type. -func PossiblePutSharesExpandValues() []PutSharesExpand { - return []PutSharesExpand{Snapshots} +// PossiblePublicNetworkAccessValues returns an array of possible values for the PublicNetworkAccess const type. +func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { + return []PublicNetworkAccess{PublicNetworkAccessDisabled, PublicNetworkAccessEnabled} } // Reason enumerates the values for reason. @@ -702,6 +854,21 @@ func PossibleRoutingChoiceValues() []RoutingChoice { return []RoutingChoice{InternetRouting, MicrosoftRouting} } +// Schedule enumerates the values for schedule. +type Schedule string + +const ( + // Daily ... + Daily Schedule = "Daily" + // Weekly ... + Weekly Schedule = "Weekly" +) + +// PossibleScheduleValues returns an array of possible values for the Schedule const type. +func PossibleScheduleValues() []Schedule { + return []Schedule{Daily, Weekly} +} + // Services enumerates the values for services. type Services string @@ -776,6 +943,23 @@ func PossibleSignedResourceTypesValues() []SignedResourceTypes { return []SignedResourceTypes{SignedResourceTypesC, SignedResourceTypesO, SignedResourceTypesS} } +// SkuConversionStatus enumerates the values for sku conversion status. +type SkuConversionStatus string + +const ( + // SkuConversionStatusFailed ... + SkuConversionStatusFailed SkuConversionStatus = "Failed" + // SkuConversionStatusInProgress ... + SkuConversionStatusInProgress SkuConversionStatus = "InProgress" + // SkuConversionStatusSucceeded ... + SkuConversionStatusSucceeded SkuConversionStatus = "Succeeded" +) + +// PossibleSkuConversionStatusValues returns an array of possible values for the SkuConversionStatus const type. +func PossibleSkuConversionStatusValues() []SkuConversionStatus { + return []SkuConversionStatus{SkuConversionStatusFailed, SkuConversionStatusInProgress, SkuConversionStatusSucceeded} +} + // SkuName enumerates the values for sku name. type SkuName string @@ -807,15 +991,15 @@ func PossibleSkuNameValues() []SkuName { type SkuTier string const ( - // Premium ... - Premium SkuTier = "Premium" - // Standard ... - Standard SkuTier = "Standard" + // SkuTierPremium ... + SkuTierPremium SkuTier = "Premium" + // SkuTierStandard ... + SkuTierStandard SkuTier = "Standard" ) // PossibleSkuTierValues returns an array of possible values for the SkuTier const type. func PossibleSkuTierValues() []SkuTier { - return []SkuTier{Premium, Standard} + return []SkuTier{SkuTierPremium, SkuTierStandard} } // State enumerates the values for state. @@ -823,15 +1007,15 @@ type State string const ( // StateDeprovisioning ... - StateDeprovisioning State = "deprovisioning" + StateDeprovisioning State = "Deprovisioning" // StateFailed ... - StateFailed State = "failed" + StateFailed State = "Failed" // StateNetworkSourceDeleted ... - StateNetworkSourceDeleted State = "networkSourceDeleted" + StateNetworkSourceDeleted State = "NetworkSourceDeleted" // StateProvisioning ... - StateProvisioning State = "provisioning" + StateProvisioning State = "Provisioning" // StateSucceeded ... - StateSucceeded State = "succeeded" + StateSucceeded State = "Succeeded" ) // PossibleStateValues returns an array of possible values for the State const type. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/fileservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/fileservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/fileservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/fileservices.go index 44ace83cb..550160148 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/fileservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/fileservices.go @@ -93,7 +93,7 @@ func (client FileServicesClient) GetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client FileServicesClient) ListPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -288,7 +288,7 @@ func (client FileServicesClient) SetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/fileshares.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/fileshares.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/fileshares.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/fileshares.go index 885abdedc..c5165371b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/fileshares.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/fileshares.go @@ -42,8 +42,9 @@ func NewFileSharesClientWithBaseURI(baseURI string, subscriptionID string) FileS // between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) // character must be immediately preceded and followed by a letter or number. // fileShare - properties of the file share to create. -// expand - optional, used to create a snapshot. -func (client FileSharesClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, expand PutSharesExpand) (result FileShare, err error) { +// expand - optional, used to expand the properties within share's properties. Valid values are: snapshots. +// Should be passed as a string with delimiter ',' +func (client FileSharesClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, expand string) (result FileShare, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Create") defer func() { @@ -100,7 +101,7 @@ func (client FileSharesClient) Create(ctx context.Context, resourceGroupName str } // CreatePreparer prepares the Create request. -func (client FileSharesClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, expand PutSharesExpand) (*http.Request, error) { +func (client FileSharesClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, expand string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -108,11 +109,11 @@ func (client FileSharesClient) CreatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if len(string(expand)) > 0 { + if len(expand) > 0 { queryParameters["$expand"] = autorest.Encode("query", expand) } @@ -154,7 +155,12 @@ func (client FileSharesClient) CreateResponder(resp *http.Response) (result File // between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) // character must be immediately preceded and followed by a letter or number. // xMsSnapshot - optional, used to delete a snapshot. -func (client FileSharesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, xMsSnapshot string) (result autorest.Response, err error) { +// include - optional. Valid values are: snapshots, leased-snapshots, none. The default value is snapshots. For +// 'snapshots', the file share is deleted including all of its file share snapshots. If the file share contains +// leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its +// file share snapshots (leased/unleased). For 'none', the file share is deleted if it has no share snapshots. +// If the file share contains any snapshots (leased or unleased), the deletion fails. +func (client FileSharesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, xMsSnapshot string, include string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Delete") defer func() { @@ -181,7 +187,7 @@ func (client FileSharesClient) Delete(ctx context.Context, resourceGroupName str return result, validation.NewError("storage.FileSharesClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, shareName, xMsSnapshot) + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, shareName, xMsSnapshot, include) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Delete", nil, "Failure preparing request") return @@ -204,7 +210,7 @@ func (client FileSharesClient) Delete(ctx context.Context, resourceGroupName str } // DeletePreparer prepares the Delete request. -func (client FileSharesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, xMsSnapshot string) (*http.Request, error) { +func (client FileSharesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, xMsSnapshot string, include string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -212,10 +218,13 @@ func (client FileSharesClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(include) > 0 { + queryParameters["$include"] = autorest.Encode("query", include) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), @@ -255,9 +264,10 @@ func (client FileSharesClient) DeleteResponder(resp *http.Response) (result auto // shareName - the name of the file share within the specified storage account. File share names must be // between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) // character must be immediately preceded and followed by a letter or number. -// expand - optional, used to expand the properties within share's properties. +// expand - optional, used to expand the properties within share's properties. Valid values are: stats. Should +// be passed as a string with delimiter ','. // xMsSnapshot - optional, used to retrieve properties of a snapshot. -func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand GetShareExpand, xMsSnapshot string) (result FileShare, err error) { +func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand string, xMsSnapshot string) (result FileShare, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Get") defer func() { @@ -307,7 +317,7 @@ func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string } // GetPreparer prepares the Get request. -func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand GetShareExpand, xMsSnapshot string) (*http.Request, error) { +func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand string, xMsSnapshot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -315,11 +325,11 @@ func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if len(string(expand)) > 0 { + if len(expand) > 0 { queryParameters["$expand"] = autorest.Encode("query", expand) } @@ -353,6 +363,116 @@ func (client FileSharesClient) GetResponder(resp *http.Response) (result FileSha return } +// Lease the Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration +// can be 15 to 60 seconds, or can be infinite. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// shareName - the name of the file share within the specified storage account. File share names must be +// between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) +// character must be immediately preceded and followed by a letter or number. +// parameters - lease Share request body. +// xMsSnapshot - optional. Specify the snapshot time to lease a snapshot. +func (client FileSharesClient) Lease(ctx context.Context, resourceGroupName string, accountName string, shareName string, parameters *LeaseShareRequest, xMsSnapshot string) (result LeaseShareResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Lease") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: shareName, + Constraints: []validation.Constraint{{Target: "shareName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "shareName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.FileSharesClient", "Lease", err.Error()) + } + + req, err := client.LeasePreparer(ctx, resourceGroupName, accountName, shareName, parameters, xMsSnapshot) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Lease", nil, "Failure preparing request") + return + } + + resp, err := client.LeaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Lease", resp, "Failure sending request") + return + } + + result, err = client.LeaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Lease", resp, "Failure responding to request") + return + } + + return +} + +// LeasePreparer prepares the Lease request. +func (client FileSharesClient) LeasePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, parameters *LeaseShareRequest, xMsSnapshot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "shareName": autorest.Encode("path", shareName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/lease", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + if len(xMsSnapshot) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("x-ms-snapshot", autorest.String(xMsSnapshot))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// LeaseSender sends the Lease request. The method will close the +// http.Response Body if it receives an error. +func (client FileSharesClient) LeaseSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// LeaseResponder handles the response to the Lease request. The method always +// closes the http.Response Body. +func (client FileSharesClient) LeaseResponder(resp *http.Response) (result LeaseShareResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List lists all shares. // Parameters: // resourceGroupName - the name of the resource group within the user's subscription. The name is case @@ -361,8 +481,9 @@ func (client FileSharesClient) GetResponder(resp *http.Response) (result FileSha // must be between 3 and 24 characters in length and use numbers and lower-case letters only. // maxpagesize - optional. Specified maximum number of shares that can be included in the list. // filter - optional. When specified, only share names starting with the filter will be listed. -// expand - optional, used to expand the properties within share's properties. -func (client FileSharesClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (result FileShareItemsPage, err error) { +// expand - optional, used to expand the properties within share's properties. Valid values are: deleted, +// snapshots. Should be passed as a string with delimiter ',' +func (client FileSharesClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand string) (result FileShareItemsPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.List") defer func() { @@ -414,14 +535,14 @@ func (client FileSharesClient) List(ctx context.Context, resourceGroupName strin } // ListPreparer prepares the List request. -func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (*http.Request, error) { +func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -431,7 +552,7 @@ func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupNa if len(filter) > 0 { queryParameters["$filter"] = autorest.Encode("query", filter) } - if len(string(expand)) > 0 { + if len(expand) > 0 { queryParameters["$expand"] = autorest.Encode("query", expand) } @@ -483,7 +604,7 @@ func (client FileSharesClient) listNextResults(ctx context.Context, lastResults } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (result FileShareItemsIterator, err error) { +func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand string) (result FileShareItemsIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.List") defer func() { @@ -568,7 +689,7 @@ func (client FileSharesClient) RestorePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -669,7 +790,7 @@ func (client FileSharesClient) UpdatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/localusers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/localusers.go new file mode 100644 index 000000000..0b01e4e75 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/localusers.go @@ -0,0 +1,610 @@ +package storage + +// 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. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// LocalUsersClient is the the Azure Storage Management API. +type LocalUsersClient struct { + BaseClient +} + +// NewLocalUsersClient creates an instance of the LocalUsersClient client. +func NewLocalUsersClient(subscriptionID string) LocalUsersClient { + return NewLocalUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLocalUsersClientWithBaseURI creates an instance of the LocalUsersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLocalUsersClientWithBaseURI(baseURI string, subscriptionID string) LocalUsersClient { + return LocalUsersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update the properties of a local user associated with the storage account +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +// properties - the local user associated with a storage account. +func (client LocalUsersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, username string, properties LocalUser) (result LocalUser, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, username, properties) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client LocalUsersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, username string, properties LocalUser) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", pathParameters), + autorest.WithJSON(properties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) CreateOrUpdateResponder(resp *http.Response) (result LocalUser, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the local user associated with the specified storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +func (client LocalUsersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, username string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, username) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client LocalUsersClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, username string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the local user of the storage account by username. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +func (client LocalUsersClient) Get(ctx context.Context, resourceGroupName string, accountName string, username string) (result LocalUser, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, username) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LocalUsersClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, username string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) GetResponder(resp *http.Response) (result LocalUser, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list the local users associated with the storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client LocalUsersClient) List(ctx context.Context, resourceGroupName string, accountName string) (result LocalUsers, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LocalUsersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) ListResponder(resp *http.Response) (result LocalUsers, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListKeys list SSH authorized keys and shared key of the local user. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +func (client LocalUsersClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, username string) (result LocalUserKeys, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.ListKeys") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "ListKeys", err.Error()) + } + + req, err := client.ListKeysPreparer(ctx, resourceGroupName, accountName, username) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "ListKeys", nil, "Failure preparing request") + return + } + + resp, err := client.ListKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "ListKeys", resp, "Failure sending request") + return + } + + result, err = client.ListKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "ListKeys", resp, "Failure responding to request") + return + } + + return +} + +// ListKeysPreparer prepares the ListKeys request. +func (client LocalUsersClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, accountName string, username string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/listKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListKeysSender sends the ListKeys request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) ListKeysSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListKeysResponder handles the response to the ListKeys request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) ListKeysResponder(resp *http.Response) (result LocalUserKeys, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RegeneratePassword regenerate the local user SSH password. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +func (client LocalUsersClient) RegeneratePassword(ctx context.Context, resourceGroupName string, accountName string, username string) (result LocalUserRegeneratePasswordResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.RegeneratePassword") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "RegeneratePassword", err.Error()) + } + + req, err := client.RegeneratePasswordPreparer(ctx, resourceGroupName, accountName, username) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "RegeneratePassword", nil, "Failure preparing request") + return + } + + resp, err := client.RegeneratePasswordSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "RegeneratePassword", resp, "Failure sending request") + return + } + + result, err = client.RegeneratePasswordResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "RegeneratePassword", resp, "Failure responding to request") + return + } + + return +} + +// RegeneratePasswordPreparer prepares the RegeneratePassword request. +func (client LocalUsersClient) RegeneratePasswordPreparer(ctx context.Context, resourceGroupName string, accountName string, username string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2022-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/regeneratePassword", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegeneratePasswordSender sends the RegeneratePassword request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) RegeneratePasswordSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// RegeneratePasswordResponder handles the response to the RegeneratePassword request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) RegeneratePasswordResponder(resp *http.Response) (result LocalUserRegeneratePasswordResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/managementpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/managementpolicies.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/managementpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/managementpolicies.go index ca473f54f..b9d2ce0ad 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/managementpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/managementpolicies.go @@ -99,7 +99,7 @@ func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -193,7 +193,7 @@ func (client ManagementPoliciesClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -284,7 +284,7 @@ func (client ManagementPoliciesClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/models.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/models.go index ef71b8f27..ca31a38a0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/models.go @@ -18,7 +18,17 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage" + +// AccessPolicy ... +type AccessPolicy struct { + // StartTime - Start time of the access policy + StartTime *date.Time `json:"startTime,omitempty"` + // ExpiryTime - Expiry time of the access policy + ExpiryTime *date.Time `json:"expiryTime,omitempty"` + // Permission - List of abbreviated permissions. + Permission *string `json:"permission,omitempty"` +} // Account the storage account. type Account struct { @@ -303,6 +313,16 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { return nil } +// AccountImmutabilityPolicyProperties this defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties struct { + // ImmutabilityPeriodSinceCreationInDays - The immutability period for the blobs in the container since the policy creation, in days. + ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + // State - The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. Possible values include: 'Unlocked', 'Locked', 'Disabled' + State AccountImmutabilityPolicyState `json:"state,omitempty"` + // AllowProtectedAppendWrites - This property can only be changed for disabled and unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` +} + // AccountInternetEndpoints the URIs that are used to perform a retrieval of a public blob, file, web or // dfs object via a internet routing endpoint. type AccountInternetEndpoints struct { @@ -330,6 +350,8 @@ type AccountKey struct { Value *string `json:"value,omitempty"` // Permissions - READ-ONLY; Permissions for the key -- read-only or full permissions. Possible values include: 'Read', 'Full' Permissions KeyPermission `json:"permissions,omitempty"` + // CreationTime - READ-ONLY; Creation time of the key, in round trip date format. + CreationTime *date.Time `json:"creationTime,omitempty"` } // MarshalJSON is the custom marshaler for AccountKey. @@ -559,11 +581,17 @@ type AccountProperties struct { CreationTime *date.Time `json:"creationTime,omitempty"` // CustomDomain - READ-ONLY; Gets the custom domain the user assigned to this storage account. CustomDomain *CustomDomain `json:"customDomain,omitempty"` + // SasPolicy - READ-ONLY; SasPolicy assigned to the storage account. + SasPolicy *SasPolicy `json:"sasPolicy,omitempty"` + // KeyPolicy - READ-ONLY; KeyPolicy assigned to the storage account. + KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"` + // KeyCreationTime - READ-ONLY; Storage account keys creation time. + KeyCreationTime *KeyCreationTime `json:"keyCreationTime,omitempty"` // SecondaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS. SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty"` - // Encryption - READ-ONLY; Gets the encryption settings on the account. If unspecified, the account is unencrypted. + // Encryption - READ-ONLY; Encryption settings to be used for server-side encryption for the storage account. Encryption *Encryption `json:"encryption,omitempty"` - // AccessTier - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' + // AccessTier - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. Possible values include: 'Hot', 'Cool', 'Premium' AccessTier AccessTier `json:"accessTier,omitempty"` // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` @@ -571,6 +599,10 @@ type AccountProperties struct { EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` // NetworkRuleSet - READ-ONLY; Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` + // IsSftpEnabled - Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + // IsLocalUserEnabled - Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` // GeoReplicationStats - READ-ONLY; Geo Replication Stats @@ -593,6 +625,20 @@ type AccountProperties struct { AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` // EnableNfsV3 - NFS 3.0 protocol support enabled if set to true. EnableNfsV3 *bool `json:"isNfsV3Enabled,omitempty"` + // AllowCrossTenantReplication - Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. + AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + // DefaultToOAuthAuthentication - A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + // PublicNetworkAccess - Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // ImmutableStorageWithVersioning - The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + // AllowedCopyScope - Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values include: 'PrivateLink', 'AAD' + AllowedCopyScope AllowedCopyScope `json:"allowedCopyScope,omitempty"` + // StorageAccountSkuConversionStatus - This property is readOnly and is set by server during asynchronous storage account sku conversion operations. + StorageAccountSkuConversionStatus *AccountSkuConversionStatus `json:"storageAccountSkuConversionStatus,omitempty"` + // DNSEndpointType - Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. Possible values include: 'Standard', 'AzureDNSZone' + DNSEndpointType DNSEndpointType `json:"dnsEndpointType,omitempty"` } // MarshalJSON is the custom marshaler for AccountProperties. @@ -604,6 +650,12 @@ func (ap AccountProperties) MarshalJSON() ([]byte, error) { if ap.EnableHTTPSTrafficOnly != nil { objectMap["supportsHttpsTrafficOnly"] = ap.EnableHTTPSTrafficOnly } + if ap.IsSftpEnabled != nil { + objectMap["isSftpEnabled"] = ap.IsSftpEnabled + } + if ap.IsLocalUserEnabled != nil { + objectMap["isLocalUserEnabled"] = ap.IsLocalUserEnabled + } if ap.IsHnsEnabled != nil { objectMap["isHnsEnabled"] = ap.IsHnsEnabled } @@ -625,23 +677,56 @@ func (ap AccountProperties) MarshalJSON() ([]byte, error) { if ap.EnableNfsV3 != nil { objectMap["isNfsV3Enabled"] = ap.EnableNfsV3 } + if ap.AllowCrossTenantReplication != nil { + objectMap["allowCrossTenantReplication"] = ap.AllowCrossTenantReplication + } + if ap.DefaultToOAuthAuthentication != nil { + objectMap["defaultToOAuthAuthentication"] = ap.DefaultToOAuthAuthentication + } + if ap.PublicNetworkAccess != "" { + objectMap["publicNetworkAccess"] = ap.PublicNetworkAccess + } + if ap.ImmutableStorageWithVersioning != nil { + objectMap["immutableStorageWithVersioning"] = ap.ImmutableStorageWithVersioning + } + if ap.AllowedCopyScope != "" { + objectMap["allowedCopyScope"] = ap.AllowedCopyScope + } + if ap.StorageAccountSkuConversionStatus != nil { + objectMap["storageAccountSkuConversionStatus"] = ap.StorageAccountSkuConversionStatus + } + if ap.DNSEndpointType != "" { + objectMap["dnsEndpointType"] = ap.DNSEndpointType + } return json.Marshal(objectMap) } // AccountPropertiesCreateParameters the parameters used to create the storage account. type AccountPropertiesCreateParameters struct { + // AllowedCopyScope - Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values include: 'PrivateLink', 'AAD' + AllowedCopyScope AllowedCopyScope `json:"allowedCopyScope,omitempty"` + // PublicNetworkAccess - Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // SasPolicy - SasPolicy assigned to the storage account. + SasPolicy *SasPolicy `json:"sasPolicy,omitempty"` + // KeyPolicy - KeyPolicy assigned to the storage account. + KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"` // CustomDomain - User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. CustomDomain *CustomDomain `json:"customDomain,omitempty"` - // Encryption - Not applicable. Azure Storage encryption is enabled for all storage accounts and cannot be disabled. + // Encryption - Encryption settings to be used for server-side encryption for the storage account. Encryption *Encryption `json:"encryption,omitempty"` // NetworkRuleSet - Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` - // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' + // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. Possible values include: 'Hot', 'Cool', 'Premium' AccessTier AccessTier `json:"accessTier,omitempty"` // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + // IsSftpEnabled - Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + // IsLocalUserEnabled - Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' @@ -656,20 +741,36 @@ type AccountPropertiesCreateParameters struct { AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` // EnableNfsV3 - NFS 3.0 protocol support enabled if set to true. EnableNfsV3 *bool `json:"isNfsV3Enabled,omitempty"` + // AllowCrossTenantReplication - Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. + AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + // DefaultToOAuthAuthentication - A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + // ImmutableStorageWithVersioning - The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the new containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + // DNSEndpointType - Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. Possible values include: 'Standard', 'AzureDNSZone' + DNSEndpointType DNSEndpointType `json:"dnsEndpointType,omitempty"` } // AccountPropertiesUpdateParameters the parameters used when updating a storage account. type AccountPropertiesUpdateParameters struct { // CustomDomain - Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. CustomDomain *CustomDomain `json:"customDomain,omitempty"` - // Encryption - Provides the encryption settings on the account. The default setting is unencrypted. + // Encryption - Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts and cannot be disabled. Encryption *Encryption `json:"encryption,omitempty"` - // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' + // SasPolicy - SasPolicy assigned to the storage account. + SasPolicy *SasPolicy `json:"sasPolicy,omitempty"` + // KeyPolicy - KeyPolicy assigned to the storage account. + KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"` + // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. Possible values include: 'Hot', 'Cool', 'Premium' AccessTier AccessTier `json:"accessTier,omitempty"` // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + // IsSftpEnabled - Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + // IsLocalUserEnabled - Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` // NetworkRuleSet - Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' @@ -682,6 +783,18 @@ type AccountPropertiesUpdateParameters struct { MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` // AllowSharedKeyAccess - Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + // AllowCrossTenantReplication - Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. + AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + // DefaultToOAuthAuthentication - A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + // PublicNetworkAccess - Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // ImmutableStorageWithVersioning - The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + // AllowedCopyScope - Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values include: 'PrivateLink', 'AAD' + AllowedCopyScope AllowedCopyScope `json:"allowedCopyScope,omitempty"` + // DNSEndpointType - Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. Possible values include: 'Standard', 'AzureDNSZone' + DNSEndpointType DNSEndpointType `json:"dnsEndpointType,omitempty"` } // AccountRegenerateKeyParameters the parameters used to regenerate the storage account key. @@ -690,6 +803,43 @@ type AccountRegenerateKeyParameters struct { KeyName *string `json:"keyName,omitempty"` } +// AccountsAbortHierarchicalNamespaceMigrationFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type AccountsAbortHierarchicalNamespaceMigrationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AccountsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AccountsAbortHierarchicalNamespaceMigrationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AccountsAbortHierarchicalNamespaceMigrationFuture.Result. +func (future *AccountsAbortHierarchicalNamespaceMigrationFuture) result(client AccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsAbortHierarchicalNamespaceMigrationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("storage.AccountsAbortHierarchicalNamespaceMigrationFuture") + return + } + ar.Response = future.Response() + return +} + // AccountSasParameters the parameters to list SAS credentials of a storage account. type AccountSasParameters struct { // Services - The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'B', 'Q', 'T', 'F' @@ -790,6 +940,65 @@ func (future *AccountsFailoverFuture) result(client AccountsClient) (ar autorest return } +// AccountsHierarchicalNamespaceMigrationFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type AccountsHierarchicalNamespaceMigrationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AccountsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AccountsHierarchicalNamespaceMigrationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AccountsHierarchicalNamespaceMigrationFuture.Result. +func (future *AccountsHierarchicalNamespaceMigrationFuture) result(client AccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsHierarchicalNamespaceMigrationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("storage.AccountsHierarchicalNamespaceMigrationFuture") + return + } + ar.Response = future.Response() + return +} + +// AccountSkuConversionStatus this defines the sku conversion status object for asynchronous sku +// conversions. +type AccountSkuConversionStatus struct { + // SkuConversionStatus - READ-ONLY; This property indicates the current sku conversion status. Possible values include: 'SkuConversionStatusInProgress', 'SkuConversionStatusSucceeded', 'SkuConversionStatusFailed' + SkuConversionStatus SkuConversionStatus `json:"skuConversionStatus,omitempty"` + // TargetSkuName - This property represents the target sku name to which the account sku is being converted asynchronously. Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' + TargetSkuName SkuName `json:"targetSkuName,omitempty"` + // StartTime - READ-ONLY; This property represents the sku conversion start time. + StartTime *string `json:"startTime,omitempty"` + // EndTime - READ-ONLY; This property represents the sku conversion end time. + EndTime *string `json:"endTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for AccountSkuConversionStatus. +func (ascs AccountSkuConversionStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ascs.TargetSkuName != "" { + objectMap["targetSkuName"] = ascs.TargetSkuName + } + return json.Marshal(objectMap) +} + // AccountsRestoreBlobRangesFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type AccountsRestoreBlobRangesFuture struct { @@ -943,6 +1152,10 @@ type ActiveDirectoryProperties struct { DomainSid *string `json:"domainSid,omitempty"` // AzureStorageSid - Specifies the security identifier (SID) for Azure Storage. AzureStorageSid *string `json:"azureStorageSid,omitempty"` + // SamAccountName - Specifies the Active Directory SAMAccountName for Azure Storage. + SamAccountName *string `json:"samAccountName,omitempty"` + // AccountType - Specifies the Active Directory account type for Azure Storage. Possible values include: 'User', 'Computer' + AccountType AccountType `json:"accountType,omitempty"` } // AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. @@ -965,10 +1178,12 @@ func (aer AzureEntityResource) MarshalJSON() ([]byte, error) { // AzureFilesIdentityBasedAuthentication settings for Azure Files identity based authentication. type AzureFilesIdentityBasedAuthentication struct { - // DirectoryServiceOptions - Indicates the directory service used. Possible values include: 'DirectoryServiceOptionsNone', 'DirectoryServiceOptionsAADDS', 'DirectoryServiceOptionsAD' + // DirectoryServiceOptions - Indicates the directory service used. Note that this enum may be extended in the future. Possible values include: 'DirectoryServiceOptionsNone', 'DirectoryServiceOptionsAADDS', 'DirectoryServiceOptionsAD', 'DirectoryServiceOptionsAADKERB' DirectoryServiceOptions DirectoryServiceOptions `json:"directoryServiceOptions,omitempty"` - // ActiveDirectoryProperties - Required if choose AD. + // ActiveDirectoryProperties - Required if directoryServiceOptions are AD, optional if they are AADKERB. ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"` + // DefaultSharePermission - Default share permission for users using Kerberos authentication if RBAC role is not assigned. Possible values include: 'DefaultSharePermissionNone', 'DefaultSharePermissionStorageFileDataSmbShareReader', 'DefaultSharePermissionStorageFileDataSmbShareContributor', 'DefaultSharePermissionStorageFileDataSmbShareElevatedContributor' + DefaultSharePermission DefaultSharePermission `json:"defaultSharePermission,omitempty"` } // BlobContainer properties of the blob container, including Id, resource name, resource type, Etag. @@ -1055,6 +1270,43 @@ func (bc *BlobContainer) UnmarshalJSON(body []byte) error { return nil } +// BlobContainersObjectLevelWormFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BlobContainersObjectLevelWormFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BlobContainersClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BlobContainersObjectLevelWormFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BlobContainersObjectLevelWormFuture.Result. +func (future *BlobContainersObjectLevelWormFuture) result(client BlobContainersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.BlobContainersObjectLevelWormFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("storage.BlobContainersObjectLevelWormFuture") + return + } + ar.Response = future.Response() + return +} + // BlobInventoryPolicy the storage account blob inventory policy. type BlobInventoryPolicy struct { autorest.Response `json:"-"` @@ -1141,23 +1393,36 @@ func (bip *BlobInventoryPolicy) UnmarshalJSON(body []byte) error { return nil } -// BlobInventoryPolicyDefinition an object that defines the blob inventory rule. Each definition consists -// of a set of filters. +// BlobInventoryPolicyDefinition an object that defines the blob inventory rule. type BlobInventoryPolicyDefinition struct { // Filters - An object that defines the filter set. Filters *BlobInventoryPolicyFilter `json:"filters,omitempty"` -} - -// BlobInventoryPolicyFilter an object that defines the blob inventory rule filter conditions. + // Format - This is a required field, it specifies the format for the inventory files. Possible values include: 'Csv', 'Parquet' + Format Format `json:"format,omitempty"` + // Schedule - This is a required field. This field is used to schedule an inventory formation. Possible values include: 'Daily', 'Weekly' + Schedule Schedule `json:"schedule,omitempty"` + // ObjectType - This is a required field. This field specifies the scope of the inventory created either at the blob or container level. Possible values include: 'Blob', 'Container' + ObjectType ObjectType `json:"objectType,omitempty"` + // SchemaFields - This is a required field. This field specifies the fields and properties of the object to be included in the inventory. The Schema field value 'Name' is always required. The valid values for this field for the 'Blob' definition.objectType include 'Name, Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier, AccessTierChangeTime, AccessTierInferred, Tags, Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag, ContentType, ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, ContentDisposition, LeaseStatus, LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime, RemainingRetentionDays, ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, CopyId, CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription, CustomerProvidedKeySha256, RehydratePriority, ArchiveStatus, XmsBlobSequenceNumber, EncryptionScope, IncrementalCopy, TagCount'. For Blob object type schema field value 'DeletedTime' is applicable only for Hns enabled accounts. The valid values for 'Container' definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState, LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, DefaultEncryptionScope, DenyEncryptionScopeOverride, ImmutableStorageWithVersioningEnabled, Deleted, Version, DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, DeletionId' are valid only for Hns enabled accounts.Schema field values 'Tags, TagCount' are only valid for Non-Hns accounts. + SchemaFields *[]string `json:"schemaFields,omitempty"` +} + +// BlobInventoryPolicyFilter an object that defines the blob inventory rule filter conditions. For 'Blob' +// definition.objectType all filter properties are applicable, 'blobTypes' is required and others are +// optional. For 'Container' definition.objectType only prefixMatch is applicable and is optional. type BlobInventoryPolicyFilter struct { - // PrefixMatch - An array of strings for blob prefixes to be matched. + // PrefixMatch - An array of strings with maximum 10 blob prefixes to be included in the inventory. PrefixMatch *[]string `json:"prefixMatch,omitempty"` - // BlobTypes - An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. + // ExcludePrefix - An array of strings with maximum 10 blob prefixes to be excluded from the inventory. + ExcludePrefix *[]string `json:"excludePrefix,omitempty"` + // BlobTypes - An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. This field is required when definition.objectType property is set to 'Blob'. BlobTypes *[]string `json:"blobTypes,omitempty"` - // IncludeBlobVersions - Includes blob versions in blob inventory when value set to true. + // IncludeBlobVersions - Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they must be excluded. IncludeBlobVersions *bool `json:"includeBlobVersions,omitempty"` - // IncludeSnapshots - Includes blob snapshots in blob inventory when value set to true. + // IncludeSnapshots - Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required if this property is set to true, else it must be excluded. IncludeSnapshots *bool `json:"includeSnapshots,omitempty"` + // IncludeDeleted - For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be excluded. + IncludeDeleted *bool `json:"includeDeleted,omitempty"` } // BlobInventoryPolicyProperties the storage account blob inventory policy properties. @@ -1184,6 +1449,8 @@ type BlobInventoryPolicyRule struct { Enabled *bool `json:"enabled,omitempty"` // Name - A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. Name *string `json:"name,omitempty"` + // Destination - Container name where blob inventory files are stored. Must be pre-created. + Destination *string `json:"destination,omitempty"` // Definition - An object that defines the blob inventory policy rule. Definition *BlobInventoryPolicyDefinition `json:"definition,omitempty"` } @@ -1192,7 +1459,7 @@ type BlobInventoryPolicyRule struct { type BlobInventoryPolicySchema struct { // Enabled - Policy is enabled if set to true. Enabled *bool `json:"enabled,omitempty"` - // Destination - Container name where blob inventory files are stored. Must be pre-created. + // Destination - READ-ONLY; Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified at the rule level 'policy.rule.destination' Destination *string `json:"destination,omitempty"` // Type - The valid value is Inventory Type *string `json:"type,omitempty"` @@ -1200,6 +1467,21 @@ type BlobInventoryPolicySchema struct { Rules *[]BlobInventoryPolicyRule `json:"rules,omitempty"` } +// MarshalJSON is the custom marshaler for BlobInventoryPolicySchema. +func (bips BlobInventoryPolicySchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bips.Enabled != nil { + objectMap["enabled"] = bips.Enabled + } + if bips.Type != nil { + objectMap["type"] = bips.Type + } + if bips.Rules != nil { + objectMap["rules"] = bips.Rules + } + return json.Marshal(objectMap) +} + // BlobRestoreParameters blob restore parameters type BlobRestoreParameters struct { // TimeToRestore - Restore blob to the specified time. @@ -1430,6 +1712,12 @@ type ContainerProperties struct { HasLegalHold *bool `json:"hasLegalHold,omitempty"` // HasImmutabilityPolicy - READ-ONLY; The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty"` + // ImmutableStorageWithVersioning - The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process. + ImmutableStorageWithVersioning *ImmutableStorageWithVersioning `json:"immutableStorageWithVersioning,omitempty"` + // EnableNfsV3RootSquash - Enable NFSv3 root squash on blob container. + EnableNfsV3RootSquash *bool `json:"enableNfsV3RootSquash,omitempty"` + // EnableNfsV3AllSquash - Enable NFSv3 all squash on blob container. + EnableNfsV3AllSquash *bool `json:"enableNfsV3AllSquash,omitempty"` } // MarshalJSON is the custom marshaler for ContainerProperties. @@ -1447,6 +1735,15 @@ func (cp ContainerProperties) MarshalJSON() ([]byte, error) { if cp.Metadata != nil { objectMap["metadata"] = cp.Metadata } + if cp.ImmutableStorageWithVersioning != nil { + objectMap["immutableStorageWithVersioning"] = cp.ImmutableStorageWithVersioning + } + if cp.EnableNfsV3RootSquash != nil { + objectMap["enableNfsV3RootSquash"] = cp.EnableNfsV3RootSquash + } + if cp.EnableNfsV3AllSquash != nil { + objectMap["enableNfsV3AllSquash"] = cp.EnableNfsV3AllSquash + } return json.Marshal(objectMap) } @@ -1455,7 +1752,7 @@ type CorsRule struct { // AllowedOrigins - Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains AllowedOrigins *[]string `json:"allowedOrigins,omitempty"` // AllowedMethods - Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin. - AllowedMethods *[]string `json:"allowedMethods,omitempty"` + AllowedMethods *[]AllowedMethods `json:"allowedMethods,omitempty"` // MaxAgeInSeconds - Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response. MaxAgeInSeconds *int32 `json:"maxAgeInSeconds,omitempty"` // ExposedHeaders - Required if CorsRule element is present. A list of response headers to expose to CORS clients. @@ -1478,20 +1775,28 @@ type CustomDomain struct { UseSubDomainName *bool `json:"useSubDomainName,omitempty"` } -// DateAfterCreation object to define the number of days after creation. +// DateAfterCreation object to define snapshot and version action conditions. type DateAfterCreation struct { // DaysAfterCreationGreaterThan - Value indicating the age in days after creation DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` + // DaysAfterLastTierChangeGreaterThan - Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob version based actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` } -// DateAfterModification object to define the number of days after object last modification Or last access. -// Properties daysAfterModificationGreaterThan and daysAfterLastAccessTimeGreaterThan are mutually -// exclusive. +// DateAfterModification object to define the base blob action conditions. Properties +// daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan +// are mutually exclusive. The daysAfterLastTierChangeGreaterThan property is only applicable for +// tierToArchive actions which requires daysAfterModificationGreaterThan to be set, also it cannot be used +// in conjunction with daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. type DateAfterModification struct { // DaysAfterModificationGreaterThan - Value indicating the age in days after last modification DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` // DaysAfterLastAccessTimeGreaterThan - Value indicating the age in days after last blob access. This property can only be used in conjunction with last access time tracking policy DaysAfterLastAccessTimeGreaterThan *float64 `json:"daysAfterLastAccessTimeGreaterThan,omitempty"` + // DaysAfterLastTierChangeGreaterThan - Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + // DaysAfterCreationGreaterThan - Value indicating the age in days after blob creation. + DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` } // DeletedAccount deleted storage account @@ -1766,6 +2071,8 @@ type DeleteRetentionPolicy struct { Enabled *bool `json:"enabled,omitempty"` // Days - Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365. Days *int32 `json:"days,omitempty"` + // AllowPermanentDelete - This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used blob restore policy. This property only applies to blob service and does not apply to containers or file share. + AllowPermanentDelete *bool `json:"allowPermanentDelete,omitempty"` } // Dimension dimension of blobs, possibly be blob type or access tier. @@ -1794,6 +2101,8 @@ type Encryption struct { type EncryptionIdentity struct { // EncryptionUserAssignedIdentity - Resource identifier of the UserAssigned identity to be associated with server-side encryption on the storage account. EncryptionUserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` + // EncryptionFederatedIdentityClientID - ClientId of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account. + EncryptionFederatedIdentityClientID *string `json:"federatedIdentityClientId,omitempty"` } // EncryptionScope the Encryption Scope resource. @@ -2059,7 +2368,7 @@ func NewEncryptionScopeListResultPage(cur EncryptionScopeListResult, getNextPage type EncryptionScopeProperties struct { // Source - The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible values include: 'MicrosoftStorage', 'MicrosoftKeyVault' Source EncryptionScopeSource `json:"source,omitempty"` - // State - The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'Enabled', 'Disabled' + // State - The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'EncryptionScopeStateEnabled', 'EncryptionScopeStateDisabled' State EncryptionScopeState `json:"state,omitempty"` // CreationTime - READ-ONLY; Gets the creation date and time of the encryption scope in UTC. CreationTime *date.Time `json:"creationTime,omitempty"` @@ -2091,9 +2400,9 @@ func (esp EncryptionScopeProperties) MarshalJSON() ([]byte, error) { // EncryptionService a service that allows server-side encryption to be used. type EncryptionService struct { - // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored. + // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default today and cannot be disabled. Enabled *bool `json:"enabled,omitempty"` - // LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate. + // LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is encrypted at rest by default today and cannot be disabled. LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` // KeyType - Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used. Possible values include: 'KeyTypeService', 'KeyTypeAccount' KeyType KeyType `json:"keyType,omitempty"` @@ -2646,6 +2955,14 @@ type FileShareProperties struct { AccessTierStatus *string `json:"accessTierStatus,omitempty"` // ShareUsageBytes - READ-ONLY; The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files. ShareUsageBytes *int64 `json:"shareUsageBytes,omitempty"` + // LeaseStatus - READ-ONLY; The lease status of the share. Possible values include: 'LeaseStatusLocked', 'LeaseStatusUnlocked' + LeaseStatus LeaseStatus `json:"leaseStatus,omitempty"` + // LeaseState - READ-ONLY; Lease state of the share. Possible values include: 'LeaseStateAvailable', 'LeaseStateLeased', 'LeaseStateExpired', 'LeaseStateBreaking', 'LeaseStateBroken' + LeaseState LeaseState `json:"leaseState,omitempty"` + // LeaseDuration - READ-ONLY; Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased. Possible values include: 'Infinite', 'Fixed' + LeaseDuration LeaseDuration `json:"leaseDuration,omitempty"` + // SignedIdentifiers - List of stored access policies specified on the share. + SignedIdentifiers *[]SignedIdentifier `json:"signedIdentifiers,omitempty"` // SnapshotTime - READ-ONLY; Creation time of share snapshot returned in the response of list shares with expand param "snapshots". SnapshotTime *date.Time `json:"snapshotTime,omitempty"` } @@ -2668,6 +2985,9 @@ func (fsp FileShareProperties) MarshalJSON() ([]byte, error) { if fsp.AccessTier != "" { objectMap["accessTier"] = fsp.AccessTier } + if fsp.SignedIdentifiers != nil { + objectMap["signedIdentifiers"] = fsp.SignedIdentifiers + } return json.Marshal(objectMap) } @@ -2862,10 +3182,12 @@ func (ipp *ImmutabilityPolicyProperties) UnmarshalJSON(body []byte) error { type ImmutabilityPolicyProperty struct { // ImmutabilityPeriodSinceCreationInDays - The immutability period for the blobs in the container since the policy creation, in days. ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` - // State - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked' + // State - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'ImmutabilityPolicyStateLocked', 'ImmutabilityPolicyStateUnlocked' State ImmutabilityPolicyState `json:"state,omitempty"` - // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API + // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + // AllowProtectedAppendWritesAll - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` } // MarshalJSON is the custom marshaler for ImmutabilityPolicyProperty. @@ -2877,6 +3199,37 @@ func (ipp ImmutabilityPolicyProperty) MarshalJSON() ([]byte, error) { if ipp.AllowProtectedAppendWrites != nil { objectMap["allowProtectedAppendWrites"] = ipp.AllowProtectedAppendWrites } + if ipp.AllowProtectedAppendWritesAll != nil { + objectMap["allowProtectedAppendWritesAll"] = ipp.AllowProtectedAppendWritesAll + } + return json.Marshal(objectMap) +} + +// ImmutableStorageAccount this property enables and defines account-level immutability. Enabling the +// feature auto-enables Blob Versioning. +type ImmutableStorageAccount struct { + // Enabled - A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default. + Enabled *bool `json:"enabled,omitempty"` + // ImmutabilityPolicy - Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy. + ImmutabilityPolicy *AccountImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` +} + +// ImmutableStorageWithVersioning object level immutability properties of the container. +type ImmutableStorageWithVersioning struct { + // Enabled - This is an immutable property, when set to true it enables object level immutability at the container level. + Enabled *bool `json:"enabled,omitempty"` + // TimeStamp - READ-ONLY; Returns the date and time the object level immutability was enabled. + TimeStamp *date.Time `json:"timeStamp,omitempty"` + // MigrationState - READ-ONLY; This property denotes the container level immutability to object level immutability migration state. Possible values include: 'MigrationStateInProgress', 'MigrationStateCompleted' + MigrationState MigrationState `json:"migrationState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ImmutableStorageWithVersioning. +func (iswv ImmutableStorageWithVersioning) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iswv.Enabled != nil { + objectMap["enabled"] = iswv.Enabled + } return json.Marshal(objectMap) } @@ -2888,6 +3241,18 @@ type IPRule struct { Action Action `json:"action,omitempty"` } +// KeyCreationTime storage account keys creation time. +type KeyCreationTime struct { + Key1 *date.Time `json:"key1,omitempty"` + Key2 *date.Time `json:"key2,omitempty"` +} + +// KeyPolicy keyPolicy assigned to the storage account. +type KeyPolicy struct { + // KeyExpirationPeriodInDays - The key expiration period in days. + KeyExpirationPeriodInDays *int32 `json:"keyExpirationPeriodInDays,omitempty"` +} + // KeyVaultProperties properties of key vault. type KeyVaultProperties struct { // KeyName - The name of KeyVault key. @@ -2900,6 +3265,8 @@ type KeyVaultProperties struct { CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` // LastKeyRotationTimestamp - READ-ONLY; Timestamp of last rotation of the Key Vault Key. LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"` + // CurrentVersionedKeyExpirationTimestamp - READ-ONLY; This is a read only property that represents the expiration time of the current version of the customer managed key used for encryption. + CurrentVersionedKeyExpirationTimestamp *date.Time `json:"currentVersionedKeyExpirationTimestamp,omitempty"` } // MarshalJSON is the custom marshaler for KeyVaultProperties. @@ -2932,7 +3299,7 @@ type LastAccessTimeTrackingPolicy struct { // LeaseContainerRequest lease Container request schema. type LeaseContainerRequest struct { // Action - Specifies the lease action. Can be one of the available actions. Possible values include: 'Acquire', 'Renew', 'Change', 'Release', 'Break' - Action Action1 `json:"action,omitempty"` + Action LeaseContainerRequestAction `json:"action,omitempty"` // LeaseID - Identifies the lease. Can be specified in any valid GUID string format. LeaseID *string `json:"leaseId,omitempty"` // BreakPeriod - Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. @@ -2952,6 +3319,29 @@ type LeaseContainerResponse struct { LeaseTimeSeconds *string `json:"leaseTimeSeconds,omitempty"` } +// LeaseShareRequest lease Share request schema. +type LeaseShareRequest struct { + // Action - Specifies the lease action. Can be one of the available actions. Possible values include: 'LeaseShareActionAcquire', 'LeaseShareActionRenew', 'LeaseShareActionChange', 'LeaseShareActionRelease', 'LeaseShareActionBreak' + Action LeaseShareAction `json:"action,omitempty"` + // LeaseID - Identifies the lease. Can be specified in any valid GUID string format. + LeaseID *string `json:"leaseId,omitempty"` + // BreakPeriod - Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. + BreakPeriod *int32 `json:"breakPeriod,omitempty"` + // LeaseDuration - Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. + LeaseDuration *int32 `json:"leaseDuration,omitempty"` + // ProposedLeaseID - Optional for acquire, required for change. Proposed lease ID, in a GUID string format. + ProposedLeaseID *string `json:"proposedLeaseId,omitempty"` +} + +// LeaseShareResponse lease Share response schema. +type LeaseShareResponse struct { + autorest.Response `json:"-"` + // LeaseID - Returned unique lease ID that must be included with any request to delete the share, or to renew, change, or release the lease. + LeaseID *string `json:"leaseId,omitempty"` + // LeaseTimeSeconds - Approximate time remaining in the lease period, in seconds. + LeaseTimeSeconds *string `json:"leaseTimeSeconds,omitempty"` +} + // LegalHold the LegalHold property of a blob container. type LegalHold struct { autorest.Response `json:"-"` @@ -2959,6 +3349,8 @@ type LegalHold struct { HasLegalHold *bool `json:"hasLegalHold,omitempty"` // Tags - Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. Tags *[]string `json:"tags,omitempty"` + // AllowProtectedAppendWritesAll - When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` } // MarshalJSON is the custom marshaler for LegalHold. @@ -2967,6 +3359,9 @@ func (lh LegalHold) MarshalJSON() ([]byte, error) { if lh.Tags != nil { objectMap["tags"] = lh.Tags } + if lh.AllowProtectedAppendWritesAll != nil { + objectMap["allowProtectedAppendWritesAll"] = lh.AllowProtectedAppendWritesAll + } return json.Marshal(objectMap) } @@ -2976,6 +3371,8 @@ type LegalHoldProperties struct { HasLegalHold *bool `json:"hasLegalHold,omitempty"` // Tags - The list of LegalHold tags of a blob container. Tags *[]TagProperty `json:"tags,omitempty"` + // ProtectedAppendWritesHistory - Protected append blob writes history. + ProtectedAppendWritesHistory *ProtectedAppendWritesHistory `json:"protectedAppendWritesHistory,omitempty"` } // MarshalJSON is the custom marshaler for LegalHoldProperties. @@ -2984,6 +3381,9 @@ func (lhp LegalHoldProperties) MarshalJSON() ([]byte, error) { if lhp.Tags != nil { objectMap["tags"] = lhp.Tags } + if lhp.ProtectedAppendWritesHistory != nil { + objectMap["protectedAppendWritesHistory"] = lhp.ProtectedAppendWritesHistory + } return json.Marshal(objectMap) } @@ -3718,6 +4118,160 @@ func (lts ListTableServices) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// LocalUser the local user associated with the storage accounts. +type LocalUser struct { + autorest.Response `json:"-"` + // LocalUserProperties - Storage account local user properties. + *LocalUserProperties `json:"properties,omitempty"` + SystemData *SystemData `json:"systemData,omitempty"` + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocalUser. +func (lu LocalUser) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lu.LocalUserProperties != nil { + objectMap["properties"] = lu.LocalUserProperties + } + if lu.SystemData != nil { + objectMap["systemData"] = lu.SystemData + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LocalUser struct. +func (lu *LocalUser) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var localUserProperties LocalUserProperties + err = json.Unmarshal(*v, &localUserProperties) + if err != nil { + return err + } + lu.LocalUserProperties = &localUserProperties + } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + lu.SystemData = &systemData + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lu.Type = &typeVar + } + } + } + + return nil +} + +// LocalUserKeys the Storage Account Local User keys. +type LocalUserKeys struct { + autorest.Response `json:"-"` + SSHAuthorizedKeys *[]SSHPublicKey `json:"sshAuthorizedKeys,omitempty"` + SharedKey *string `json:"sharedKey,omitempty"` +} + +// LocalUserProperties the Storage Account Local User properties. +type LocalUserProperties struct { + // PermissionScopes - The permission scopes of the local user. + PermissionScopes *[]PermissionScope `json:"permissionScopes,omitempty"` + // HomeDirectory - Optional, local user home directory. + HomeDirectory *string `json:"homeDirectory,omitempty"` + SSHAuthorizedKeys *[]SSHPublicKey `json:"sshAuthorizedKeys,omitempty"` + // Sid - READ-ONLY; A unique Security Identifier that is generated by the server. + Sid *string `json:"sid,omitempty"` + // HasSharedKey - Indicates whether shared key exists. Set it to false to remove existing shared key. + HasSharedKey *bool `json:"hasSharedKey,omitempty"` + // HasSSHKey - Indicates whether ssh key exists. Set it to false to remove existing SSH key. + HasSSHKey *bool `json:"hasSshKey,omitempty"` + // HasSSHPassword - Indicates whether ssh password exists. Set it to false to remove existing SSH password. + HasSSHPassword *bool `json:"hasSshPassword,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocalUserProperties. +func (lup LocalUserProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lup.PermissionScopes != nil { + objectMap["permissionScopes"] = lup.PermissionScopes + } + if lup.HomeDirectory != nil { + objectMap["homeDirectory"] = lup.HomeDirectory + } + if lup.SSHAuthorizedKeys != nil { + objectMap["sshAuthorizedKeys"] = lup.SSHAuthorizedKeys + } + if lup.HasSharedKey != nil { + objectMap["hasSharedKey"] = lup.HasSharedKey + } + if lup.HasSSHKey != nil { + objectMap["hasSshKey"] = lup.HasSSHKey + } + if lup.HasSSHPassword != nil { + objectMap["hasSshPassword"] = lup.HasSSHPassword + } + return json.Marshal(objectMap) +} + +// LocalUserRegeneratePasswordResult the secrets of Storage Account Local User. +type LocalUserRegeneratePasswordResult struct { + autorest.Response `json:"-"` + // SSHPassword - READ-ONLY; Auto generated password by the server for SSH authentication if hasSshPassword is set to true on the creation of local user. + SSHPassword *string `json:"sshPassword,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocalUserRegeneratePasswordResult. +func (lurpr LocalUserRegeneratePasswordResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// LocalUsers list storage account local users. +type LocalUsers struct { + autorest.Response `json:"-"` + // Value - The local users associated with the storage account. + Value *[]LocalUser `json:"value,omitempty"` +} + // ManagementPolicy the Get Storage Account ManagementPolicies operation response. type ManagementPolicy struct { autorest.Response `json:"-"` @@ -4028,9 +4582,9 @@ type ObjectReplicationPolicyProperties struct { PolicyID *string `json:"policyId,omitempty"` // EnabledTime - READ-ONLY; Indicates when the policy is enabled on the source account. EnabledTime *date.Time `json:"enabledTime,omitempty"` - // SourceAccount - Required. Source account name. + // SourceAccount - Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false. SourceAccount *string `json:"sourceAccount,omitempty"` - // DestinationAccount - Required. Destination account name. + // DestinationAccount - Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false. DestinationAccount *string `json:"destinationAccount,omitempty"` // Rules - The storage account object replication rules. Rules *[]ObjectReplicationPolicyRule `json:"rules,omitempty"` @@ -4170,6 +4724,16 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } +// PermissionScope ... +type PermissionScope struct { + // Permissions - The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c). + Permissions *string `json:"permissions,omitempty"` + // Service - The service used by the local user, e.g. blob, file. + Service *string `json:"service,omitempty"` + // ResourceName - The name of resource, normally the container name or the file share name, used by the local user. + ResourceName *string `json:"resourceName,omitempty"` +} + // PrivateEndpoint the Private Endpoint resource. type PrivateEndpoint struct { // ID - READ-ONLY; The ARM identifier for Private Endpoint @@ -4382,6 +4946,24 @@ type PrivateLinkServiceConnectionState struct { ActionRequired *string `json:"actionRequired,omitempty"` } +// ProtectedAppendWritesHistory protected append writes history setting for the blob container with Legal +// holds. +type ProtectedAppendWritesHistory struct { + // AllowProtectedAppendWritesAll - When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + // Timestamp - READ-ONLY; Returns the date and time the tag was added. + Timestamp *date.Time `json:"timestamp,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectedAppendWritesHistory. +func (pawh ProtectedAppendWritesHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pawh.AllowProtectedAppendWritesAll != nil { + objectMap["allowProtectedAppendWritesAll"] = pawh.AllowProtectedAppendWritesAll + } + return json.Marshal(objectMap) +} + // ProtocolSettings protocol settings for file service type ProtocolSettings struct { // Smb - Setting for SMB protocol @@ -4652,6 +5234,14 @@ type RoutingPreference struct { PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` } +// SasPolicy sasPolicy assigned to the storage account. +type SasPolicy struct { + // SasExpirationPeriod - The SAS expiration period, DD.HH:MM:SS. + SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` + // ExpirationAction - The SAS expiration action. Can only be Log. + ExpirationAction *string `json:"expirationAction,omitempty"` +} + // ServiceSasParameters the parameters to list service SAS credentials of a specific resource. type ServiceSasParameters struct { // CanonicalizedResource - The canonical path to the signed resource. @@ -4698,11 +5288,19 @@ type ServiceSpecification struct { MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` } +// SignedIdentifier ... +type SignedIdentifier struct { + // ID - An unique identifier of the stored access policy. + ID *string `json:"id,omitempty"` + // AccessPolicy - Access policy + AccessPolicy *AccessPolicy `json:"accessPolicy,omitempty"` +} + // Sku the SKU of the storage account. type Sku struct { // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' Name SkuName `json:"name,omitempty"` - // Tier - Possible values include: 'Standard', 'Premium' + // Tier - Possible values include: 'SkuTierStandard', 'SkuTierPremium' Tier SkuTier `json:"tier,omitempty"` } @@ -4725,7 +5323,7 @@ func (sc SKUCapability) MarshalJSON() ([]byte, error) { type SkuInformation struct { // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' Name SkuName `json:"name,omitempty"` - // Tier - Possible values include: 'Standard', 'Premium' + // Tier - Possible values include: 'SkuTierStandard', 'SkuTierPremium' Tier SkuTier `json:"tier,omitempty"` // ResourceType - READ-ONLY; The type of the resource, usually it is 'storageAccounts'. ResourceType *string `json:"resourceType,omitempty"` @@ -4781,17 +5379,25 @@ type SmbSetting struct { ChannelEncryption *string `json:"channelEncryption,omitempty"` } +// SSHPublicKey ... +type SSHPublicKey struct { + // Description - Optional. It is used to store the function/usage of the key + Description *string `json:"description,omitempty"` + // Key - Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB + Key *string `json:"key,omitempty"` +} + // SystemData metadata pertaining to creation and last modification of the resource. type SystemData struct { // CreatedBy - The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` - // CreatedByType - The type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + // CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' CreatedByType CreatedByType `json:"createdByType,omitempty"` // CreatedAt - The timestamp of resource creation (UTC). CreatedAt *date.Time `json:"createdAt,omitempty"` // LastModifiedBy - The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"` // LastModifiedAt - The timestamp of resource last modification (UTC) LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"` @@ -4870,15 +5476,30 @@ func (t *Table) UnmarshalJSON(body []byte) error { return nil } +// TableAccessPolicy table Access Policy Properties Object. +type TableAccessPolicy struct { + // StartTime - Start time of the access policy + StartTime *date.Time `json:"startTime,omitempty"` + // ExpiryTime - Expiry time of the access policy + ExpiryTime *date.Time `json:"expiryTime,omitempty"` + // Permission - Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d' + Permission *string `json:"permission,omitempty"` +} + // TableProperties ... type TableProperties struct { // TableName - READ-ONLY; Table name under the specified account TableName *string `json:"tableName,omitempty"` + // SignedIdentifiers - List of stored access policies specified on the table. + SignedIdentifiers *[]TableSignedIdentifier `json:"signedIdentifiers,omitempty"` } // MarshalJSON is the custom marshaler for TableProperties. func (tp TableProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if tp.SignedIdentifiers != nil { + objectMap["signedIdentifiers"] = tp.SignedIdentifiers + } return json.Marshal(objectMap) } @@ -4961,6 +5582,14 @@ type TableServicePropertiesProperties struct { Cors *CorsRules `json:"cors,omitempty"` } +// TableSignedIdentifier object to set Table Access Policy. +type TableSignedIdentifier struct { + // ID - unique-64-character-value of the stored access policy. + ID *string `json:"id,omitempty"` + // AccessPolicy - Access policy + AccessPolicy *TableAccessPolicy `json:"accessPolicy,omitempty"` +} + // TagFilter blob index tag based filtering for blob objects type TagFilter struct { // Name - This is the filter tag name, it can have 1 - 128 characters @@ -5032,11 +5661,21 @@ type UpdateHistoryProperty struct { TenantID *string `json:"tenantId,omitempty"` // Upn - READ-ONLY; Returns the User Principal Name of the user who updated the ImmutabilityPolicy. Upn *string `json:"upn,omitempty"` + // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + // AllowProtectedAppendWritesAll - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` } // MarshalJSON is the custom marshaler for UpdateHistoryProperty. func (uhp UpdateHistoryProperty) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if uhp.AllowProtectedAppendWrites != nil { + objectMap["allowProtectedAppendWrites"] = uhp.AllowProtectedAppendWrites + } + if uhp.AllowProtectedAppendWritesAll != nil { + objectMap["allowProtectedAppendWritesAll"] = uhp.AllowProtectedAppendWritesAll + } return json.Marshal(objectMap) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/objectreplicationpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/objectreplicationpolicies.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/objectreplicationpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/objectreplicationpolicies.go index 941873cc2..6cb321648 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/objectreplicationpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/objectreplicationpolicies.go @@ -38,7 +38,10 @@ func NewObjectReplicationPoliciesClientWithBaseURI(baseURI string, subscriptionI // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. +// objectReplicationPolicyID - for the destination account, provide the value 'default'. Configure the policy +// on the destination account first. For the source account, provide the value of the policy ID that is +// returned when you download the policy that was defined on the destination account. The policy is downloaded +// as a JSON file. // properties - the object replication policy set to a storage account. A unique policy ID will be created if // absent. func (client ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy) (result ObjectReplicationPolicy, err error) { @@ -103,7 +106,7 @@ func (client ObjectReplicationPoliciesClient) CreateOrUpdatePreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -142,7 +145,10 @@ func (client ObjectReplicationPoliciesClient) CreateOrUpdateResponder(resp *http // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. +// objectReplicationPolicyID - for the destination account, provide the value 'default'. Configure the policy +// on the destination account first. For the source account, provide the value of the policy ID that is +// returned when you download the policy that was defined on the destination account. The policy is downloaded +// as a JSON file. func (client ObjectReplicationPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.Delete") @@ -200,7 +206,7 @@ func (client ObjectReplicationPoliciesClient) DeletePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -236,7 +242,10 @@ func (client ObjectReplicationPoliciesClient) DeleteResponder(resp *http.Respons // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. +// objectReplicationPolicyID - for the destination account, provide the value 'default'. Configure the policy +// on the destination account first. For the source account, provide the value of the policy ID that is +// returned when you download the policy that was defined on the destination account. The policy is downloaded +// as a JSON file. func (client ObjectReplicationPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result ObjectReplicationPolicy, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.Get") @@ -294,7 +303,7 @@ func (client ObjectReplicationPoliciesClient) GetPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -385,7 +394,7 @@ func (client ObjectReplicationPoliciesClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/operations.go index 9d8ed4d51..59677e8db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/operations.go @@ -66,7 +66,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/privateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/privateendpointconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/privateendpointconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/privateendpointconnections.go index 7dfd82928..39beaf863 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/privateendpointconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/privateendpointconnections.go @@ -95,7 +95,7 @@ func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -188,7 +188,7 @@ func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,7 +279,7 @@ func (client PrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -377,7 +377,7 @@ func (client PrivateEndpointConnectionsClient) PutPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/privatelinkresources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/privatelinkresources.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/privatelinkresources.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/privatelinkresources.go index 40ceea057..dcb2c19b9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/privatelinkresources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/privatelinkresources.go @@ -92,7 +92,7 @@ func (client PrivateLinkResourcesClient) ListByStorageAccountPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/queue.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/queue.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/queue.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/queue.go index 86df9d224..6a10a3300 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/queue.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/queue.go @@ -99,7 +99,7 @@ func (client QueueClient) CreatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,7 +199,7 @@ func (client QueueClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -296,7 +296,7 @@ func (client QueueClient) GetPreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -395,7 +395,7 @@ func (client QueueClient) ListPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -537,7 +537,7 @@ func (client QueueClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/queueservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/queueservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/queueservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/queueservices.go index ea8738f40..c38e69c64 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/queueservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/queueservices.go @@ -93,7 +93,7 @@ func (client QueueServicesClient) GetServicePropertiesPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client QueueServicesClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,7 +279,7 @@ func (client QueueServicesClient) SetServicePropertiesPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/skus.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/skus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/skus.go index 9026d22d1..b6adffd79 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/skus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/skus.go @@ -77,7 +77,7 @@ func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/table.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/table.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/table.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/table.go index 951a97534..b4eb890f0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/table.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/table.go @@ -39,7 +39,8 @@ func NewTableClientWithBaseURI(baseURI string, subscriptionID string) TableClien // must be between 3 and 24 characters in length and use numbers and lower-case letters only. // tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The // name must comprise of only alphanumeric characters and it cannot begin with a numeric character. -func (client TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { +// parameters - the parameters to provide to create a table. +func (client TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, tableName string, parameters *Table) (result Table, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Create") defer func() { @@ -67,7 +68,7 @@ func (client TableClient) Create(ctx context.Context, resourceGroupName string, return result, validation.NewError("storage.TableClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, tableName) + req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, tableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", nil, "Failure preparing request") return @@ -90,7 +91,7 @@ func (client TableClient) Create(ctx context.Context, resourceGroupName string, } // CreatePreparer prepares the Create request. -func (client TableClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { +func (client TableClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string, parameters *Table) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -98,16 +99,21 @@ func (client TableClient) CreatePreparer(ctx context.Context, resourceGroupName "tableName": autorest.Encode("path", tableName), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -196,7 +202,7 @@ func (client TableClient) DeletePreparer(ctx context.Context, resourceGroupName "tableName": autorest.Encode("path", tableName), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -293,7 +299,7 @@ func (client TableClient) GetPreparer(ctx context.Context, resourceGroupName str "tableName": autorest.Encode("path", tableName), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -389,7 +395,7 @@ func (client TableClient) ListPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -465,7 +471,8 @@ func (client TableClient) ListComplete(ctx context.Context, resourceGroupName st // must be between 3 and 24 characters in length and use numbers and lower-case letters only. // tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The // name must comprise of only alphanumeric characters and it cannot begin with a numeric character. -func (client TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { +// parameters - the parameters to provide to create a table. +func (client TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, tableName string, parameters *Table) (result Table, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Update") defer func() { @@ -493,7 +500,7 @@ func (client TableClient) Update(ctx context.Context, resourceGroupName string, return result, validation.NewError("storage.TableClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, tableName) + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, tableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", nil, "Failure preparing request") return @@ -516,7 +523,7 @@ func (client TableClient) Update(ctx context.Context, resourceGroupName string, } // UpdatePreparer prepares the Update request. -func (client TableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { +func (client TableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string, parameters *Table) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -524,16 +531,21 @@ func (client TableClient) UpdatePreparer(ctx context.Context, resourceGroupName "tableName": autorest.Encode("path", tableName), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/tableservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/tableservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/tableservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/tableservices.go index 1f3b61d6c..e352777cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/tableservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/tableservices.go @@ -93,7 +93,7 @@ func (client TableServicesClient) GetServicePropertiesPreparer(ctx context.Conte "tableServiceName": autorest.Encode("path", "default"), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client TableServicesClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,7 +279,7 @@ func (client TableServicesClient) SetServicePropertiesPreparer(ctx context.Conte "tableServiceName": autorest.Encode("path", "default"), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/usages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/usages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/usages.go index 2c52aa4ee..f322592dc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/usages.go @@ -80,7 +80,7 @@ func (client UsagesClient) ListByLocationPreparer(ctx context.Context, location "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-01-01" + const APIVersion = "2022-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/version.go similarity index 90% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/version.go index e2e0ac465..ca22e850a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage/version.go @@ -10,7 +10,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " storage/2021-01-01" + return "Azure-SDK-For-Go/" + Version() + " storage/2022-05-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/modules.txt b/vendor/modules.txt index e03ea6342..5174bac13 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -29,7 +29,7 @@ github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2022-08-01/compute github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-10-01/resources github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2021-01-01/subscriptions -github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage +github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2022-05-01/storage github.com/Azure/azure-sdk-for-go/storage github.com/Azure/azure-sdk-for-go/version # github.com/Azure/go-autorest v14.2.0+incompatible