// This action is useful to determine if a bucket exists and you have permission to
// access it. The action returns a 200 OK if the bucket exists and you have
// permission to access it. If the bucket does not exist or you do not have
// permission to access it, the HEAD request returns a generic 404 Not Found or 403
// Forbidden code. A message body is not included, so you cannot determine the
// exception beyond these error codes. 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/userguide/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/userguide/s3-access-control.html).
This action is useful to determine if a bucket exists and you have permission to
access it. The action returns a 200 OK if the bucket exists and you have
permission to access it. If the bucket does not exist or you do not have
permission to access it, the HEAD request returns a generic 404 Not Found or 403
Forbidden code. A message body is not included, so you cannot determine the
exception beyond these error codes. 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 action is useful to determine if a bucket exists and you have permission to // access it . The action returns a 200 OK if the bucket exists and you have // permission to access it . If the bucket does not exist or you do not have // permission to access it the HEAD request returns a generic 404 Not Found or 403 // Forbidden code . A message body is not included so you cannot determine the // exception beyond these error codes . 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 / userguide / 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 / userguide / 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 action is useful to determine if a bucket exists and you have permission to
access it.
This action is useful to determine if a bucket exists and you have permission to access it .