// This operation is useful to determine if a bucket exists and you have permission
// to access it. The operation returns a 200 OK if the bucket exists and you have
// permission to access it. Otherwise, the operation might return responses such as
// 404 Not Found and 403 Forbidden. To use this operation, you must have
// permissions to perform the s3:ListBucket action. The bucket owner has this
// permission by default and can grant this permission to others. For more
// information about permissions, see Permissions Related to Bucket Subresource
// Operations
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
// and Managing Access Permissions to Your Amazon S3 Resources
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html).
This operation is useful to determine if a bucket exists and you have permission
to access it. The operation returns a 200 OK if the bucket exists and you have
permission to access it. Otherwise, the operation might return responses such as
404 Not Found and 403 Forbidden. To use this operation, you must have
permissions to perform the s3:ListBucket action. The bucket owner has this
permission by default and can grant this permission to others. For more
information about permissions, see Permissions Related to Bucket Subresource
Operations

and Managing Access Permissions to Your Amazon S3 Resources
.
// This operation is useful to determine if a bucket exists and you have permission // to access it . The operation returns a 200 OK if the bucket exists and you have // permission to access it . Otherwise the operation might return responses such as // 404 Not Found and 403 Forbidden . To use this operation you must have // permissions to perform the s3 : ListBucket action . The bucket owner has this // permission by default and can grant this permission to others . For more // information about permissions see Permissions Related to Bucket Subresource // Operations // ( https : // docs . aws . amazon . com / AmazonS3 / latest / dev / using - with - s3 - actions . html#using - with - s3 - actions - related - to - bucket - subresources ) // and Managing Access Permissions to Your Amazon S3 Resources // ( https : // docs . aws . amazon . com / AmazonS3 / latest / dev / s3 - access - control . html ) .
func (c *Client) HeadBucket(ctx context.Context, params *HeadBucketInput, optFns ...func(*Options)) (*HeadBucketOutput, error) {
	if params == nil {
		params = &HeadBucketInput{}
	}
	result, metadata, err := c.invokeOperation(ctx, "HeadBucket", params, optFns, addOperationHeadBucketMiddlewares)
	if err != nil {
		return nil, err
	}
	out := result.(*HeadBucketOutput)
	out.ResultMetadata = metadata
	return out, nil
}
func ( c * Client ) HeadBucket ( ctx context . Context , params * HeadBucketInput , optFns ... func ( * Options ) ) ( * HeadBucketOutput , error ) { if params == nil { params = & HeadBucketInput { } } result , metadata , err := c . invokeOperation ( ctx , " " , params , optFns , addOperationHeadBucketMiddlewares ) if err != nil { return nil , err } out := result . ( * HeadBucketOutput ) out . ResultMetadata = metadata return out , nil }
This operation is useful to determine if a bucket exists and you have permission
to access it.
This operation is useful to determine if a bucket exists and you have permission to access it .