< Back
New-B2Bucket
Post
NAME New-B2Bucket
SYNOPSIS
New-B2Bucket will create a new private or public bucket and requires a globally unique name.
SYNTAX
New-B2Bucket [-BucketName] <String[]> [-BucketType] <String> [[-Force]] [[-ApiUri] <Uri>] [[-AccountID] <String>]
[[-ApiToken] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
New-B2Bucket will create a new private or public bucket and requires a globally unique name.
An API key is required to use this cmdlet.
PARAMETERS
-BucketName <String[]>
The name of the new B2 bucket.
Required? true
Position? 1
Default value
Accept pipeline input? false
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.
OUTPUTS
PS.B2.Bucket
The cmdlet will output a PS.B2.Bucket object holding the bucket info.
System.Uri
This cmdlet takes the ApiUri as a uri.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>New-B2Bucket -BucketName stoic-barbarian-lemur -BucketType allPublic
BucketName BucketID BucketType AccountID
---------- -------- ---------- ---------
stoic-barbarian-lemur 4a48fe8875c6214145260818 allPublic 010203040506
The cmdlet above will create a public bucket with the name of stoic-barbarian-lemur.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>New-B2Bucket -BucketName stoic-barbarian-lemur, frisky-navigator-lion -BucketType allPrivate
BucketName BucketID BucketType AccountID
---------- -------- ---------- ---------
stoic-barbarian-lemur 4a48fe8875c6214145260818 allPrivate 010203040506
frisky-navigator-lion 4a48fe8875c6214145260819 allPrivate 010203040506
The cmdlet above will create a public bucket with the name of stoic-barbarian-lemur and frisky-navigator-lion.
RELATED LINKS
https://www.backblaze.com/b2/docs/
SYNOPSIS
New-B2Bucket will create a new private or public bucket and requires a globally unique name.
SYNTAX
New-B2Bucket [-BucketName] <String[]> [-BucketType] <String> [[-Force]] [[-ApiUri] <Uri>] [[-AccountID] <String>]
[[-ApiToken] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
New-B2Bucket will create a new private or public bucket and requires a globally unique name.
An API key is required to use this cmdlet.
PARAMETERS
-BucketName <String[]>
The name of the new B2 bucket.
Required? true
Position? 1
Default value
Accept pipeline input? false
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.
OUTPUTS
PS.B2.Bucket
The cmdlet will output a PS.B2.Bucket object holding the bucket info.
System.Uri
This cmdlet takes the ApiUri as a uri.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>New-B2Bucket -BucketName stoic-barbarian-lemur -BucketType allPublic
BucketName BucketID BucketType AccountID
---------- -------- ---------- ---------
stoic-barbarian-lemur 4a48fe8875c6214145260818 allPublic 010203040506
The cmdlet above will create a public bucket with the name of stoic-barbarian-lemur.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>New-B2Bucket -BucketName stoic-barbarian-lemur, frisky-navigator-lion -BucketType allPrivate
BucketName BucketID BucketType AccountID
---------- -------- ---------- ---------
stoic-barbarian-lemur 4a48fe8875c6214145260818 allPrivate 010203040506
frisky-navigator-lion 4a48fe8875c6214145260819 allPrivate 010203040506
The cmdlet above will create a public bucket with the name of stoic-barbarian-lemur and frisky-navigator-lion.
RELATED LINKS
https://www.backblaze.com/b2/docs/