Queries the ID of the resource group to which a bucket belongs.
Usage notes
By default, an Alibaba Cloud account has the permissions to query the ID of the resource group to which a bucket belongs. To query the ID of the resource group to which a bucket belongs by using a RAM user or Security Token Service (STS), you must have the oss:GetBucketResourceGroup permission. For more information, see Attach a custom policy to a RAM user.
Command syntax
ossutil api get-bucket-resource-group --bucket value [flags]The get-bucket-resource-group command corresponds to the GetBucketResourceGroup operation. For more information about the parameters in the GetBucketResourceGroup operation, see GetBucketResourceGroup.
For more information about supported global command-line options, see Global command-line options.
Examples
Run the following command to query the ID of the resource group to which a bucket named
examplebucketbelongs:ossutil api get-bucket-resource-group --bucket examplebucketRun the following command to query the ID of the resource group to which a bucket named
examplebucketbelongs and display the query results in the JSON format:ossutil api get-bucket-resource-group --bucket examplebucket --output-format jsonRun the following command to query the ID of the resource group to which a bucket named
examplebucketbelongs and display the query results in the YAML format:ossutil api get-bucket-resource-group --bucket examplebucket --output-format yaml