I'm given a Google Cloud Storage bucket address (gs://some_bucket_name
) to which I've already been granted read access. The bucket belongs to another project. Is there any way for me to find out what the project name or id that the bucket belongs to?
A project ID is a unique string used to differentiate your project from all others in Google Cloud. You can use the Google Cloud console to generate a project ID, or you can choose your own. You can only modify the project ID when you're creating the project.
A good question.
Buckets don't have obvious scoping to projects and their globally unique names aren't presented as part of hierarchy that includes project identifiers.
However... acls may be a good bet... I'm not certain that this definitive, please check:
gsutil acl get gs://[[BUCKET-NAME]]
Which yields the projectNumber
:
[
{
"entity": "project-owners-123456789012",
"projectTeam": {
"projectNumber": "123456789012",
"team": "owners"
},
"role": "OWNER"
},
{
"entity": "project-editors-123456789012",
"projectTeam": {
"projectNumber": "123456789012",
"team": "editors"
},
"role": "OWNER"
},
{
"entity": "project-viewers-123456789012",
"projectTeam": {
"projectNumber": "123456789012",
"team": "viewers"
},
"role": "READER"
}
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With