Obtaining the Public Access Status of a Bucket (SDK for Go)
Function
This API obtains the public access status of an OBS bucket.
Restrictions
- To obtain the public access status of a bucket, you must be the bucket owner or have the required permission (obs:bucket:GetBucketPublicStatus in IAM or GetBucketPublicStatus in a bucket policy). For details, see Introduction to OBS Access Control, IAM Custom Policies, and Creating a Custom Bucket Policy.
Method
func (obsClient ObsClient) GetBucketPublicStatus(input *GetBucketPublicStatusInput) (output *BaseModel, err error)
Request Parameters
Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
input | Yes | Explanation: Request parameters for obtaining the public access status of an OBS bucket. For details, see GetBucketPublicStatusInput. |
Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
bucketName | String | Yes | Explanation: Bucket name. Restrictions:
Default value: None |
Responses
Parameter | Type | Description |
|---|---|---|
output | Explanation: Returned results. For details, see Table 4. | |
err | error | Explanation: Error messages returned by the API |
Parameter | Type | Description |
|---|---|---|
statusCode | int | Explanation: HTTP status code. Value range: A status code is a group of digits indicating the status of a response. It ranges from 2xx (indicating successes) to 4xx or 5xx (indicating errors). For more information, see Status Code. Default value: None |
RequestId | string | Explanation: Request ID returned by the OBS server Default value: None |
ResponseHeaders | map[string][]string | Explanation: HTTP response headers Default value: None |
IsPublic | Boolean | Explanation: Whether the bucket is public. Default value: False |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

