Skip to content

[Storage] Support blob type conversion in sync blob copy #19818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Storage/Storage.Management/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Upcoming Release
* Supported blob type conversions in sync blob copy
- `Copy-AzStorageBlob`
* Supported create/upgrade storage account with Keyvault from another tenant and access Keyvault with FederatedClientId
- `New-AzStorageAccount`
- `Set-AzStorageAccount`
Expand Down
36 changes: 29 additions & 7 deletions src/Storage/Storage.Management/help/Copy-AzStorageBlob.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ Copy a blob synchronously.
### ContainerName (Default)
```
Copy-AzStorageBlob [-SrcBlob] <String> -SrcContainer <String> -DestContainer <String> [-DestBlob <String>]
[-StandardBlobTier <String>] [-RehydratePriority <RehydratePriority>] [-EncryptionScope <String>]
[-Context <IStorageContext>] [-DestContext <IStorageContext>] [-Force] [-AsJob] [-TagCondition <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-DestBlobType <String>] [-StandardBlobTier <String>] [-RehydratePriority <RehydratePriority>]
[-EncryptionScope <String>] [-Context <IStorageContext>] [-DestContext <IStorageContext>] [-Force] [-AsJob]
[-TagCondition <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### BlobInstance
```
Copy-AzStorageBlob [-BlobBaseClient <BlobBaseClient>] -DestContainer <String> [-DestBlob <String>]
[-StandardBlobTier <String>] [-RehydratePriority <RehydratePriority>] [-EncryptionScope <String>]
[-Context <IStorageContext>] [-DestContext <IStorageContext>] [-Force] [-AsJob] [-TagCondition <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-DestBlobType <String>] [-StandardBlobTier <String>] [-RehydratePriority <RehydratePriority>]
[-EncryptionScope <String>] [-Context <IStorageContext>] [-DestContext <IStorageContext>] [-Force] [-AsJob]
[-TagCondition <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### UriPipeline
```
Copy-AzStorageBlob -AbsoluteUri <String> -DestContainer <String> -DestBlob <String>
Copy-AzStorageBlob -AbsoluteUri <String> -DestContainer <String> -DestBlob <String> [-DestBlobType <String>]
[-StandardBlobTier <String>] [-RehydratePriority <RehydratePriority>] [-EncryptionScope <String>]
[-Context <IStorageContext>] [-DestContext <IStorageContext>] [-Force] [-AsJob] [-TagCondition <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Expand Down Expand Up @@ -71,6 +71,12 @@ C:\PS> $blob = Copy-AzStorageBlob -SrcContainer $containerName -SrcBlob $blobnam

This command update a block blob encryption scope by copy it to itself with a new encryption scope.

### Example 5: Copy a blob to a new append blob
```
C:\PS> $srcBlob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $ctx
C:\PS> $destBlob = Copy-AzStorageBlob -SrcContainer "sourcecontainername" -SrcBlob "srcblobname" -DestContainer "destcontainername" -DestBlob "destblobname" -DestBlobType "Append" -DestContext $destCtx
```

## PARAMETERS

### -AbsoluteUri
Expand Down Expand Up @@ -187,6 +193,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -DestBlobType
Destination blob type

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Accepted values: Block, Page, Append

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DestContainer
Destination container name

Expand Down
Loading