Skip to content
Prev Previous commit
Next Next commit
Updating docs references on deprecated apis
  • Loading branch information
siminsavani-msft committed Mar 14, 2023
commit cb3bd2a271207c6493f30143ce947ea8f65db584
15 changes: 5 additions & 10 deletions sdk/storage/azblob/appendblob/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package appendblob

import (
"context"
"errors"
"io"
"os"
"time"
Expand Down Expand Up @@ -255,15 +256,10 @@ func (ab *Client) SetLegalHold(ctx context.Context, legalHold bool, options *blo
return ab.BlobClient().SetLegalHold(ctx, legalHold, options)
}

// SetTier
// Deprecated: SetTier only works for page blob in premium storage account and block blob in block storage account.
// SetTier operation sets the tier on a blob. The operation is allowed on a page
// blob in a premium storage account and on a block blob in a blob storage account (locally
// redundant storage only). A premium page blob's tier determines the allowed size, IOPS, and
// bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation
// does not update the blob's ETag.
// For detailed information about block blob level tiering see https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers.
func (ab *Client) SetTier(ctx context.Context, tier blob.AccessTier, o *blob.SetTierOptions) (blob.SetTierResponse, error) {
return ab.BlobClient().SetTier(ctx, tier, o)
return blob.SetTierResponse{}, errors.New("Operation will not work on this blob type. SetTier only works for page blob in premium storage account and block blob in block storage account.")
}

// SetExpiry operation sets an expiry time on an existing blob. This operation is only allowed on Hierarchical Namespace enabled accounts.
Expand Down Expand Up @@ -327,11 +323,10 @@ func (ab *Client) GetTags(ctx context.Context, o *blob.GetTagsOptions) (blob.Get
return ab.BlobClient().GetTags(ctx, o)
}

// CopyFromURL
// Deprecated: CopyFromURL works only with block blob
// CopyFromURL synchronously copies the data at the source URL to a block blob, with sizes up to 256 MB.
// For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url.
func (ab *Client) CopyFromURL(ctx context.Context, copySource string, o *blob.CopyFromURLOptions) (blob.CopyFromURLResponse, error) {
return ab.BlobClient().CopyFromURL(ctx, copySource, o)
return blob.CopyFromURLResponse{}, errors.New("Operation will not work on this blob type. CopyFromURL works only with block blob.")
}

// Concurrent Download Functions -----------------------------------------------------------------------------------------
Expand Down