Skip to content

Commit 24eff0d

Browse files
feat(storage): update the api
#### storage:v1 The following keys were added: - resources.buckets.methods.getStorageLayout (Total Keys: 11) - schemas.BucketStorageLayout (Total Keys: 12)
1 parent 513380f commit 24eff0d

File tree

2 files changed

+111
-2
lines changed

2 files changed

+111
-2
lines changed

docs/dyn/storage_v1.buckets.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ <h2>Instance Methods</h2>
8686
<p class="toc_element">
8787
<code><a href="#getIamPolicy">getIamPolicy(bucket, optionsRequestedPolicyVersion=None, userProject=None)</a></code></p>
8888
<p class="firstline">Returns an IAM policy for the specified bucket.</p>
89+
<p class="toc_element">
90+
<code><a href="#getStorageLayout">getStorageLayout(bucket, prefix=None)</a></code></p>
91+
<p class="firstline">Returns the storage layout configuration for the specified bucket. Note that this operation requires storage.objects.list permission.</p>
8992
<p class="toc_element">
9093
<code><a href="#insert">insert(project, body=None, enableObjectRetention=None, predefinedAcl=None, predefinedDefaultObjectAcl=None, projection=None, userProject=None)</a></code></p>
9194
<p class="firstline">Creates a new bucket.</p>
@@ -382,6 +385,33 @@ <h3>Method Details</h3>
382385
}</pre>
383386
</div>
384387

388+
<div class="method">
389+
<code class="details" id="getStorageLayout">getStorageLayout(bucket, prefix=None)</code>
390+
<pre>Returns the storage layout configuration for the specified bucket. Note that this operation requires storage.objects.list permission.
391+
392+
Args:
393+
bucket: string, Name of a bucket. (required)
394+
prefix: string, An optional prefix used for permission check. It is useful when the caller only has storage.objects.list permission under a specific prefix.
395+
396+
Returns:
397+
An object of the form:
398+
399+
{ # The storage layout configuration of a bucket.
400+
&quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
401+
&quot;customPlacementConfig&quot;: { # The bucket&#x27;s custom placement configuration for Custom Dual Regions.
402+
&quot;dataLocations&quot;: [ # The list of regional locations in which data is placed.
403+
&quot;A String&quot;,
404+
],
405+
},
406+
&quot;hierarchicalNamespace&quot;: { # The bucket&#x27;s hierarchical namespace configuration.
407+
&quot;enabled&quot;: True or False, # When set to true, hierarchical namespace is enabled for this bucket.
408+
},
409+
&quot;kind&quot;: &quot;storage#storageLayout&quot;, # The kind of item this is. For storage layout, this is always storage#storageLayout.
410+
&quot;location&quot;: &quot;A String&quot;, # The location of the bucket.
411+
&quot;locationType&quot;: &quot;A String&quot;, # The type of the bucket location.
412+
}</pre>
413+
</div>
414+
385415
<div class="method">
386416
<code class="details" id="insert">insert(project, body=None, enableObjectRetention=None, predefinedAcl=None, predefinedDefaultObjectAcl=None, projection=None, userProject=None)</code>
387417
<pre>Creates a new bucket.

googleapiclient/discovery_cache/documents/storage.v1.json

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"location": "me-central2"
3434
}
3535
],
36-
"etag": "\"3135333330303535383630353431383233313136\"",
36+
"etag": "\"3132383134303835313436343635393933303731\"",
3737
"icons": {
3838
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
3939
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
@@ -681,6 +681,38 @@
681681
"https://www.googleapis.com/auth/devstorage.full_control"
682682
]
683683
},
684+
"getStorageLayout": {
685+
"description": "Returns the storage layout configuration for the specified bucket. Note that this operation requires storage.objects.list permission.",
686+
"httpMethod": "GET",
687+
"id": "storage.buckets.getStorageLayout",
688+
"parameterOrder": [
689+
"bucket"
690+
],
691+
"parameters": {
692+
"bucket": {
693+
"description": "Name of a bucket.",
694+
"location": "path",
695+
"required": true,
696+
"type": "string"
697+
},
698+
"prefix": {
699+
"description": "An optional prefix used for permission check. It is useful when the caller only has storage.objects.list permission under a specific prefix.",
700+
"location": "query",
701+
"type": "string"
702+
}
703+
},
704+
"path": "b/{bucket}/storageLayout",
705+
"response": {
706+
"$ref": "BucketStorageLayout"
707+
},
708+
"scopes": [
709+
"https://www.googleapis.com/auth/cloud-platform",
710+
"https://www.googleapis.com/auth/cloud-platform.read-only",
711+
"https://www.googleapis.com/auth/devstorage.full_control",
712+
"https://www.googleapis.com/auth/devstorage.read_only",
713+
"https://www.googleapis.com/auth/devstorage.read_write"
714+
]
715+
},
684716
"insert": {
685717
"description": "Creates a new bucket.",
686718
"httpMethod": "POST",
@@ -4043,7 +4075,7 @@
40434075
}
40444076
}
40454077
},
4046-
"revision": "20240517",
4078+
"revision": "20240524",
40474079
"rootUrl": "https://storage.googleapis.com/",
40484080
"schemas": {
40494081
"AnywhereCache": {
@@ -4662,6 +4694,53 @@
46624694
},
46634695
"type": "object"
46644696
},
4697+
"BucketStorageLayout": {
4698+
"description": "The storage layout configuration of a bucket.",
4699+
"id": "BucketStorageLayout",
4700+
"properties": {
4701+
"bucket": {
4702+
"description": "The name of the bucket.",
4703+
"type": "string"
4704+
},
4705+
"customPlacementConfig": {
4706+
"description": "The bucket's custom placement configuration for Custom Dual Regions.",
4707+
"properties": {
4708+
"dataLocations": {
4709+
"description": "The list of regional locations in which data is placed.",
4710+
"items": {
4711+
"type": "string"
4712+
},
4713+
"type": "array"
4714+
}
4715+
},
4716+
"type": "object"
4717+
},
4718+
"hierarchicalNamespace": {
4719+
"description": "The bucket's hierarchical namespace configuration.",
4720+
"properties": {
4721+
"enabled": {
4722+
"description": "When set to true, hierarchical namespace is enabled for this bucket.",
4723+
"type": "boolean"
4724+
}
4725+
},
4726+
"type": "object"
4727+
},
4728+
"kind": {
4729+
"default": "storage#storageLayout",
4730+
"description": "The kind of item this is. For storage layout, this is always storage#storageLayout.",
4731+
"type": "string"
4732+
},
4733+
"location": {
4734+
"description": "The location of the bucket.",
4735+
"type": "string"
4736+
},
4737+
"locationType": {
4738+
"description": "The type of the bucket location.",
4739+
"type": "string"
4740+
}
4741+
},
4742+
"type": "object"
4743+
},
46654744
"Buckets": {
46664745
"description": "A list of buckets.",
46674746
"id": "Buckets",

0 commit comments

Comments
 (0)