< Back

New-GcsBucket

Mon Jan 13, 2020 11:31 pm

NAME New-GcsBucket



SYNOPSIS

Creates a new Google Cloud Storage bucket.





SYNTAX

New-GcsBucket [-Name] <string> [-Project <string>] [-StorageClass <string>] [-Location <string>]

[-DefaultBucketAcl {AuthenticatedRead | Private__ | ProjectPrivate | PublicRead | PublicReadWrite}]

[-DefaultObjectAcl {AuthenticatedRead | BucketOwnerFullControl | BucketOwnerRead | Private__ | ProjectPrivate |

PublicRead}] [<CommonParameters>]





DESCRIPTION

Creates a new Google Cloud Storage bucket. Bucket names must be globally unique. No two projects may have buckets

with the same name.





PARAMETERS

-Name <string>

Name of the bucket.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Project <string>

The name of the project associated with the command. If not set via PowerShell parameter processing, will

default to the Cloud SDK's DefaultProject property.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-StorageClass <string>

Storage class for the bucket. COLDLINE, DURABLE_REDUCED_AVAILABILITY, MULTI_REGIONAL, NEARLINE, REGIONAL or

STANDARD. See https://cloud.google.com/storage/docs/storage-classes for more information.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Location <string>

Location for the bucket. e.g. ASIA, EU, US.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DefaultBucketAcl <PredefinedAclEnum>

Default ACL for the bucket. "Private__" gives the bucket owner "OWNER" permission. All other permissions are

removed. "ProjectPrivate" gives permission to the project team based on their roles. Anyone who is part of the

team has "READER" permission. Project owners and project editors have "OWNER" permission. All other

permissions are removed. "AuthenticatedRead" gives the bucket owner "OWNER" permission and gives all

authenticated Google account holders "READER" permission. All other permissions are removed. "PublicRead"

gives the bucket owner "OWNER" permission and gives all users "READER" permission. All other permissions are

removed. "PublicReadWrite" gives the bucket owner "OWNER" permission and gives all user "READER" and "WRITER"

permission. All other permissions are removed.



To set fine-grained (e.g. individual users or domains) ACLs using PowerShell, use Add-GcsBucketAcl cmdlets.



Possible values: AuthenticatedRead, Private__, ProjectPrivate, PublicRead, PublicReadWrite



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DefaultObjectAcl <PredefinedDefaultObjectAclEnum>

Default ACL for objects added to the bucket. "Private__" gives the object owner "OWNER" permission. All other

permissions are removed. "ProjectPrivate" gives permission to the project team based on their roles. Anyone

who is part of the team has "READER" permission. Project owners and project editors have "OWNER" permission.

All other permissions are removed. "AuthenticatedRead" gives the object owner "OWNER" permission and gives all

authenticated Google account holders "READER" permission. All other permissions are removed. "PublicRead"

gives the object owner "OWNER" permission and gives all users "READER" permission. All other permissions are

removed. "BucketOwnerRead" gives the object owner "OWNER" permission and the bucket owner "READER" permission.

All other permissions are removed. "BucketOwnerFullControl" gives the object and bucket owners "OWNER"

permission. All other permissions are removed.



To set fine-grained (e.g. individual users or domains) ACLs using PowerShell, use Add-GcsObjectAcl cmdlets.



Possible values: AuthenticatedRead, BucketOwnerFullControl, BucketOwnerRead, Private__, ProjectPrivate,

PublicRead



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



OUTPUTS

Google.Apis.Storage.v1.Data.Bucket





---------- EXAMPLE 1 ----------



PS C:\\> New-Gcsbucket "widget-co-logs"



Creates a new bucket named "widget-co-logs".



RELATED LINKS