@@ -48,9 +48,23 @@ export interface GetServiceAccountCallback {
4848}
4949
5050export interface CreateBucketQuery {
51+ enableObjectRetention : boolean ;
52+ predefinedAcl ?:
53+ | 'authenticatedRead'
54+ | 'private'
55+ | 'projectPrivate'
56+ | 'publicRead'
57+ | 'publicReadWrite' ;
58+ predefinedDefaultObjectAcl ?:
59+ | 'authenticatedRead'
60+ | 'bucketOwnerFullControl'
61+ | 'bucketOwnerRead'
62+ | 'private'
63+ | 'projectPrivate'
64+ | 'publicRead' ;
5165 project : string ;
66+ projection ?: 'full' | 'noAcl' ;
5267 userProject : string ;
53- enableObjectRetention : boolean ;
5468}
5569
5670export enum IdempotencyStrategy {
@@ -117,30 +131,30 @@ export interface AutoclassConfig {
117131 terminalStorageClass ?: 'NEARLINE' | 'ARCHIVE' ;
118132}
119133
120- export interface CreateBucketRequest {
134+ export interface CreateBucketRequest extends BucketMetadata {
121135 archive ?: boolean ;
122- autoclass ?: AutoclassConfig ;
123136 coldline ?: boolean ;
124- cors ?: Cors [ ] ;
125- customPlacementConfig ?: CustomPlacementConfig ;
137+ dataLocations ?: string [ ] ;
126138 dra ?: boolean ;
127139 enableObjectRetention ?: boolean ;
128- hierarchicalNamespace ?: {
129- enabled ?: boolean ;
130- } ;
131- iamConfiguration ?: {
132- publicAccessPrevention ?: string ;
133- uniformBucketLevelAccess ?: {
134- enabled ?: boolean ;
135- lockedTime ?: string ;
136- } ;
137- } ;
138- location ?: string ;
139140 multiRegional ?: boolean ;
140141 nearline ?: boolean ;
142+ predefinedAcl ?:
143+ | 'authenticatedRead'
144+ | 'private'
145+ | 'projectPrivate'
146+ | 'publicRead'
147+ | 'publicReadWrite' ;
148+ predefinedDefaultObjectAcl ?:
149+ | 'authenticatedRead'
150+ | 'bucketOwnerFullControl'
151+ | 'bucketOwnerRead'
152+ | 'private'
153+ | 'projectPrivate'
154+ | 'publicRead' ;
155+ projection ?: 'full' | 'noAcl' ;
141156 regional ?: boolean ;
142157 requesterPays ?: boolean ;
143- retentionPolicy ?: object ;
144158 rpo ?: string ;
145159 standard ?: boolean ;
146160 storageClass ?: string ;
@@ -887,8 +901,7 @@ export class Storage extends Service {
887901 * Multi-Regional.
888902 * @property {boolean } [nearline=false] Specify the storage class as Nearline.
889903 * @property {boolean } [regional=false] Specify the storage class as Regional.
890- * @property {boolean } [requesterPays=false] **Early Access Testers Only**
891- * Force the use of the User Project metadata field to assign operational
904+ * @property {boolean } [requesterPays=false] Force the use of the User Project metadata field to assign operational
892905 * costs when an operation is made on a Bucket and its objects.
893906 * @property {string } [rpo] For dual-region buckets, controls whether turbo
894907 * replication is enabled (`ASYNC_TURBO`) or disabled (`DEFAULT`).
@@ -995,7 +1008,7 @@ export class Storage extends Service {
9951008 metadata = metadataOrCallback as CreateBucketRequest ;
9961009 }
9971010
998- const body : CreateBucketRequest & { [ index : string ] : string | { } } = {
1011+ const body : CreateBucketRequest & { [ index : string ] : string | { } | null } = {
9991012 ...metadata ,
10001013 name,
10011014 } ;
@@ -1046,6 +1059,21 @@ export class Storage extends Service {
10461059 delete body . enableObjectRetention ;
10471060 }
10481061
1062+ if ( body . predefinedAcl ) {
1063+ query . predefinedAcl = body . predefinedAcl ;
1064+ delete body . predefinedAcl ;
1065+ }
1066+
1067+ if ( body . predefinedDefaultObjectAcl ) {
1068+ query . predefinedDefaultObjectAcl = body . predefinedDefaultObjectAcl ;
1069+ delete body . predefinedDefaultObjectAcl ;
1070+ }
1071+
1072+ if ( body . projection ) {
1073+ query . projection = body . projection ;
1074+ delete body . projection ;
1075+ }
1076+
10491077 this . request (
10501078 {
10511079 method : 'POST' ,
0 commit comments