< Back
Set-B2Bucket
Post
NAME Set-B2Bucket
SYNOPSIS
Set-B2Bucket allows you to change the bucket type.
SYNTAX
Set-B2Bucket [-BucketID] <String[]> [-BucketType] <String> [[-Force]] [[-ApiUri] <Uri>] [[-AccountID] <String>]
[[-ApiToken] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Set-B2Bucket allows you to change the bucket type.
An API key is required to use this cmdlet.
PARAMETERS
-BucketID <String[]>
The ID of the bucket to update.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-BucketType <String>
What type of bucket, public or private, to create.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Used to bypass confirmation prompts.
Required? false
Position? 3
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ApiUri <Uri>
The Uri for the B2 Api query.
Required? false
Position? 4
Default value $script:SavedB2ApiUri
Accept pipeline input? false
Accept wildcard characters? false
-AccountID <String>
The authorization token for the B2 account.
Required? false
Position? 5
Default value $script:SavedB2AccountID
Accept pipeline input? false
Accept wildcard characters? false
-ApiToken <String>
The authorization token for the B2 account.
Required? false
Position? 6
Default value $script:SavedB2ApiToken
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
This cmdlet takes the AccountID and ApplicationKey as strings.
System.Uri
This cmdlet takes the ApiUri as a uri.
OUTPUTS
PS.B2.Bucket
The cmdlet will output a PS.B2.Bucket object holding the bucket info.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Set-B2Bucket -BucketID 4a48fe8875c6214145260818 -BucketType allPublic
BucketName BucketID BucketType AccountID
---------- -------- ---------- ---------
slack-jimmy-carrot 4a48fe8875c6214145260818 allPublic 30f20426f0b1
The cmdlet above will set the bucket with the ID 4a48fe8875c6214145260818 to allPublic.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-B2Bucket | Where-Object {$_.BucketType -eq allPrivate} | Set-B2Bucket -BucketType allPublic
BucketName BucketID BucketType AccountID
---------- -------- ---------- ---------
stoic-barbarian-lemur 4a48fe8875c6214145260818 allPublic 010203040506
frisky-navigator-lion 4a48fe8875c6214145260819 allPublic 010203040506
The cmdlets above will set all, if any, allPrivate buckets to allPublic.
RELATED LINKS
https://www.backblaze.com/b2/docs/
SYNOPSIS
Set-B2Bucket allows you to change the bucket type.
SYNTAX
Set-B2Bucket [-BucketID] <String[]> [-BucketType] <String> [[-Force]] [[-ApiUri] <Uri>] [[-AccountID] <String>]
[[-ApiToken] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Set-B2Bucket allows you to change the bucket type.
An API key is required to use this cmdlet.
PARAMETERS
-BucketID <String[]>
The ID of the bucket to update.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-BucketType <String>
What type of bucket, public or private, to create.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Used to bypass confirmation prompts.
Required? false
Position? 3
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ApiUri <Uri>
The Uri for the B2 Api query.
Required? false
Position? 4
Default value $script:SavedB2ApiUri
Accept pipeline input? false
Accept wildcard characters? false
-AccountID <String>
The authorization token for the B2 account.
Required? false
Position? 5
Default value $script:SavedB2AccountID
Accept pipeline input? false
Accept wildcard characters? false
-ApiToken <String>
The authorization token for the B2 account.
Required? false
Position? 6
Default value $script:SavedB2ApiToken
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
This cmdlet takes the AccountID and ApplicationKey as strings.
System.Uri
This cmdlet takes the ApiUri as a uri.
OUTPUTS
PS.B2.Bucket
The cmdlet will output a PS.B2.Bucket object holding the bucket info.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Set-B2Bucket -BucketID 4a48fe8875c6214145260818 -BucketType allPublic
BucketName BucketID BucketType AccountID
---------- -------- ---------- ---------
slack-jimmy-carrot 4a48fe8875c6214145260818 allPublic 30f20426f0b1
The cmdlet above will set the bucket with the ID 4a48fe8875c6214145260818 to allPublic.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-B2Bucket | Where-Object {$_.BucketType -eq allPrivate} | Set-B2Bucket -BucketType allPublic
BucketName BucketID BucketType AccountID
---------- -------- ---------- ---------
stoic-barbarian-lemur 4a48fe8875c6214145260818 allPublic 010203040506
frisky-navigator-lion 4a48fe8875c6214145260819 allPublic 010203040506
The cmdlets above will set all, if any, allPrivate buckets to allPublic.
RELATED LINKS
https://www.backblaze.com/b2/docs/