get-bucket-policy

更新时间:
复制 MD 格式

Retrieves the bucket policy for a specific bucket.

Prerequisites

Before you begin, ensure that you have:

Syntax

ossutil api get-bucket-policy --bucket <value> [flags]

Parameters

ParameterTypeRequiredDescription
--bucketstringYesThe name of the bucket.

For supported global flags, see Command-line options.

The get-bucket-policy command corresponds to the GetBucketPolicy API operation. For more information about the parameters in the GetBucketPolicy operation, see GetBucketPolicy.

Examples

Retrieve a bucket policy

Retrieve the bucket policy for examplebucket:

ossutil api get-bucket-policy --bucket examplebucket