Interroge les informations relatives à un bucket.
Remarques sur l'utilisation
Seul le propriétaire d'un bucket est autorisé à interroger ses informations. Vous pouvez interroger les informations d'un bucket depuis n'importe quel endpoint Object Storage Service (OSS).
Pour interroger les informations d'un bucket, vous devez disposer de l'autorisation
oss:GetBucketInfo. Pour plus d'informations, consultez la rubrique Attacher une politique personnalisée à un utilisateur RAM.
Syntaxe de la commande
ossutil api get-bucket-info --bucket value [flags]
|
Paramètre |
Type |
Description |
|
--bucket |
string |
Nom du bucket. |
Pour plus d'informations, consultez la rubrique Options de ligne de commande.
Exemples
-
Interrogez les informations du bucket examplebucket.
ossutil api get-bucket-info --bucket examplebucket -
Interrogez les informations du bucket examplebucket et formatez la sortie en JSON.
ossutil api get-bucket-info --bucket examplebucket --output-format json -
Interrogez les informations du bucket examplebucket et formatez la sortie en YAML.
ossutil api get-bucket-info --bucket examplebucket --output-format yaml