[Storage] Swagger update for STG 94 (#23236)

* Update swagger to stg94 - azblob and azfiles

* service version update

* datalake code generated

* remove extra line from autorest transform

* datalake generated code

* datalake generated code

* datalake generated code
This commit is contained in:
tanyasethi-msft 2024-07-25 01:17:49 +05:30 коммит произвёл GitHub
Родитель d9cf9393de
Коммит 7d70d0f6bd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
25 изменённых файлов: 354 добавлений и 274 удалений

Просмотреть файл

@ -7,7 +7,7 @@ go: true
clear-output-folder: false
version: "^3.0.0"
license-header: MICROSOFT_MIT_NO_VERSION
input-file: "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/a32d0b2423d19835246bb2ef92941503bfd5e734/specification/storage/data-plane/Microsoft.BlobStorage/preview/2021-12-02/blob.json"
input-file: "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/f6f50c6388fd5836fa142384641b8353a99874ef/specification/storage/data-plane/Microsoft.BlobStorage/stable/2024-08-04/blob.json"
credential-scope: "https://storage.azure.com/.default"
output-folder: ../generated
file-prefix: "zz_"
@ -22,7 +22,7 @@ export-clients: true
use: "@autorest/go@4.0.0-preview.65"
```
### Updating service version to 2024-05-04
### Updating service version to 2024-08-04
```yaml
directive:
- from:
@ -35,8 +35,7 @@ directive:
where: $
transform: >-
return $.
replaceAll(`[]string{"2021-12-02"}`, `[]string{ServiceVersion}`).
replaceAll(`2021-12-02`, `2024-05-04`);
replaceAll(`[]string{"2021-12-02"}`, `[]string{ServiceVersion}`);
```
### Undo breaking change with BlobName

Просмотреть файл

@ -6,4 +6,4 @@
package generated
const ServiceVersion = "2024-05-04"
const ServiceVersion = "2024-08-04"

Просмотреть файл

@ -29,7 +29,7 @@ type AppendBlobClient struct {
// AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - contentLength - The length of the request.
// - body - Initial data
// - options - AppendBlobClientAppendBlockOptions contains the optional parameters for the AppendBlobClient.AppendBlock method.
@ -116,7 +116,7 @@ func (client *AppendBlobClient) appendBlockCreateRequest(ctx context.Context, co
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := req.SetBody(body, "application/octet-stream"); err != nil {
return nil, err
}
@ -198,7 +198,7 @@ func (client *AppendBlobClient) appendBlockHandleResponse(resp *http.Response) (
// created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - sourceURL - Specify a URL to the copy source.
// - contentLength - The length of the request.
// - options - AppendBlobClientAppendBlockFromURLOptions contains the optional parameters for the AppendBlobClient.AppendBlockFromURL
@ -310,7 +310,7 @@ func (client *AppendBlobClient) appendBlockFromURLCreateRequest(ctx context.Cont
if options != nil && options.SourceRange != nil {
req.Raw().Header["x-ms-source-range"] = []string{*options.SourceRange}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -384,7 +384,7 @@ func (client *AppendBlobClient) appendBlockFromURLHandleResponse(resp *http.Resp
// Create - The Create Append Blob operation creates a new append blob.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - contentLength - The length of the request.
// - options - AppendBlobClientCreateOptions contains the optional parameters for the AppendBlobClient.Create method.
// - BlobHTTPHeaders - BlobHTTPHeaders contains a group of parameters for the BlobClient.SetHTTPHeaders method.
@ -494,7 +494,7 @@ func (client *AppendBlobClient) createCreateRequest(ctx context.Context, content
if options != nil && options.BlobTagsString != nil {
req.Raw().Header["x-ms-tags"] = []string{*options.BlobTagsString}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -557,7 +557,7 @@ func (client *AppendBlobClient) createHandleResponse(resp *http.Response) (Appen
// or later.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - AppendBlobClientSealOptions contains the optional parameters for the AppendBlobClient.Seal method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -615,7 +615,7 @@ func (client *AppendBlobClient) sealCreateRequest(ctx context.Context, options *
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}

Просмотреть файл

@ -29,7 +29,7 @@ type BlobClient struct {
// blob with zero length and full metadata.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - copyID - The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
// - options - BlobClientAbortCopyFromURLOptions contains the optional parameters for the BlobClient.AbortCopyFromURL method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
@ -72,7 +72,7 @@ func (client *BlobClient) abortCopyFromURLCreateRequest(ctx context.Context, cop
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -101,7 +101,7 @@ func (client *BlobClient) abortCopyFromURLHandleResponse(resp *http.Response) (B
// AcquireLease - [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - duration - Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite
// lease can be between 15 and 60 seconds. A lease duration cannot be changed using
// renew or change.
@ -161,7 +161,7 @@ func (client *BlobClient) acquireLeaseCreateRequest(ctx context.Context, duratio
if options != nil && options.ProposedLeaseID != nil {
req.Raw().Header["x-ms-proposed-lease-id"] = []string{*options.ProposedLeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -203,7 +203,7 @@ func (client *BlobClient) acquireLeaseHandleResponse(resp *http.Response) (BlobC
// BreakLease - [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientBreakLeaseOptions contains the optional parameters for the BlobClient.BreakLease method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *BlobClient) BreakLease(ctx context.Context, options *BlobClientBreakLeaseOptions, modifiedAccessConditions *ModifiedAccessConditions) (BlobClientBreakLeaseResponse, error) {
@ -259,7 +259,7 @@ func (client *BlobClient) breakLeaseCreateRequest(ctx context.Context, options *
if options != nil && options.BreakPeriod != nil {
req.Raw().Header["x-ms-lease-break-period"] = []string{strconv.FormatInt(int64(*options.BreakPeriod), 10)}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -306,7 +306,7 @@ func (client *BlobClient) breakLeaseHandleResponse(resp *http.Response) (BlobCli
// ChangeLease - [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - proposedLeaseID - Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed
// lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
@ -365,7 +365,7 @@ func (client *BlobClient) changeLeaseCreateRequest(ctx context.Context, leaseID
req.Raw().Header["x-ms-lease-action"] = []string{"change"}
req.Raw().Header["x-ms-lease-id"] = []string{leaseID}
req.Raw().Header["x-ms-proposed-lease-id"] = []string{proposedLeaseID}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -408,7 +408,7 @@ func (client *BlobClient) changeLeaseHandleResponse(resp *http.Response) (BlobCl
// until the copy is complete.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - copySource - Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies
// a page blob snapshot. The value should be URL-encoded as it would appear in a request
// URI. The source blob must either be public or must be authenticated via a shared access signature.
@ -517,7 +517,7 @@ func (client *BlobClient) copyFromURLCreateRequest(ctx context.Context, copySour
if options != nil && options.BlobTagsString != nil {
req.Raw().Header["x-ms-tags"] = []string{*options.BlobTagsString}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -582,7 +582,7 @@ func (client *BlobClient) copyFromURLHandleResponse(resp *http.Response) (BlobCl
// CreateSnapshot - The Create Snapshot operation creates a read-only snapshot of a blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientCreateSnapshotOptions contains the optional parameters for the BlobClient.CreateSnapshot method.
// - CPKInfo - CPKInfo contains a group of parameters for the BlobClient.Download method.
// - CPKScopeInfo - CPKScopeInfo contains a group of parameters for the BlobClient.SetMetadata method.
@ -659,7 +659,7 @@ func (client *BlobClient) createSnapshotCreateRequest(ctx context.Context, optio
}
}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -721,7 +721,7 @@ func (client *BlobClient) createSnapshotHandleResponse(resp *http.Response) (Blo
// return an HTTP status code of 404 (ResourceNotFound).
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientDeleteOptions contains the optional parameters for the BlobClient.Delete method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -788,7 +788,7 @@ func (client *BlobClient) deleteCreateRequest(ctx context.Context, options *Blob
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -817,7 +817,7 @@ func (client *BlobClient) deleteHandleResponse(resp *http.Response) (BlobClientD
// DeleteImmutabilityPolicy - The Delete Immutability Policy operation deletes the immutability policy on the blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientDeleteImmutabilityPolicyOptions contains the optional parameters for the BlobClient.DeleteImmutabilityPolicy
// method.
func (client *BlobClient) DeleteImmutabilityPolicy(ctx context.Context, options *BlobClientDeleteImmutabilityPolicyOptions) (BlobClientDeleteImmutabilityPolicyResponse, error) {
@ -854,7 +854,7 @@ func (client *BlobClient) deleteImmutabilityPolicyCreateRequest(ctx context.Cont
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -884,7 +884,7 @@ func (client *BlobClient) deleteImmutabilityPolicyHandleResponse(resp *http.Resp
// can also call Download to read a snapshot.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientDownloadOptions contains the optional parameters for the BlobClient.Download method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - CPKInfo - CPKInfo contains a group of parameters for the BlobClient.Download method.
@ -965,7 +965,7 @@ func (client *BlobClient) downloadCreateRequest(ctx context.Context, options *Bl
if options != nil && options.RangeGetContentMD5 != nil {
req.Raw().Header["x-ms-range-get-content-md5"] = []string{strconv.FormatBool(*options.RangeGetContentMD5)}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1192,7 +1192,7 @@ func (client *BlobClient) downloadHandleResponse(resp *http.Response) (BlobClien
// GetAccountInfo - Returns the sku name and account kind
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientGetAccountInfoOptions contains the optional parameters for the BlobClient.GetAccountInfo method.
func (client *BlobClient) GetAccountInfo(ctx context.Context, options *BlobClientGetAccountInfoOptions) (BlobClientGetAccountInfoResponse, error) {
var err error
@ -1221,9 +1221,15 @@ func (client *BlobClient) getAccountInfoCreateRequest(ctx context.Context, optio
reqQP := req.Raw().URL.Query()
reqQP.Set("comp", "properties")
reqQP.Set("restype", "account")
if options != nil && options.Timeout != nil {
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/xml"}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1243,6 +1249,13 @@ func (client *BlobClient) getAccountInfoHandleResponse(resp *http.Response) (Blo
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-is-hns-enabled"); val != "" {
isHierarchicalNamespaceEnabled, err := strconv.ParseBool(val)
if err != nil {
return BlobClientGetAccountInfoResponse{}, err
}
result.IsHierarchicalNamespaceEnabled = &isHierarchicalNamespaceEnabled
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
@ -1259,7 +1272,7 @@ func (client *BlobClient) getAccountInfoHandleResponse(resp *http.Response) (Blo
// for the blob. It does not return the content of the blob.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientGetPropertiesOptions contains the optional parameters for the BlobClient.GetProperties method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - CPKInfo - CPKInfo contains a group of parameters for the BlobClient.Download method.
@ -1330,7 +1343,7 @@ func (client *BlobClient) getPropertiesCreateRequest(ctx context.Context, option
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1577,7 +1590,7 @@ func (client *BlobClient) getPropertiesHandleResponse(resp *http.Response) (Blob
// GetTags - The Get Tags operation enables users to get the tags associated with a blob.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientGetTagsOptions contains the optional parameters for the BlobClient.GetTags method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
@ -1627,7 +1640,7 @@ func (client *BlobClient) getTagsCreateRequest(ctx context.Context, options *Blo
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1659,7 +1672,7 @@ func (client *BlobClient) getTagsHandleResponse(resp *http.Response) (BlobClient
// Query - The Query operation enables users to select/project on blob data by providing simple query expressions.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientQueryOptions contains the optional parameters for the BlobClient.Query method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - CPKInfo - CPKInfo contains a group of parameters for the BlobClient.Download method.
@ -1729,7 +1742,7 @@ func (client *BlobClient) queryCreateRequest(ctx context.Context, options *BlobC
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.QueryRequest != nil {
if err := runtime.MarshalAsXML(req, *options.QueryRequest); err != nil {
return nil, err
@ -1893,7 +1906,7 @@ func (client *BlobClient) queryHandleResponse(resp *http.Response) (BlobClientQu
// ReleaseLease - [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - options - BlobClientReleaseLeaseOptions contains the optional parameters for the BlobClient.ReleaseLease method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -1948,7 +1961,7 @@ func (client *BlobClient) releaseLeaseCreateRequest(ctx context.Context, leaseID
}
req.Raw().Header["x-ms-lease-action"] = []string{"release"}
req.Raw().Header["x-ms-lease-id"] = []string{leaseID}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1987,7 +2000,7 @@ func (client *BlobClient) releaseLeaseHandleResponse(resp *http.Response) (BlobC
// RenewLease - [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - options - BlobClientRenewLeaseOptions contains the optional parameters for the BlobClient.RenewLease method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -2042,7 +2055,7 @@ func (client *BlobClient) renewLeaseCreateRequest(ctx context.Context, leaseID s
}
req.Raw().Header["x-ms-lease-action"] = []string{"renew"}
req.Raw().Header["x-ms-lease-id"] = []string{leaseID}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -2084,7 +2097,7 @@ func (client *BlobClient) renewLeaseHandleResponse(resp *http.Response) (BlobCli
// SetExpiry - Sets the time a blob will expire and be deleted.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - expiryOptions - Required. Indicates mode of the expiry time
// - options - BlobClientSetExpiryOptions contains the optional parameters for the BlobClient.SetExpiry method.
func (client *BlobClient) SetExpiry(ctx context.Context, expiryOptions ExpiryOptions, options *BlobClientSetExpiryOptions) (BlobClientSetExpiryResponse, error) {
@ -2125,7 +2138,7 @@ func (client *BlobClient) setExpiryCreateRequest(ctx context.Context, expiryOpti
if options != nil && options.ExpiresOn != nil {
req.Raw().Header["x-ms-expiry-time"] = []string{*options.ExpiresOn}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -2164,7 +2177,7 @@ func (client *BlobClient) setExpiryHandleResponse(resp *http.Response) (BlobClie
// SetHTTPHeaders - The Set HTTP Headers operation sets system properties on the blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientSetHTTPHeadersOptions contains the optional parameters for the BlobClient.SetHTTPHeaders method.
// - BlobHTTPHeaders - BlobHTTPHeaders contains a group of parameters for the BlobClient.SetHTTPHeaders method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
@ -2239,7 +2252,7 @@ func (client *BlobClient) setHTTPHeadersCreateRequest(ctx context.Context, optio
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -2285,7 +2298,7 @@ func (client *BlobClient) setHTTPHeadersHandleResponse(resp *http.Response) (Blo
// SetImmutabilityPolicy - The Set Immutability Policy operation sets the immutability policy on the blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientSetImmutabilityPolicyOptions contains the optional parameters for the BlobClient.SetImmutabilityPolicy
// method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -2332,7 +2345,7 @@ func (client *BlobClient) setImmutabilityPolicyCreateRequest(ctx context.Context
if options != nil && options.ImmutabilityPolicyExpiry != nil {
req.Raw().Header["x-ms-immutability-policy-until-date"] = []string{(*options.ImmutabilityPolicyExpiry).In(gmt).Format(time.RFC1123)}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -2371,7 +2384,7 @@ func (client *BlobClient) setImmutabilityPolicyHandleResponse(resp *http.Respons
// SetLegalHold - The Set Legal Hold operation sets a legal hold on the blob.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - legalHold - Specified if a legal hold should be set on the blob.
// - options - BlobClientSetLegalHoldOptions contains the optional parameters for the BlobClient.SetLegalHold method.
func (client *BlobClient) SetLegalHold(ctx context.Context, legalHold bool, options *BlobClientSetLegalHoldOptions) (BlobClientSetLegalHoldResponse, error) {
@ -2409,7 +2422,7 @@ func (client *BlobClient) setLegalHoldCreateRequest(ctx context.Context, legalHo
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-legal-hold"] = []string{strconv.FormatBool(legalHold)}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -2446,7 +2459,7 @@ func (client *BlobClient) setLegalHoldHandleResponse(resp *http.Response) (BlobC
// pairs
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientSetMetadataOptions contains the optional parameters for the BlobClient.SetMetadata method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - CPKInfo - CPKInfo contains a group of parameters for the BlobClient.Download method.
@ -2523,7 +2536,7 @@ func (client *BlobClient) setMetadataCreateRequest(ctx context.Context, options
}
}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -2578,7 +2591,7 @@ func (client *BlobClient) setMetadataHandleResponse(resp *http.Response) (BlobCl
// SetTags - The Set Tags operation enables users to set tags on a blob.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - tags - Blob tags
// - options - BlobClientSetTagsOptions contains the optional parameters for the BlobClient.SetTags method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -2632,7 +2645,7 @@ func (client *BlobClient) setTagsCreateRequest(ctx context.Context, tags BlobTag
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := runtime.MarshalAsXML(req, tags); err != nil {
return nil, err
}
@ -2667,7 +2680,7 @@ func (client *BlobClient) setTagsHandleResponse(resp *http.Response) (BlobClient
// storage type. This operation does not update the blob's ETag.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - tier - Indicates the tier to be set on the blob.
// - options - BlobClientSetTierOptions contains the optional parameters for the BlobClient.SetTier method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
@ -2722,7 +2735,7 @@ func (client *BlobClient) setTierCreateRequest(ctx context.Context, tier AccessT
if options != nil && options.RehydratePriority != nil {
req.Raw().Header["x-ms-rehydrate-priority"] = []string{string(*options.RehydratePriority)}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -2744,7 +2757,7 @@ func (client *BlobClient) setTierHandleResponse(resp *http.Response) (BlobClient
// StartCopyFromURL - The Start Copy From URL operation copies a blob or an internet resource to a new blob.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - copySource - Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies
// a page blob snapshot. The value should be URL-encoded as it would appear in a request
// URI. The source blob must either be public or must be authenticated via a shared access signature.
@ -2848,7 +2861,7 @@ func (client *BlobClient) startCopyFromURLCreateRequest(ctx context.Context, cop
if options != nil && options.BlobTagsString != nil {
req.Raw().Header["x-ms-tags"] = []string{*options.BlobTagsString}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -2896,7 +2909,7 @@ func (client *BlobClient) startCopyFromURLHandleResponse(resp *http.Response) (B
// Undelete - Undelete a blob that was previously soft deleted
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - BlobClientUndeleteOptions contains the optional parameters for the BlobClient.Undelete method.
func (client *BlobClient) Undelete(ctx context.Context, options *BlobClientUndeleteOptions) (BlobClientUndeleteResponse, error) {
var err error
@ -2932,7 +2945,7 @@ func (client *BlobClient) undeleteCreateRequest(ctx context.Context, options *Bl
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}

Просмотреть файл

@ -33,7 +33,7 @@ type BlockBlobClient struct {
// belong to.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - blocks - Blob Blocks.
// - options - BlockBlobClientCommitBlockListOptions contains the optional parameters for the BlockBlobClient.CommitBlockList
// method.
@ -152,7 +152,7 @@ func (client *BlockBlobClient) commitBlockListCreateRequest(ctx context.Context,
if options != nil && options.BlobTagsString != nil {
req.Raw().Header["x-ms-tags"] = []string{*options.BlobTagsString}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := runtime.MarshalAsXML(req, blocks); err != nil {
return nil, err
}
@ -224,7 +224,7 @@ func (client *BlockBlobClient) commitBlockListHandleResponse(resp *http.Response
// GetBlockList - The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - listType - Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together.
// - options - BlockBlobClientGetBlockListOptions contains the optional parameters for the BlockBlobClient.GetBlockList method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
@ -273,7 +273,7 @@ func (client *BlockBlobClient) getBlockListCreateRequest(ctx context.Context, li
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -329,7 +329,7 @@ func (client *BlockBlobClient) getBlockListHandleResponse(resp *http.Response) (
// Block from URL API in conjunction with Put Block List.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - contentLength - The length of the request.
// - copySource - Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies
// a page blob snapshot. The value should be URL-encoded as it would appear in a request
@ -470,7 +470,7 @@ func (client *BlockBlobClient) putBlobFromURLCreateRequest(ctx context.Context,
if options != nil && options.BlobTagsString != nil {
req.Raw().Header["x-ms-tags"] = []string{*options.BlobTagsString}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -532,7 +532,7 @@ func (client *BlockBlobClient) putBlobFromURLHandleResponse(resp *http.Response)
// StageBlock - The Stage Block operation creates a new block to be committed as part of a blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - blockID - A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal
// to 64 bytes in size. For a given blob, the length of the value specified for the blockid
// parameter must be the same size for each block.
@ -599,7 +599,7 @@ func (client *BlockBlobClient) stageBlockCreateRequest(ctx context.Context, bloc
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := req.SetBody(body, "application/octet-stream"); err != nil {
return nil, err
}
@ -659,7 +659,7 @@ func (client *BlockBlobClient) stageBlockHandleResponse(resp *http.Response) (Bl
// are read from a URL.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - blockID - A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal
// to 64 bytes in size. For a given blob, the length of the value specified for the blockid
// parameter must be the same size for each block.
@ -748,7 +748,7 @@ func (client *BlockBlobClient) stageBlockFromURLCreateRequest(ctx context.Contex
if options != nil && options.SourceRange != nil {
req.Raw().Header["x-ms-source-range"] = []string{*options.SourceRange}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -807,7 +807,7 @@ func (client *BlockBlobClient) stageBlockFromURLHandleResponse(resp *http.Respon
// the content of a block blob, use the Put Block List operation.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - contentLength - The length of the request.
// - body - Initial data
// - options - BlockBlobClientUploadOptions contains the optional parameters for the BlockBlobClient.Upload method.
@ -927,7 +927,7 @@ func (client *BlockBlobClient) uploadCreateRequest(ctx context.Context, contentL
if options != nil && options.BlobTagsString != nil {
req.Raw().Header["x-ms-tags"] = []string{*options.BlobTagsString}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := req.SetBody(body, "application/octet-stream"); err != nil {
return nil, err
}

Просмотреть файл

@ -31,7 +31,7 @@ type ContainerClient struct {
// to 60 seconds, or can be infinite
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - duration - Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite
// lease can be between 15 and 60 seconds. A lease duration cannot be changed using
// renew or change.
@ -83,7 +83,7 @@ func (client *ContainerClient) acquireLeaseCreateRequest(ctx context.Context, du
if options != nil && options.ProposedLeaseID != nil {
req.Raw().Header["x-ms-proposed-lease-id"] = []string{*options.ProposedLeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -126,7 +126,7 @@ func (client *ContainerClient) acquireLeaseHandleResponse(resp *http.Response) (
// to 60 seconds, or can be infinite
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ContainerClientBreakLeaseOptions contains the optional parameters for the ContainerClient.BreakLease method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *ContainerClient) BreakLease(ctx context.Context, options *ContainerClientBreakLeaseOptions, modifiedAccessConditions *ModifiedAccessConditions) (ContainerClientBreakLeaseResponse, error) {
@ -174,7 +174,7 @@ func (client *ContainerClient) breakLeaseCreateRequest(ctx context.Context, opti
if options != nil && options.BreakPeriod != nil {
req.Raw().Header["x-ms-lease-break-period"] = []string{strconv.FormatInt(int64(*options.BreakPeriod), 10)}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -222,7 +222,7 @@ func (client *ContainerClient) breakLeaseHandleResponse(resp *http.Response) (Co
// to 60 seconds, or can be infinite
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - proposedLeaseID - Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed
// lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
@ -273,7 +273,7 @@ func (client *ContainerClient) changeLeaseCreateRequest(ctx context.Context, lea
req.Raw().Header["x-ms-lease-action"] = []string{"change"}
req.Raw().Header["x-ms-lease-id"] = []string{leaseID}
req.Raw().Header["x-ms-proposed-lease-id"] = []string{proposedLeaseID}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -316,7 +316,7 @@ func (client *ContainerClient) changeLeaseHandleResponse(resp *http.Response) (C
// fails
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ContainerClientCreateOptions contains the optional parameters for the ContainerClient.Create method.
// - ContainerCPKScopeInfo - ContainerCPKScopeInfo contains a group of parameters for the ContainerClient.Create method.
func (client *ContainerClient) Create(ctx context.Context, options *ContainerClientCreateOptions, containerCPKScopeInfo *ContainerCPKScopeInfo) (ContainerClientCreateResponse, error) {
@ -369,7 +369,7 @@ func (client *ContainerClient) createCreateRequest(ctx context.Context, options
}
}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -409,7 +409,7 @@ func (client *ContainerClient) createHandleResponse(resp *http.Response) (Contai
// deleted during garbage collection
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ContainerClientDeleteOptions contains the optional parameters for the ContainerClient.Delete method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -456,7 +456,7 @@ func (client *ContainerClient) deleteCreateRequest(ctx context.Context, options
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -486,7 +486,7 @@ func (client *ContainerClient) deleteHandleResponse(resp *http.Response) (Contai
// Filter blobs searches within the given container.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - where - Filters the results to return only to return only blobs whose tags match the specified expression.
// - options - ContainerClientFilterBlobsOptions contains the optional parameters for the ContainerClient.FilterBlobs method.
func (client *ContainerClient) FilterBlobs(ctx context.Context, where string, options *ContainerClientFilterBlobsOptions) (ContainerClientFilterBlobsResponse, error) {
@ -534,7 +534,7 @@ func (client *ContainerClient) filterBlobsCreateRequest(ctx context.Context, whe
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -567,7 +567,7 @@ func (client *ContainerClient) filterBlobsHandleResponse(resp *http.Response) (C
// be accessed publicly.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ContainerClientGetAccessPolicyOptions contains the optional parameters for the ContainerClient.GetAccessPolicy
// method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
@ -609,7 +609,7 @@ func (client *ContainerClient) getAccessPolicyCreateRequest(ctx context.Context,
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -654,7 +654,7 @@ func (client *ContainerClient) getAccessPolicyHandleResponse(resp *http.Response
// GetAccountInfo - Returns the sku name and account kind
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ContainerClientGetAccountInfoOptions contains the optional parameters for the ContainerClient.GetAccountInfo
// method.
func (client *ContainerClient) GetAccountInfo(ctx context.Context, options *ContainerClientGetAccountInfoOptions) (ContainerClientGetAccountInfoResponse, error) {
@ -684,9 +684,15 @@ func (client *ContainerClient) getAccountInfoCreateRequest(ctx context.Context,
reqQP := req.Raw().URL.Query()
reqQP.Set("comp", "properties")
reqQP.Set("restype", "account")
if options != nil && options.Timeout != nil {
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/xml"}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -706,6 +712,13 @@ func (client *ContainerClient) getAccountInfoHandleResponse(resp *http.Response)
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-is-hns-enabled"); val != "" {
isHierarchicalNamespaceEnabled, err := strconv.ParseBool(val)
if err != nil {
return ContainerClientGetAccountInfoResponse{}, err
}
result.IsHierarchicalNamespaceEnabled = &isHierarchicalNamespaceEnabled
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
@ -722,7 +735,7 @@ func (client *ContainerClient) getAccountInfoHandleResponse(resp *http.Response)
// does not include the container's list of blobs
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ContainerClientGetPropertiesOptions contains the optional parameters for the ContainerClient.GetProperties method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
func (client *ContainerClient) GetProperties(ctx context.Context, options *ContainerClientGetPropertiesOptions, leaseAccessConditions *LeaseAccessConditions) (ContainerClientGetPropertiesResponse, error) {
@ -762,7 +775,7 @@ func (client *ContainerClient) getPropertiesCreateRequest(ctx context.Context, o
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -851,7 +864,7 @@ func (client *ContainerClient) getPropertiesHandleResponse(resp *http.Response)
// NewListBlobFlatSegmentPager - [Update] The List Blobs operation returns a list of the blobs under the specified container
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ContainerClientListBlobFlatSegmentOptions contains the optional parameters for the ContainerClient.NewListBlobFlatSegmentPager
// method.
//
@ -884,7 +897,7 @@ func (client *ContainerClient) ListBlobFlatSegmentCreateRequest(ctx context.Cont
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -918,7 +931,7 @@ func (client *ContainerClient) ListBlobFlatSegmentHandleResponse(resp *http.Resp
// NewListBlobHierarchySegmentPager - [Update] The List Blobs operation returns a list of the blobs under the specified container
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - delimiter - When the request includes this parameter, the operation returns a BlobPrefix element in the response body that
// acts as a placeholder for all blobs whose names begin with the same substring up to the
// appearance of the delimiter character. The delimiter may be a single character or a string.
@ -975,7 +988,7 @@ func (client *ContainerClient) ListBlobHierarchySegmentCreateRequest(ctx context
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1011,7 +1024,7 @@ func (client *ContainerClient) ListBlobHierarchySegmentHandleResponse(resp *http
// to 60 seconds, or can be infinite
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - options - ContainerClientReleaseLeaseOptions contains the optional parameters for the ContainerClient.ReleaseLease method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -1058,7 +1071,7 @@ func (client *ContainerClient) releaseLeaseCreateRequest(ctx context.Context, le
}
req.Raw().Header["x-ms-lease-action"] = []string{"release"}
req.Raw().Header["x-ms-lease-id"] = []string{leaseID}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1097,7 +1110,7 @@ func (client *ContainerClient) releaseLeaseHandleResponse(resp *http.Response) (
// Rename - Renames an existing container.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - sourceContainerName - Required. Specifies the name of the container to rename.
// - options - ContainerClientRenameOptions contains the optional parameters for the ContainerClient.Rename method.
func (client *ContainerClient) Rename(ctx context.Context, sourceContainerName string, options *ContainerClientRenameOptions) (ContainerClientRenameResponse, error) {
@ -1139,7 +1152,7 @@ func (client *ContainerClient) renameCreateRequest(ctx context.Context, sourceCo
if options != nil && options.SourceLeaseID != nil {
req.Raw().Header["x-ms-source-lease-id"] = []string{*options.SourceLeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1169,7 +1182,7 @@ func (client *ContainerClient) renameHandleResponse(resp *http.Response) (Contai
// to 60 seconds, or can be infinite
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - options - ContainerClientRenewLeaseOptions contains the optional parameters for the ContainerClient.RenewLease method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -1216,7 +1229,7 @@ func (client *ContainerClient) renewLeaseCreateRequest(ctx context.Context, leas
}
req.Raw().Header["x-ms-lease-action"] = []string{"renew"}
req.Raw().Header["x-ms-lease-id"] = []string{leaseID}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1258,7 +1271,7 @@ func (client *ContainerClient) renewLeaseHandleResponse(resp *http.Response) (Co
// Restore - Restores a previously-deleted container.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ContainerClientRestoreOptions contains the optional parameters for the ContainerClient.Restore method.
func (client *ContainerClient) Restore(ctx context.Context, options *ContainerClientRestoreOptions) (ContainerClientRestoreResponse, error) {
var err error
@ -1301,7 +1314,7 @@ func (client *ContainerClient) restoreCreateRequest(ctx context.Context, options
if options != nil && options.DeletedContainerVersion != nil {
req.Raw().Header["x-ms-deleted-container-version"] = []string{*options.DeletedContainerVersion}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1331,7 +1344,7 @@ func (client *ContainerClient) restoreHandleResponse(resp *http.Response) (Conta
// may be accessed publicly.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - containerACL - the acls for the container
// - options - ContainerClientSetAccessPolicyOptions contains the optional parameters for the ContainerClient.SetAccessPolicy
// method.
@ -1384,7 +1397,7 @@ func (client *ContainerClient) setAccessPolicyCreateRequest(ctx context.Context,
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
type wrapper struct {
XMLName xml.Name `xml:"SignedIdentifiers"`
ContainerACL *[]*SignedIdentifier `xml:"SignedIdentifier"`
@ -1430,7 +1443,7 @@ func (client *ContainerClient) setAccessPolicyHandleResponse(resp *http.Response
// SetMetadata - operation sets one or more user-defined name-value pairs for the specified container.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ContainerClientSetMetadataOptions contains the optional parameters for the ContainerClient.SetMetadata method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
@ -1482,7 +1495,7 @@ func (client *ContainerClient) setMetadataCreateRequest(ctx context.Context, opt
}
}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -1521,7 +1534,7 @@ func (client *ContainerClient) setMetadataHandleResponse(resp *http.Response) (C
// SubmitBatch - The Batch operation allows multiple API calls to be embedded into a single HTTP request.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - contentLength - The length of the request.
// - multipartContentType - Required. The value of this header must be multipart/mixed with a batch boundary. Example header
// value: multipart/mixed; boundary=batch_
@ -1565,7 +1578,7 @@ func (client *ContainerClient) submitBatchCreateRequest(ctx context.Context, con
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := req.SetBody(body, multipartContentType); err != nil {
return nil, err
}

Просмотреть файл

@ -302,7 +302,13 @@ type BlobClientDownloadOptions struct {
// BlobClientGetAccountInfoOptions contains the optional parameters for the BlobClient.GetAccountInfo method.
type BlobClientGetAccountInfoOptions struct {
// placeholder for future optional parameters
// Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage
// analytics logging is enabled.
RequestID *string
// The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations.
// [https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations]
Timeout *int32
}
// BlobClientGetPropertiesOptions contains the optional parameters for the BlobClient.GetProperties method.
@ -873,7 +879,13 @@ type ContainerClientGetAccessPolicyOptions struct {
// ContainerClientGetAccountInfoOptions contains the optional parameters for the ContainerClient.GetAccountInfo method.
type ContainerClientGetAccountInfoOptions struct {
// placeholder for future optional parameters
// Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage
// analytics logging is enabled.
RequestID *string
// The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations.
// [https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations]
Timeout *int32
}
// ContainerClientGetPropertiesOptions contains the optional parameters for the ContainerClient.GetProperties method.
@ -1357,7 +1369,13 @@ type ServiceClientFilterBlobsOptions struct {
// ServiceClientGetAccountInfoOptions contains the optional parameters for the ServiceClient.GetAccountInfo method.
type ServiceClientGetAccountInfoOptions struct {
// placeholder for future optional parameters
// Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage
// analytics logging is enabled.
RequestID *string
// The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations.
// [https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations]
Timeout *int32
}
// ServiceClientGetPropertiesOptions contains the optional parameters for the ServiceClient.GetProperties method.

Просмотреть файл

@ -27,7 +27,7 @@ type PageBlobClient struct {
// ClearPages - The Clear Pages operation clears a set of pages from a page blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - contentLength - The length of the request.
// - options - PageBlobClientClearPagesOptions contains the optional parameters for the PageBlobClient.ClearPages method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
@ -114,7 +114,7 @@ func (client *PageBlobClient) clearPagesCreateRequest(ctx context.Context, conte
if options != nil && options.Range != nil {
req.Raw().Header["x-ms-range"] = []string{*options.Range}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -178,7 +178,7 @@ func (client *PageBlobClient) clearPagesHandleResponse(resp *http.Response) (Pag
// 2016-05-31.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - copySource - Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies
// a page blob snapshot. The value should be URL-encoded as it would appear in a request
// URI. The source blob must either be public or must be authenticated via a shared access signature.
@ -235,7 +235,7 @@ func (client *PageBlobClient) copyIncrementalCreateRequest(ctx context.Context,
if modifiedAccessConditions != nil && modifiedAccessConditions.IfTags != nil {
req.Raw().Header["x-ms-if-tags"] = []string{*modifiedAccessConditions.IfTags}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -280,7 +280,7 @@ func (client *PageBlobClient) copyIncrementalHandleResponse(resp *http.Response)
// Create - The Create operation creates a new page blob.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - contentLength - The length of the request.
// - blobContentLength - This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned
// to a 512-byte boundary.
@ -399,7 +399,7 @@ func (client *PageBlobClient) createCreateRequest(ctx context.Context, contentLe
if options != nil && options.BlobTagsString != nil {
req.Raw().Header["x-ms-tags"] = []string{*options.BlobTagsString}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -461,7 +461,7 @@ func (client *PageBlobClient) createHandleResponse(resp *http.Response) (PageBlo
// NewGetPageRangesPager - The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot
// of a page blob
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - PageBlobClientGetPageRangesOptions contains the optional parameters for the PageBlobClient.NewGetPageRangesPager
// method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
@ -533,7 +533,7 @@ func (client *PageBlobClient) GetPageRangesCreateRequest(ctx context.Context, op
if options != nil && options.Range != nil {
req.Raw().Header["x-ms-range"] = []string{*options.Range}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -582,7 +582,7 @@ func (client *PageBlobClient) GetPageRangesHandleResponse(resp *http.Response) (
// NewGetPageRangesDiffPager - The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that
// were changed between target blob and previous snapshot.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - PageBlobClientGetPageRangesDiffOptions contains the optional parameters for the PageBlobClient.NewGetPageRangesDiffPager
// method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
@ -660,7 +660,7 @@ func (client *PageBlobClient) GetPageRangesDiffCreateRequest(ctx context.Context
if options != nil && options.Range != nil {
req.Raw().Header["x-ms-range"] = []string{*options.Range}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -709,7 +709,7 @@ func (client *PageBlobClient) GetPageRangesDiffHandleResponse(resp *http.Respons
// Resize - Resize the Blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - blobContentLength - This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned
// to a 512-byte boundary.
// - options - PageBlobClientResizeOptions contains the optional parameters for the PageBlobClient.Resize method.
@ -782,7 +782,7 @@ func (client *PageBlobClient) resizeCreateRequest(ctx context.Context, blobConte
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -828,7 +828,7 @@ func (client *PageBlobClient) resizeHandleResponse(resp *http.Response) (PageBlo
// UpdateSequenceNumber - Update the sequence number of the blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - sequenceNumberAction - Required if the x-ms-blob-sequence-number header is set for the request. This property applies to
// page blobs only. This property indicates how the service should modify the blob's sequence number
// - options - PageBlobClientUpdateSequenceNumberOptions contains the optional parameters for the PageBlobClient.UpdateSequenceNumber
@ -891,7 +891,7 @@ func (client *PageBlobClient) updateSequenceNumberCreateRequest(ctx context.Cont
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-sequence-number-action"] = []string{string(sequenceNumberAction)}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -937,7 +937,7 @@ func (client *PageBlobClient) updateSequenceNumberHandleResponse(resp *http.Resp
// UploadPages - The Upload Pages operation writes a range of pages to a page blob
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - contentLength - The length of the request.
// - body - Initial data
// - options - PageBlobClientUploadPagesOptions contains the optional parameters for the PageBlobClient.UploadPages method.
@ -1031,7 +1031,7 @@ func (client *PageBlobClient) uploadPagesCreateRequest(ctx context.Context, cont
if options != nil && options.Range != nil {
req.Raw().Header["x-ms-range"] = []string{*options.Range}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := req.SetBody(body, "application/octet-stream"); err != nil {
return nil, err
}
@ -1108,7 +1108,7 @@ func (client *PageBlobClient) uploadPagesHandleResponse(resp *http.Response) (Pa
// a URL
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - sourceURL - Specify a URL to the copy source.
// - sourceRange - Bytes of source data in the specified range. The length of this range should match the ContentLength header
// and x-ms-range/Range destination range header.
@ -1224,7 +1224,7 @@ func (client *PageBlobClient) uploadPagesFromURLCreateRequest(ctx context.Contex
req.Raw().Header["x-ms-source-if-unmodified-since"] = []string{(*sourceModifiedAccessConditions.SourceIfUnmodifiedSince).In(gmt).Format(time.RFC1123)}
}
req.Raw().Header["x-ms-source-range"] = []string{sourceRange}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}

Просмотреть файл

@ -490,6 +490,9 @@ type BlobClientGetAccountInfoResponse struct {
// Date contains the information returned from the Date header response.
Date *time.Time
// IsHierarchicalNamespaceEnabled contains the information returned from the x-ms-is-hns-enabled header response.
IsHierarchicalNamespaceEnabled *bool
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string
@ -1371,6 +1374,9 @@ type ContainerClientGetAccountInfoResponse struct {
// Date contains the information returned from the Date header response.
Date *time.Time
// IsHierarchicalNamespaceEnabled contains the information returned from the x-ms-is-hns-enabled header response.
IsHierarchicalNamespaceEnabled *bool
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string

Просмотреть файл

@ -30,7 +30,7 @@ type ServiceClient struct {
// be scoped within the expression to a single container.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - where - Filters the results to return only to return only blobs whose tags match the specified expression.
// - options - ServiceClientFilterBlobsOptions contains the optional parameters for the ServiceClient.FilterBlobs method.
func (client *ServiceClient) FilterBlobs(ctx context.Context, where string, options *ServiceClientFilterBlobsOptions) (ServiceClientFilterBlobsResponse, error) {
@ -77,7 +77,7 @@ func (client *ServiceClient) filterBlobsCreateRequest(ctx context.Context, where
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -109,7 +109,7 @@ func (client *ServiceClient) filterBlobsHandleResponse(resp *http.Response) (Ser
// GetAccountInfo - Returns the sku name and account kind
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ServiceClientGetAccountInfoOptions contains the optional parameters for the ServiceClient.GetAccountInfo method.
func (client *ServiceClient) GetAccountInfo(ctx context.Context, options *ServiceClientGetAccountInfoOptions) (ServiceClientGetAccountInfoResponse, error) {
var err error
@ -138,9 +138,15 @@ func (client *ServiceClient) getAccountInfoCreateRequest(ctx context.Context, op
reqQP := req.Raw().URL.Query()
reqQP.Set("comp", "properties")
reqQP.Set("restype", "account")
if options != nil && options.Timeout != nil {
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/xml"}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -183,7 +189,7 @@ func (client *ServiceClient) getAccountInfoHandleResponse(resp *http.Response) (
// CORS (Cross-Origin Resource Sharing) rules.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ServiceClientGetPropertiesOptions contains the optional parameters for the ServiceClient.GetProperties method.
func (client *ServiceClient) GetProperties(ctx context.Context, options *ServiceClientGetPropertiesOptions) (ServiceClientGetPropertiesResponse, error) {
var err error
@ -220,7 +226,7 @@ func (client *ServiceClient) getPropertiesCreateRequest(ctx context.Context, opt
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -246,7 +252,7 @@ func (client *ServiceClient) getPropertiesHandleResponse(resp *http.Response) (S
// location endpoint when read-access geo-redundant replication is enabled for the storage account.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ServiceClientGetStatisticsOptions contains the optional parameters for the ServiceClient.GetStatistics method.
func (client *ServiceClient) GetStatistics(ctx context.Context, options *ServiceClientGetStatisticsOptions) (ServiceClientGetStatisticsResponse, error) {
var err error
@ -283,7 +289,7 @@ func (client *ServiceClient) getStatisticsCreateRequest(ctx context.Context, opt
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -316,7 +322,7 @@ func (client *ServiceClient) getStatisticsHandleResponse(resp *http.Response) (S
// bearer token authentication.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - keyInfo - Key information
// - options - ServiceClientGetUserDelegationKeyOptions contains the optional parameters for the ServiceClient.GetUserDelegationKey
// method.
@ -355,7 +361,7 @@ func (client *ServiceClient) getUserDelegationKeyCreateRequest(ctx context.Conte
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := runtime.MarshalAsXML(req, keyInfo); err != nil {
return nil, err
}
@ -390,7 +396,7 @@ func (client *ServiceClient) getUserDelegationKeyHandleResponse(resp *http.Respo
// NewListContainersSegmentPager - The List Containers Segment operation returns a list of the containers under the specified
// account
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - options - ServiceClientListContainersSegmentOptions contains the optional parameters for the ServiceClient.NewListContainersSegmentPager
// method.
//
@ -422,7 +428,7 @@ func (client *ServiceClient) ListContainersSegmentCreateRequest(ctx context.Cont
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
return req, nil
}
@ -448,7 +454,7 @@ func (client *ServiceClient) ListContainersSegmentHandleResponse(resp *http.Resp
// and CORS (Cross-Origin Resource Sharing) rules
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - storageServiceProperties - The StorageService properties.
// - options - ServiceClientSetPropertiesOptions contains the optional parameters for the ServiceClient.SetProperties method.
func (client *ServiceClient) SetProperties(ctx context.Context, storageServiceProperties StorageServiceProperties, options *ServiceClientSetPropertiesOptions) (ServiceClientSetPropertiesResponse, error) {
@ -486,7 +492,7 @@ func (client *ServiceClient) setPropertiesCreateRequest(ctx context.Context, sto
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := runtime.MarshalAsXML(req, storageServiceProperties); err != nil {
return nil, err
}
@ -511,7 +517,7 @@ func (client *ServiceClient) setPropertiesHandleResponse(resp *http.Response) (S
// SubmitBatch - The Batch operation allows multiple API calls to be embedded into a single HTTP request.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-11-03
// Generated from API version 2024-08-04
// - contentLength - The length of the request.
// - multipartContentType - Required. The value of this header must be multipart/mixed with a batch boundary. Example header
// value: multipart/mixed; boundary=batch_
@ -554,7 +560,7 @@ func (client *ServiceClient) submitBatchCreateRequest(ctx context.Context, conte
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
req.Raw().Header["x-ms-version"] = []string{ServiceVersion}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if err := req.SetBody(body, multipartContentType); err != nil {
return nil, err
}

Просмотреть файл

@ -314,7 +314,7 @@ directive:
replace(/err = unpopulate\((.*), "IsDirectory", &p\.IsDirectory\)/g, 'var rawVal string\nerr = unpopulate(val, "IsDirectory", &rawVal)\nboolVal, _ := strconv.ParseBool(rawVal)\np.IsDirectory = &boolVal');
```
### Updating service version to 2024-05-04
### Updating service version to 2024-08-04
```yaml
directive:
- from:
@ -325,5 +325,5 @@ directive:
transform: >-
return $.
replaceAll(`[]string{"2023-05-03"}`, `[]string{ServiceVersion}`).
replaceAll(`2023-05-03`, `2024-05-04`);
replaceAll(`2023-05-03`, `2024-08-04`);
```

Просмотреть файл

@ -6,4 +6,4 @@
package generated
const ServiceVersion = "2024-05-04"
const ServiceVersion = "2024-08-04"

Просмотреть файл

@ -28,7 +28,7 @@ type FileSystemClient struct {
// operation does not support conditional HTTP requests.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileSystemClientCreateOptions contains the optional parameters for the FileSystemClient.Create method.
func (client *FileSystemClient) Create(ctx context.Context, options *FileSystemClientCreateOptions) (FileSystemClientCreateResponse, error) {
var err error
@ -113,7 +113,7 @@ func (client *FileSystemClient) createHandleResponse(resp *http.Response) (FileS
// [https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations].
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileSystemClientDeleteOptions contains the optional parameters for the FileSystemClient.Delete method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the FileSystemClient.SetProperties
// method.
@ -183,7 +183,7 @@ func (client *FileSystemClient) deleteHandleResponse(resp *http.Response) (FileS
// GetProperties - All system and user-defined filesystem properties are specified in the response headers.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileSystemClientGetPropertiesOptions contains the optional parameters for the FileSystemClient.GetProperties
// method.
func (client *FileSystemClient) GetProperties(ctx context.Context, options *FileSystemClientGetPropertiesOptions) (FileSystemClientGetPropertiesResponse, error) {
@ -261,7 +261,7 @@ func (client *FileSystemClient) getPropertiesHandleResponse(resp *http.Response)
// NewListBlobHierarchySegmentPager - The List Blobs operation returns a list of the blobs under the specified container
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileSystemClientListBlobHierarchySegmentOptions contains the optional parameters for the FileSystemClient.NewListBlobHierarchySegmentPager
// method.
//
@ -334,7 +334,7 @@ func (client *FileSystemClient) ListBlobHierarchySegmentHandleResponse(resp *htt
// NewListPathsPager - List FileSystem paths and their properties.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - recursive - Required
// - options - FileSystemClientListPathsOptions contains the optional parameters for the FileSystemClient.NewListPathsPager
// method.
@ -412,7 +412,7 @@ func (client *FileSystemClient) ListPathsHandleResponse(resp *http.Response) (Fi
// [https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations].
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileSystemClientSetPropertiesOptions contains the optional parameters for the FileSystemClient.SetProperties
// method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the FileSystemClient.SetProperties

Просмотреть файл

@ -28,7 +28,7 @@ type PathClient struct {
// AppendData - Append data to the file.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - body - Initial data
// - options - PathClientAppendDataOptions contains the optional parameters for the PathClient.AppendData method.
// - PathHTTPHeaders - PathHTTPHeaders contains a group of parameters for the PathClient.Create method.
@ -175,7 +175,7 @@ func (client *PathClient) appendDataHandleResponse(resp *http.Response) (PathCli
// If-None-Match: "*".
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - PathClientCreateOptions contains the optional parameters for the PathClient.Create method.
// - PathHTTPHeaders - PathHTTPHeaders contains a group of parameters for the PathClient.Create method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the PathClient.Create method.
@ -374,7 +374,7 @@ func (client *PathClient) createHandleResponse(resp *http.Response) (PathClientC
// [https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations].
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - PathClientDeleteOptions contains the optional parameters for the PathClient.Delete method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the PathClient.Create method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the FileSystemClient.SetProperties
@ -477,7 +477,7 @@ func (client *PathClient) deleteHandleResponse(resp *http.Response) (PathClientD
// FlushData - Set the owner, group, permissions, or access control list for a path.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - PathClientFlushDataOptions contains the optional parameters for the PathClient.FlushData method.
// - PathHTTPHeaders - PathHTTPHeaders contains a group of parameters for the PathClient.Create method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the PathClient.Create method.
@ -648,7 +648,7 @@ func (client *PathClient) flushDataHandleResponse(resp *http.Response) (PathClie
// [https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations].
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - PathClientGetPropertiesOptions contains the optional parameters for the PathClient.GetProperties method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the PathClient.Create method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the FileSystemClient.SetProperties
@ -803,7 +803,7 @@ func (client *PathClient) getPropertiesHandleResponse(resp *http.Response) (Path
// Operations [https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations].
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - xmsLeaseAction - There are five lease actions: "acquire", "break", "change", "renew", and "release". Use "acquire" and
// specify the "x-ms-proposed-lease-id" and "x-ms-lease-duration" to acquire a new lease. Use "break"
// to break an existing lease. When a lease is broken, the lease break period is allowed to elapse, during which time no lease
@ -917,7 +917,7 @@ func (client *PathClient) leaseHandleResponse(resp *http.Response) (PathClientLe
// Service Operations [https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations].
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - PathClientReadOptions contains the optional parameters for the PathClient.Read method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the PathClient.Create method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the FileSystemClient.SetProperties
@ -1082,7 +1082,7 @@ func (client *PathClient) readHandleResponse(resp *http.Response) (PathClientRea
// SetAccessControl - Set the owner, group, permissions, or access control list for a path.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - PathClientSetAccessControlOptions contains the optional parameters for the PathClient.SetAccessControl method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the PathClient.Create method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the FileSystemClient.SetProperties
@ -1187,7 +1187,7 @@ func (client *PathClient) setAccessControlHandleResponse(resp *http.Response) (P
// SetAccessControlRecursive - Set the access control list for a path and sub-paths.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - mode - Mode "set" sets POSIX access control rights on files and directories, "modify" modifies one or more POSIX access
// control rights that pre-exist on files and directories, "remove" removes one or more
// POSIX access control rights that were present earlier on files and directories
@ -1275,7 +1275,7 @@ func (client *PathClient) SetAccessControlRecursiveHandleResponse(resp *http.Res
// SetExpiry - Sets the time a blob will expire and be deleted.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - expiryOptions - Required. Indicates mode of the expiry time
// - options - PathClientSetExpiryOptions contains the optional parameters for the PathClient.SetExpiry method.
func (client *PathClient) SetExpiry(ctx context.Context, expiryOptions ExpiryOptions, options *PathClientSetExpiryOptions) (PathClientSetExpiryResponse, error) {
@ -1355,7 +1355,7 @@ func (client *PathClient) setExpiryHandleResponse(resp *http.Response) (PathClie
// Undelete - Undelete a path that was previously soft deleted
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - PathClientUndeleteOptions contains the optional parameters for the PathClient.Undelete method.
func (client *PathClient) Undelete(ctx context.Context, options *PathClientUndeleteOptions) (PathClientUndeleteResponse, error) {
var err error
@ -1430,7 +1430,7 @@ func (client *PathClient) undeleteHandleResponse(resp *http.Response) (PathClien
// Headers for Blob Service Operations [https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations].
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - action - The action must be "append" to upload data to be appended to a file, "flush" to flush previously uploaded data
// to a file, "setProperties" to set the properties of a file or directory,
// "setAccessControl" to set the owner, group, permissions, or access control list for a file or directory, or "setAccessControlRecursive"

Просмотреть файл

@ -25,7 +25,7 @@ type ServiceClient struct {
// NewListFileSystemsPager - List filesystems and their properties in given account.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ServiceClientListFileSystemsOptions contains the optional parameters for the ServiceClient.NewListFileSystemsPager
// method.
//

Просмотреть файл

@ -7,7 +7,7 @@ go: true
clear-output-folder: false
version: "^3.0.0"
license-header: MICROSOFT_MIT_NO_VERSION
input-file: "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/70cfdba3d6acf2325fa5a9d264dfdf69c99fc0f9/specification/storage/data-plane/Microsoft.FileStorage/preview/2024-05-04/file.json"
input-file: "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/f6f50c6388fd5836fa142384641b8353a99874ef/specification/storage/data-plane/Microsoft.FileStorage/stable/2024-08-04/file.json"
credential-scope: "https://storage.azure.com/.default"
output-folder: ../generated
file-prefix: "zz_"
@ -35,7 +35,7 @@ directive:
transform: >-
return $.
replaceAll(`[]string{"2023-08-03"}`, `[]string{ServiceVersion}`).
replaceAll(`2023-08-03`, `2024-05-04`);
replaceAll(`2023-08-03`, `2024-08-04`);
```
### Don't include share name, directory, or file name in path - we have direct URIs

Просмотреть файл

@ -6,4 +6,4 @@
package generated
const ServiceVersion = "2024-05-04"
const ServiceVersion = "2024-08-04"

Просмотреть файл

@ -34,7 +34,7 @@ type DirectoryClient struct {
// Create - Creates a new directory under the specified share or parent directory.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - DirectoryClientCreateOptions contains the optional parameters for the DirectoryClient.Create method.
func (client *DirectoryClient) Create(ctx context.Context, options *DirectoryClientCreateOptions) (DirectoryClientCreateResponse, error) {
var err error
@ -76,7 +76,7 @@ func (client *DirectoryClient) createCreateRequest(ctx context.Context, options
}
}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.FilePermission != nil {
req.Raw().Header["x-ms-file-permission"] = []string{*options.FilePermission}
}
@ -174,7 +174,7 @@ func (client *DirectoryClient) createHandleResponse(resp *http.Response) (Direct
// Delete - Removes the specified empty directory. Note that the directory must be empty before it can be deleted.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - DirectoryClientDeleteOptions contains the optional parameters for the DirectoryClient.Delete method.
func (client *DirectoryClient) Delete(ctx context.Context, options *DirectoryClientDeleteOptions) (DirectoryClientDeleteResponse, error) {
var err error
@ -209,7 +209,7 @@ func (client *DirectoryClient) deleteCreateRequest(ctx context.Context, options
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if client.fileRequestIntent != nil {
req.Raw().Header["x-ms-file-request-intent"] = []string{string(*client.fileRequestIntent)}
}
@ -239,7 +239,7 @@ func (client *DirectoryClient) deleteHandleResponse(resp *http.Response) (Direct
// ForceCloseHandles - Closes all handles open for given directory.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - handleID - Specifies handle ID opened on the file or directory to be closed. Asterisk (*) is a wildcard that specifies
// all handles.
// - options - DirectoryClientForceCloseHandlesOptions contains the optional parameters for the DirectoryClient.ForceCloseHandles
@ -284,7 +284,7 @@ func (client *DirectoryClient) forceCloseHandlesCreateRequest(ctx context.Contex
if options != nil && options.Recursive != nil {
req.Raw().Header["x-ms-recursive"] = []string{strconv.FormatBool(*options.Recursive)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
@ -338,7 +338,7 @@ func (client *DirectoryClient) forceCloseHandlesHandleResponse(resp *http.Respon
// subdirectories.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - DirectoryClientGetPropertiesOptions contains the optional parameters for the DirectoryClient.GetProperties method.
func (client *DirectoryClient) GetProperties(ctx context.Context, options *DirectoryClientGetPropertiesOptions) (DirectoryClientGetPropertiesResponse, error) {
var err error
@ -376,7 +376,7 @@ func (client *DirectoryClient) getPropertiesCreateRequest(ctx context.Context, o
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if client.fileRequestIntent != nil {
req.Raw().Header["x-ms-file-request-intent"] = []string{string(*client.fileRequestIntent)}
}
@ -464,7 +464,7 @@ func (client *DirectoryClient) getPropertiesHandleResponse(resp *http.Response)
// NewListFilesAndDirectoriesSegmentPager - Returns a list of files or directories under the specified share or directory.
// It lists the contents only for a single level of the directory hierarchy.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - DirectoryClientListFilesAndDirectoriesSegmentOptions contains the optional parameters for the DirectoryClient.NewListFilesAndDirectoriesSegmentPager
// method.
//
@ -496,7 +496,7 @@ func (client *DirectoryClient) ListFilesAndDirectoriesSegmentCreateRequest(ctx c
reqQP.Set("include", strings.Join(strings.Fields(strings.Trim(fmt.Sprint(options.Include), "[]")), ","))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.IncludeExtendedInfo != nil {
req.Raw().Header["x-ms-file-extended-info"] = []string{strconv.FormatBool(*options.IncludeExtendedInfo)}
}
@ -538,7 +538,7 @@ func (client *DirectoryClient) ListFilesAndDirectoriesSegmentHandleResponse(resp
// ListHandles - Lists handles for directory.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - DirectoryClientListHandlesOptions contains the optional parameters for the DirectoryClient.ListHandles method.
func (client *DirectoryClient) ListHandles(ctx context.Context, options *DirectoryClientListHandlesOptions) (DirectoryClientListHandlesResponse, error) {
var err error
@ -582,7 +582,7 @@ func (client *DirectoryClient) listHandlesCreateRequest(ctx context.Context, opt
if options != nil && options.Recursive != nil {
req.Raw().Header["x-ms-recursive"] = []string{strconv.FormatBool(*options.Recursive)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
@ -621,7 +621,7 @@ func (client *DirectoryClient) listHandlesHandleResponse(resp *http.Response) (D
// Rename - Renames a directory
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - renameSource - Required. Specifies the URI-style path of the source file, up to 2 KB in length.
// - options - DirectoryClientRenameOptions contains the optional parameters for the DirectoryClient.Rename method.
// - SourceLeaseAccessConditions - SourceLeaseAccessConditions contains a group of parameters for the DirectoryClient.Rename
@ -660,7 +660,7 @@ func (client *DirectoryClient) renameCreateRequest(ctx context.Context, renameSo
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
req.Raw().Header["x-ms-file-rename-source"] = []string{renameSource}
if options != nil && options.ReplaceIfExists != nil {
req.Raw().Header["x-ms-file-rename-replace-if-exists"] = []string{strconv.FormatBool(*options.ReplaceIfExists)}
@ -784,7 +784,7 @@ func (client *DirectoryClient) renameHandleResponse(resp *http.Response) (Direct
// SetMetadata - Updates user defined metadata for the specified directory.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - DirectoryClientSetMetadataOptions contains the optional parameters for the DirectoryClient.SetMetadata method.
func (client *DirectoryClient) SetMetadata(ctx context.Context, options *DirectoryClientSetMetadataOptions) (DirectoryClientSetMetadataResponse, error) {
var err error
@ -824,7 +824,7 @@ func (client *DirectoryClient) setMetadataCreateRequest(ctx context.Context, opt
}
}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
@ -867,7 +867,7 @@ func (client *DirectoryClient) setMetadataHandleResponse(resp *http.Response) (D
// SetProperties - Sets properties on the directory.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - DirectoryClientSetPropertiesOptions contains the optional parameters for the DirectoryClient.SetProperties method.
func (client *DirectoryClient) SetProperties(ctx context.Context, options *DirectoryClientSetPropertiesOptions) (DirectoryClientSetPropertiesResponse, error) {
var err error
@ -900,7 +900,7 @@ func (client *DirectoryClient) setPropertiesCreateRequest(ctx context.Context, o
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.FilePermission != nil {
req.Raw().Header["x-ms-file-permission"] = []string{*options.FilePermission}
}

Просмотреть файл

@ -35,7 +35,7 @@ type FileClient struct {
// AbortCopy - Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - copyID - The copy identifier provided in the x-ms-copy-id header of the original Copy File operation.
// - options - FileClientAbortCopyOptions contains the optional parameters for the FileClient.AbortCopy method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
@ -71,7 +71,7 @@ func (client *FileClient) abortCopyCreateRequest(ctx context.Context, copyID str
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-copy-action"] = []string{"abort"}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -107,7 +107,7 @@ func (client *FileClient) abortCopyHandleResponse(resp *http.Response) (FileClie
// AcquireLease - [Update] The Lease File operation establishes and manages a lock on a file for write and delete operations
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - duration - Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite
// lease can be between 15 and 60 seconds. A lease duration cannot be changed using
// renew or change.
@ -147,7 +147,7 @@ func (client *FileClient) acquireLeaseCreateRequest(ctx context.Context, duratio
if options != nil && options.ProposedLeaseID != nil {
req.Raw().Header["x-ms-proposed-lease-id"] = []string{*options.ProposedLeaseID}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -199,7 +199,7 @@ func (client *FileClient) acquireLeaseHandleResponse(resp *http.Response) (FileC
// BreakLease - [Update] The Lease File operation establishes and manages a lock on a file for write and delete operations
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileClientBreakLeaseOptions contains the optional parameters for the FileClient.BreakLease method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *FileClient) BreakLease(ctx context.Context, options *FileClientBreakLeaseOptions, leaseAccessConditions *LeaseAccessConditions) (FileClientBreakLeaseResponse, error) {
@ -236,7 +236,7 @@ func (client *FileClient) breakLeaseCreateRequest(ctx context.Context, options *
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -288,7 +288,7 @@ func (client *FileClient) breakLeaseHandleResponse(resp *http.Response) (FileCli
// ChangeLease - [Update] The Lease File operation establishes and manages a lock on a file for write and delete operations
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - options - FileClientChangeLeaseOptions contains the optional parameters for the FileClient.ChangeLease method.
func (client *FileClient) ChangeLease(ctx context.Context, leaseID string, options *FileClientChangeLeaseOptions) (FileClientChangeLeaseResponse, error) {
@ -326,7 +326,7 @@ func (client *FileClient) changeLeaseCreateRequest(ctx context.Context, leaseID
if options != nil && options.ProposedLeaseID != nil {
req.Raw().Header["x-ms-proposed-lease-id"] = []string{*options.ProposedLeaseID}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -378,7 +378,7 @@ func (client *FileClient) changeLeaseHandleResponse(resp *http.Response) (FileCl
// Create - Creates a new file or replaces a file. Note it only initializes the file with no content.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - fileContentLength - Specifies the maximum size for the file, up to 4 TB.
// - options - FileClientCreateOptions contains the optional parameters for the FileClient.Create method.
// - ShareFileHTTPHeaders - ShareFileHTTPHeaders contains a group of parameters for the FileClient.Create method.
@ -415,7 +415,7 @@ func (client *FileClient) createCreateRequest(ctx context.Context, fileContentLe
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
req.Raw().Header["x-ms-content-length"] = []string{strconv.FormatInt(fileContentLength, 10)}
req.Raw().Header["x-ms-type"] = []string{"file"}
if shareFileHTTPHeaders != nil && shareFileHTTPHeaders.ContentType != nil {
@ -543,7 +543,7 @@ func (client *FileClient) createHandleResponse(resp *http.Response) (FileClientC
// Delete - removes the file from the storage account.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileClientDeleteOptions contains the optional parameters for the FileClient.Delete method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *FileClient) Delete(ctx context.Context, options *FileClientDeleteOptions, leaseAccessConditions *LeaseAccessConditions) (FileClientDeleteResponse, error) {
@ -578,7 +578,7 @@ func (client *FileClient) deleteCreateRequest(ctx context.Context, options *File
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -611,7 +611,7 @@ func (client *FileClient) deleteHandleResponse(resp *http.Response) (FileClientD
// Download - Reads or downloads a file from the system, including its metadata and properties.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileClientDownloadOptions contains the optional parameters for the FileClient.Download method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *FileClient) Download(ctx context.Context, options *FileClientDownloadOptions, leaseAccessConditions *LeaseAccessConditions) (FileClientDownloadResponse, error) {
@ -647,7 +647,7 @@ func (client *FileClient) downloadCreateRequest(ctx context.Context, options *Fi
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.Range != nil {
req.Raw().Header["x-ms-range"] = []string{*options.Range}
}
@ -817,7 +817,7 @@ func (client *FileClient) downloadHandleResponse(resp *http.Response) (FileClien
// ForceCloseHandles - Closes all handles open for given file
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - handleID - Specifies handle ID opened on the file or directory to be closed. Asterisk (*) is a wildcard that specifies
// all handles.
// - options - FileClientForceCloseHandlesOptions contains the optional parameters for the FileClient.ForceCloseHandles method.
@ -858,7 +858,7 @@ func (client *FileClient) forceCloseHandlesCreateRequest(ctx context.Context, ha
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-handle-id"] = []string{handleID}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
@ -911,7 +911,7 @@ func (client *FileClient) forceCloseHandlesHandleResponse(resp *http.Response) (
// not return the content of the file.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileClientGetPropertiesOptions contains the optional parameters for the FileClient.GetProperties method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *FileClient) GetProperties(ctx context.Context, options *FileClientGetPropertiesOptions, leaseAccessConditions *LeaseAccessConditions) (FileClientGetPropertiesResponse, error) {
@ -949,7 +949,7 @@ func (client *FileClient) getPropertiesCreateRequest(ctx context.Context, option
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -1103,7 +1103,7 @@ func (client *FileClient) getPropertiesHandleResponse(resp *http.Response) (File
// GetRangeList - Returns the list of valid ranges for a file.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileClientGetRangeListOptions contains the optional parameters for the FileClient.GetRangeList method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *FileClient) GetRangeList(ctx context.Context, options *FileClientGetRangeListOptions, leaseAccessConditions *LeaseAccessConditions) (FileClientGetRangeListResponse, error) {
@ -1142,7 +1142,7 @@ func (client *FileClient) getRangeListCreateRequest(ctx context.Context, options
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.Range != nil {
req.Raw().Header["x-ms-range"] = []string{*options.Range}
}
@ -1204,7 +1204,7 @@ func (client *FileClient) getRangeListHandleResponse(resp *http.Response) (FileC
// ListHandles - Lists handles for file
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileClientListHandlesOptions contains the optional parameters for the FileClient.ListHandles method.
func (client *FileClient) ListHandles(ctx context.Context, options *FileClientListHandlesOptions) (FileClientListHandlesResponse, error) {
var err error
@ -1245,7 +1245,7 @@ func (client *FileClient) listHandlesCreateRequest(ctx context.Context, options
reqQP.Set("sharesnapshot", *options.Sharesnapshot)
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if client.allowTrailingDot != nil {
req.Raw().Header["x-ms-allow-trailing-dot"] = []string{strconv.FormatBool(*client.allowTrailingDot)}
}
@ -1284,7 +1284,7 @@ func (client *FileClient) listHandlesHandleResponse(resp *http.Response) (FileCl
// ReleaseLease - [Update] The Lease File operation establishes and manages a lock on a file for write and delete operations
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - options - FileClientReleaseLeaseOptions contains the optional parameters for the FileClient.ReleaseLease method.
func (client *FileClient) ReleaseLease(ctx context.Context, leaseID string, options *FileClientReleaseLeaseOptions) (FileClientReleaseLeaseResponse, error) {
@ -1319,7 +1319,7 @@ func (client *FileClient) releaseLeaseCreateRequest(ctx context.Context, leaseID
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-lease-action"] = []string{"release"}
req.Raw().Header["x-ms-lease-id"] = []string{leaseID}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -1368,7 +1368,7 @@ func (client *FileClient) releaseLeaseHandleResponse(resp *http.Response) (FileC
// Rename - Renames a file
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - renameSource - Required. Specifies the URI-style path of the source file, up to 2 KB in length.
// - options - FileClientRenameOptions contains the optional parameters for the FileClient.Rename method.
// - SourceLeaseAccessConditions - SourceLeaseAccessConditions contains a group of parameters for the DirectoryClient.Rename
@ -1407,7 +1407,7 @@ func (client *FileClient) renameCreateRequest(ctx context.Context, renameSource
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
req.Raw().Header["x-ms-file-rename-source"] = []string{renameSource}
if options != nil && options.ReplaceIfExists != nil {
req.Raw().Header["x-ms-file-rename-replace-if-exists"] = []string{strconv.FormatBool(*options.ReplaceIfExists)}
@ -1534,7 +1534,7 @@ func (client *FileClient) renameHandleResponse(resp *http.Response) (FileClientR
// SetHTTPHeaders - Sets HTTP headers on the file.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileClientSetHTTPHeadersOptions contains the optional parameters for the FileClient.SetHTTPHeaders method.
// - ShareFileHTTPHeaders - ShareFileHTTPHeaders contains a group of parameters for the FileClient.Create method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
@ -1568,7 +1568,7 @@ func (client *FileClient) setHTTPHeadersCreateRequest(ctx context.Context, optio
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.FileContentLength != nil {
req.Raw().Header["x-ms-content-length"] = []string{strconv.FormatInt(*options.FileContentLength, 10)}
}
@ -1693,7 +1693,7 @@ func (client *FileClient) setHTTPHeadersHandleResponse(resp *http.Response) (Fil
// SetMetadata - Updates user-defined metadata for the specified file.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - FileClientSetMetadataOptions contains the optional parameters for the FileClient.SetMetadata method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *FileClient) SetMetadata(ctx context.Context, options *FileClientSetMetadataOptions, leaseAccessConditions *LeaseAccessConditions) (FileClientSetMetadataResponse, error) {
@ -1733,7 +1733,7 @@ func (client *FileClient) setMetadataCreateRequest(ctx context.Context, options
}
}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -1786,7 +1786,7 @@ func (client *FileClient) setMetadataHandleResponse(resp *http.Response) (FileCl
// StartCopy - Copies a blob or file to a destination file within the storage account.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - copySource - Specifies the URL of the source file or blob, up to 2 KB in length. To copy a file to another file within
// the same storage account, you may use Shared Key to authenticate the source file. If you are
// copying a file from another storage account, or if you are copying a blob from the same storage account or another storage
@ -1825,7 +1825,7 @@ func (client *FileClient) startCopyCreateRequest(ctx context.Context, copySource
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.Metadata != nil {
for k, v := range options.Metadata {
if v != nil {
@ -1915,7 +1915,7 @@ func (client *FileClient) startCopyHandleResponse(resp *http.Response) (FileClie
// UploadRange - Upload a range of bytes to a file.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - rangeParam - Specifies the range of bytes to be written. Both the start and end of the range must be specified. For an
// update operation, the range can be up to 4 MB in size. For a clear operation, the range can be
// up to the value of the file's full size. The File service accepts only a single byte range for the Range and 'x-ms-range'
@ -1967,7 +1967,7 @@ func (client *FileClient) uploadRangeCreateRequest(ctx context.Context, rangePar
if options != nil && options.ContentMD5 != nil {
req.Raw().Header["Content-MD5"] = []string{base64.StdEncoding.EncodeToString(options.ContentMD5)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -2040,7 +2040,7 @@ func (client *FileClient) uploadRangeHandleResponse(resp *http.Response) (FileCl
// UploadRangeFromURL - Upload a range of bytes to a file where the contents are read from a URL.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - rangeParam - Writes data to the specified byte range in the file.
// - copySource - Specifies the URL of the source file or blob, up to 2 KB in length. To copy a file to another file within
// the same storage account, you may use Shared Key to authenticate the source file. If you are
@ -2100,7 +2100,7 @@ func (client *FileClient) uploadRangeFromURLCreateRequest(ctx context.Context, r
if sourceModifiedAccessConditions != nil && sourceModifiedAccessConditions.SourceIfNoneMatchCRC64 != nil {
req.Raw().Header["x-ms-source-if-none-match-crc64"] = []string{base64.StdEncoding.EncodeToString(sourceModifiedAccessConditions.SourceIfNoneMatchCRC64)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}

Просмотреть файл

@ -265,12 +265,13 @@ type ShareProperties struct {
LastModified *time.Time `xml:"Last-Modified"`
// REQUIRED
Quota *int32 `xml:"Quota"`
AccessTier *string `xml:"AccessTier"`
AccessTierChangeTime *time.Time `xml:"AccessTierChangeTime"`
AccessTierTransitionState *string `xml:"AccessTierTransitionState"`
DeletedTime *time.Time `xml:"DeletedTime"`
EnabledProtocols *string `xml:"EnabledProtocols"`
Quota *int32 `xml:"Quota"`
AccessTier *string `xml:"AccessTier"`
AccessTierChangeTime *time.Time `xml:"AccessTierChangeTime"`
AccessTierTransitionState *string `xml:"AccessTierTransitionState"`
DeletedTime *time.Time `xml:"DeletedTime"`
EnableSnapshotVirtualDirectoryAccess *bool `xml:"EnableSnapshotVirtualDirectoryAccess"`
EnabledProtocols *string `xml:"EnabledProtocols"`
// When a share is leased, specifies whether the lease is of infinite or fixed duration.
LeaseDuration *LeaseDurationType `xml:"LeaseDuration"`
@ -312,7 +313,8 @@ type SMBMultichannel struct {
}
type StorageError struct {
Message *string
AuthenticationErrorDetail *string
Message *string
}
// StorageServiceProperties - Storage service properties.

Просмотреть файл

@ -250,6 +250,7 @@ func (s *ShareProperties) UnmarshalXML(dec *xml.Decoder, start xml.StartElement)
// MarshalJSON implements the json.Marshaller interface for type StorageError.
func (s StorageError) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "AuthenticationErrorDetail", s.AuthenticationErrorDetail)
populate(objectMap, "Message", s.Message)
return json.Marshal(objectMap)
}
@ -263,6 +264,9 @@ func (s *StorageError) UnmarshalJSON(data []byte) error {
for key, val := range rawMsg {
var err error
switch key {
case "AuthenticationErrorDetail":
err = unpopulate(val, "AuthenticationErrorDetail", &s.AuthenticationErrorDetail)
delete(rawMsg, key)
case "Message":
err = unpopulate(val, "Message", &s.Message)
delete(rawMsg, key)

Просмотреть файл

@ -664,7 +664,8 @@ type ShareClientChangeLeaseOptions struct {
// ShareClientCreateOptions contains the optional parameters for the ShareClient.Create method.
type ShareClientCreateOptions struct {
// Specifies the access tier of the share.
AccessTier *ShareAccessTier
AccessTier *ShareAccessTier
EnableSnapshotVirtualDirectoryAccess *bool
// Protocols to enable on the share.
EnabledProtocols *string
@ -809,7 +810,8 @@ type ShareClientSetMetadataOptions struct {
// ShareClientSetPropertiesOptions contains the optional parameters for the ShareClient.SetProperties method.
type ShareClientSetPropertiesOptions struct {
// Specifies the access tier of the share.
AccessTier *ShareAccessTier
AccessTier *ShareAccessTier
EnableSnapshotVirtualDirectoryAccess *bool
// Specifies the maximum size of the share, in gigabytes.
Quota *int32

Просмотреть файл

@ -1108,6 +1108,10 @@ type ShareClientGetPropertiesResponse struct {
// ETag contains the information returned from the ETag header response.
ETag *azcore.ETag
// EnableSnapshotVirtualDirectoryAccess contains the information returned from the x-ms-enable-snapshot-virtual-directory-access
// header response.
EnableSnapshotVirtualDirectoryAccess *bool
// EnabledProtocols contains the information returned from the x-ms-enabled-protocols header response.
EnabledProtocols *string

Просмотреть файл

@ -30,7 +30,7 @@ type ServiceClient struct {
// and CORS (Cross-Origin Resource Sharing) rules.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ServiceClientGetPropertiesOptions contains the optional parameters for the ServiceClient.GetProperties method.
func (client *ServiceClient) GetProperties(ctx context.Context, options *ServiceClientGetPropertiesOptions) (ServiceClientGetPropertiesResponse, error) {
var err error
@ -63,7 +63,7 @@ func (client *ServiceClient) getPropertiesCreateRequest(ctx context.Context, opt
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
req.Raw().Header["Accept"] = []string{"application/xml"}
return req, nil
}
@ -86,7 +86,7 @@ func (client *ServiceClient) getPropertiesHandleResponse(resp *http.Response) (S
// NewListSharesSegmentPager - The List Shares Segment operation returns a list of the shares and share snapshots under the
// specified account.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ServiceClientListSharesSegmentOptions contains the optional parameters for the ServiceClient.NewListSharesSegmentPager
// method.
//
@ -114,7 +114,7 @@ func (client *ServiceClient) ListSharesSegmentCreateRequest(ctx context.Context,
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
req.Raw().Header["Accept"] = []string{"application/xml"}
return req, nil
}
@ -138,7 +138,7 @@ func (client *ServiceClient) ListSharesSegmentHandleResponse(resp *http.Response
// metrics and CORS (Cross-Origin Resource Sharing) rules.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - storageServiceProperties - The StorageService properties.
// - options - ServiceClientSetPropertiesOptions contains the optional parameters for the ServiceClient.SetProperties method.
func (client *ServiceClient) SetProperties(ctx context.Context, storageServiceProperties StorageServiceProperties, options *ServiceClientSetPropertiesOptions) (ServiceClientSetPropertiesResponse, error) {
@ -172,7 +172,7 @@ func (client *ServiceClient) setPropertiesCreateRequest(ctx context.Context, sto
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
req.Raw().Header["Accept"] = []string{"application/xml"}
if err := runtime.MarshalAsXML(req, storageServiceProperties); err != nil {
return nil, err

Просмотреть файл

@ -33,7 +33,7 @@ type ShareClient struct {
// delete share operations.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - duration - Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite
// lease can be between 15 and 60 seconds. A lease duration cannot be changed using
// renew or change.
@ -77,7 +77,7 @@ func (client *ShareClient) acquireLeaseCreateRequest(ctx context.Context, durati
if options != nil && options.ProposedLeaseID != nil {
req.Raw().Header["x-ms-proposed-lease-id"] = []string{*options.ProposedLeaseID}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -124,7 +124,7 @@ func (client *ShareClient) acquireLeaseHandleResponse(resp *http.Response) (Shar
// delete share operations.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientBreakLeaseOptions contains the optional parameters for the ShareClient.BreakLease method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *ShareClient) BreakLease(ctx context.Context, options *ShareClientBreakLeaseOptions, leaseAccessConditions *LeaseAccessConditions) (ShareClientBreakLeaseResponse, error) {
@ -168,7 +168,7 @@ func (client *ShareClient) breakLeaseCreateRequest(ctx context.Context, options
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -223,7 +223,7 @@ func (client *ShareClient) breakLeaseHandleResponse(resp *http.Response) (ShareC
// delete share operations.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - options - ShareClientChangeLeaseOptions contains the optional parameters for the ShareClient.ChangeLease method.
func (client *ShareClient) ChangeLease(ctx context.Context, leaseID string, options *ShareClientChangeLeaseOptions) (ShareClientChangeLeaseResponse, error) {
@ -265,7 +265,7 @@ func (client *ShareClient) changeLeaseCreateRequest(ctx context.Context, leaseID
if options != nil && options.ProposedLeaseID != nil {
req.Raw().Header["x-ms-proposed-lease-id"] = []string{*options.ProposedLeaseID}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -312,7 +312,7 @@ func (client *ShareClient) changeLeaseHandleResponse(resp *http.Response) (Share
// fails.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientCreateOptions contains the optional parameters for the ShareClient.Create method.
func (client *ShareClient) Create(ctx context.Context, options *ShareClientCreateOptions) (ShareClientCreateResponse, error) {
var err error
@ -357,13 +357,16 @@ func (client *ShareClient) createCreateRequest(ctx context.Context, options *Sha
if options != nil && options.AccessTier != nil {
req.Raw().Header["x-ms-access-tier"] = []string{string(*options.AccessTier)}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.EnabledProtocols != nil {
req.Raw().Header["x-ms-enabled-protocols"] = []string{*options.EnabledProtocols}
}
if options != nil && options.RootSquash != nil {
req.Raw().Header["x-ms-root-squash"] = []string{string(*options.RootSquash)}
}
if options != nil && options.EnableSnapshotVirtualDirectoryAccess != nil {
req.Raw().Header["x-ms-enable-snapshot-virtual-directory-access"] = []string{strconv.FormatBool(*options.EnableSnapshotVirtualDirectoryAccess)}
}
req.Raw().Header["Accept"] = []string{"application/xml"}
return req, nil
}
@ -400,7 +403,7 @@ func (client *ShareClient) createHandleResponse(resp *http.Response) (ShareClien
// CreatePermission - Create a permission (a security descriptor).
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - sharePermission - A permission (a security descriptor) at the share level.
// - options - ShareClientCreatePermissionOptions contains the optional parameters for the ShareClient.CreatePermission method.
func (client *ShareClient) CreatePermission(ctx context.Context, sharePermission SharePermission, options *ShareClientCreatePermissionOptions) (ShareClientCreatePermissionResponse, error) {
@ -434,7 +437,7 @@ func (client *ShareClient) createPermissionCreateRequest(ctx context.Context, sh
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if client.fileRequestIntent != nil {
req.Raw().Header["x-ms-file-request-intent"] = []string{string(*client.fileRequestIntent)}
}
@ -470,7 +473,7 @@ func (client *ShareClient) createPermissionHandleResponse(resp *http.Response) (
// CreateSnapshot - Creates a read-only snapshot of a share.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientCreateSnapshotOptions contains the optional parameters for the ShareClient.CreateSnapshot method.
func (client *ShareClient) CreateSnapshot(ctx context.Context, options *ShareClientCreateSnapshotOptions) (ShareClientCreateSnapshotResponse, error) {
var err error
@ -510,7 +513,7 @@ func (client *ShareClient) createSnapshotCreateRequest(ctx context.Context, opti
}
}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
req.Raw().Header["Accept"] = []string{"application/xml"}
return req, nil
}
@ -551,7 +554,7 @@ func (client *ShareClient) createSnapshotHandleResponse(resp *http.Response) (Sh
// contained within it are later deleted during garbage collection.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientDeleteOptions contains the optional parameters for the ShareClient.Delete method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *ShareClient) Delete(ctx context.Context, options *ShareClientDeleteOptions, leaseAccessConditions *LeaseAccessConditions) (ShareClientDeleteResponse, error) {
@ -587,7 +590,7 @@ func (client *ShareClient) deleteCreateRequest(ctx context.Context, options *Sha
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.DeleteSnapshots != nil {
req.Raw().Header["x-ms-delete-snapshots"] = []string{string(*options.DeleteSnapshots)}
}
@ -620,7 +623,7 @@ func (client *ShareClient) deleteHandleResponse(resp *http.Response) (ShareClien
// GetAccessPolicy - Returns information about stored access policies specified on the share.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientGetAccessPolicyOptions contains the optional parameters for the ShareClient.GetAccessPolicy method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *ShareClient) GetAccessPolicy(ctx context.Context, options *ShareClientGetAccessPolicyOptions, leaseAccessConditions *LeaseAccessConditions) (ShareClientGetAccessPolicyResponse, error) {
@ -654,7 +657,7 @@ func (client *ShareClient) getAccessPolicyCreateRequest(ctx context.Context, opt
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -697,7 +700,7 @@ func (client *ShareClient) getAccessPolicyHandleResponse(resp *http.Response) (S
// GetPermission - Returns the permission (security descriptor) for a given key
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - filePermissionKey - Key of the permission to be set for the directory/file.
// - options - ShareClientGetPermissionOptions contains the optional parameters for the ShareClient.GetPermission method.
func (client *ShareClient) GetPermission(ctx context.Context, filePermissionKey string, options *ShareClientGetPermissionOptions) (ShareClientGetPermissionResponse, error) {
@ -732,7 +735,7 @@ func (client *ShareClient) getPermissionCreateRequest(ctx context.Context, fileP
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-file-permission-key"] = []string{filePermissionKey}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if client.fileRequestIntent != nil {
req.Raw().Header["x-ms-file-request-intent"] = []string{string(*client.fileRequestIntent)}
}
@ -766,7 +769,7 @@ func (client *ShareClient) getPermissionHandleResponse(resp *http.Response) (Sha
// data returned does not include the share's list of files.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientGetPropertiesOptions contains the optional parameters for the ShareClient.GetProperties method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *ShareClient) GetProperties(ctx context.Context, options *ShareClientGetPropertiesOptions, leaseAccessConditions *LeaseAccessConditions) (ShareClientGetPropertiesResponse, error) {
@ -802,7 +805,7 @@ func (client *ShareClient) getPropertiesCreateRequest(ctx context.Context, optio
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -836,6 +839,13 @@ func (client *ShareClient) getPropertiesHandleResponse(resp *http.Response) (Sha
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-enable-snapshot-virtual-directory-access"); val != "" {
enableSnapshotVirtualDirectoryAccess, err := strconv.ParseBool(val)
if err != nil {
return ShareClientGetPropertiesResponse{}, err
}
result.EnableSnapshotVirtualDirectoryAccess = &enableSnapshotVirtualDirectoryAccess
}
if val := resp.Header.Get("x-ms-enabled-protocols"); val != "" {
result.EnabledProtocols = &val
}
@ -925,7 +935,7 @@ func (client *ShareClient) getPropertiesHandleResponse(resp *http.Response) (Sha
// GetStatistics - Retrieves statistics related to the share.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientGetStatisticsOptions contains the optional parameters for the ShareClient.GetStatistics method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *ShareClient) GetStatistics(ctx context.Context, options *ShareClientGetStatisticsOptions, leaseAccessConditions *LeaseAccessConditions) (ShareClientGetStatisticsResponse, error) {
@ -959,7 +969,7 @@ func (client *ShareClient) getStatisticsCreateRequest(ctx context.Context, optio
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -1003,7 +1013,7 @@ func (client *ShareClient) getStatisticsHandleResponse(resp *http.Response) (Sha
// delete share operations.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - options - ShareClientReleaseLeaseOptions contains the optional parameters for the ShareClient.ReleaseLease method.
func (client *ShareClient) ReleaseLease(ctx context.Context, leaseID string, options *ShareClientReleaseLeaseOptions) (ShareClientReleaseLeaseResponse, error) {
@ -1042,7 +1052,7 @@ func (client *ShareClient) releaseLeaseCreateRequest(ctx context.Context, leaseI
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-lease-action"] = []string{"release"}
req.Raw().Header["x-ms-lease-id"] = []string{leaseID}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -1086,7 +1096,7 @@ func (client *ShareClient) releaseLeaseHandleResponse(resp *http.Response) (Shar
// delete share operations.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - leaseID - Specifies the current lease ID on the resource.
// - options - ShareClientRenewLeaseOptions contains the optional parameters for the ShareClient.RenewLease method.
func (client *ShareClient) RenewLease(ctx context.Context, leaseID string, options *ShareClientRenewLeaseOptions) (ShareClientRenewLeaseResponse, error) {
@ -1125,7 +1135,7 @@ func (client *ShareClient) renewLeaseCreateRequest(ctx context.Context, leaseID
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-lease-action"] = []string{"renew"}
req.Raw().Header["x-ms-lease-id"] = []string{leaseID}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -1171,7 +1181,7 @@ func (client *ShareClient) renewLeaseHandleResponse(resp *http.Response) (ShareC
// Restore - Restores a previously deleted Share.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientRestoreOptions contains the optional parameters for the ShareClient.Restore method.
func (client *ShareClient) Restore(ctx context.Context, options *ShareClientRestoreOptions) (ShareClientRestoreResponse, error) {
var err error
@ -1204,7 +1214,7 @@ func (client *ShareClient) restoreCreateRequest(ctx context.Context, options *Sh
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.RequestID != nil {
req.Raw().Header["x-ms-client-request-id"] = []string{*options.RequestID}
}
@ -1253,7 +1263,7 @@ func (client *ShareClient) restoreHandleResponse(resp *http.Response) (ShareClie
// SetAccessPolicy - Sets a stored access policy for use with shared access signatures.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - shareACL - The ACL for the share.
// - options - ShareClientSetAccessPolicyOptions contains the optional parameters for the ShareClient.SetAccessPolicy method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
@ -1288,7 +1298,7 @@ func (client *ShareClient) setAccessPolicyCreateRequest(ctx context.Context, sha
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -1335,7 +1345,7 @@ func (client *ShareClient) setAccessPolicyHandleResponse(resp *http.Response) (S
// SetMetadata - Sets one or more user-defined name-value pairs for the specified share.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientSetMetadataOptions contains the optional parameters for the ShareClient.SetMetadata method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *ShareClient) SetMetadata(ctx context.Context, options *ShareClientSetMetadataOptions, leaseAccessConditions *LeaseAccessConditions) (ShareClientSetMetadataResponse, error) {
@ -1376,7 +1386,7 @@ func (client *ShareClient) setMetadataCreateRequest(ctx context.Context, options
}
}
}
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if leaseAccessConditions != nil && leaseAccessConditions.LeaseID != nil {
req.Raw().Header["x-ms-lease-id"] = []string{*leaseAccessConditions.LeaseID}
}
@ -1416,7 +1426,7 @@ func (client *ShareClient) setMetadataHandleResponse(resp *http.Response) (Share
// SetProperties - Sets properties for the specified share.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-04
// Generated from API version 2024-08-04
// - options - ShareClientSetPropertiesOptions contains the optional parameters for the ShareClient.SetProperties method.
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ShareClient.GetProperties method.
func (client *ShareClient) SetProperties(ctx context.Context, options *ShareClientSetPropertiesOptions, leaseAccessConditions *LeaseAccessConditions) (ShareClientSetPropertiesResponse, error) {
@ -1450,7 +1460,7 @@ func (client *ShareClient) setPropertiesCreateRequest(ctx context.Context, optio
reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["x-ms-version"] = []string{"2024-05-04"}
req.Raw().Header["x-ms-version"] = []string{"2024-08-04"}
if options != nil && options.Quota != nil {
req.Raw().Header["x-ms-share-quota"] = []string{strconv.FormatInt(int64(*options.Quota), 10)}
}
@ -1463,6 +1473,9 @@ func (client *ShareClient) setPropertiesCreateRequest(ctx context.Context, optio
if options != nil && options.RootSquash != nil {
req.Raw().Header["x-ms-root-squash"] = []string{string(*options.RootSquash)}
}
if options != nil && options.EnableSnapshotVirtualDirectoryAccess != nil {
req.Raw().Header["x-ms-enable-snapshot-virtual-directory-access"] = []string{strconv.FormatBool(*options.EnableSnapshotVirtualDirectoryAccess)}
}
req.Raw().Header["Accept"] = []string{"application/xml"}
return req, nil
}