Queries the ID of the resource group to which a bucket belongs.
Usage notes
By default, an Alibaba Cloud account has the permissions to run this command. To run this command as a RAM user or by using Security Token Service (STS), you must have the oss:GetBucketResourceGroup permission. For more information, see Attach a custom policy to a RAM user.
Syntax
ossutil api get-bucket-resource-group --bucket <value> [flags]This command corresponds to the GetBucketResourceGroup API operation. For the full list of parameters, see GetBucketResourceGroup. For supported global flags, see Global command-line options.
Examples
Query the resource group ID of a bucket named examplebucket:
ossutil api get-bucket-resource-group --bucket examplebucketQuery the resource group ID and display the output in JSON:
ossutil api get-bucket-resource-group --bucket examplebucket --output-format jsonQuery the resource group ID and display the output in YAML:
ossutil api get-bucket-resource-group --bucket examplebucket --output-format yaml