import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { HeadBucketOutput, HeadBucketRequest } from "../models/models_0"; import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link HeadBucketCommand}. */ export interface HeadBucketCommandInput extends HeadBucketRequest { } /** * @public * * The output of {@link HeadBucketCommand}. */ export interface HeadBucketCommandOutput extends HeadBucketOutput, __MetadataBearer { } declare const HeadBucketCommand_base: { new (input: HeadBucketCommandInput): import("@smithy/smithy-client").CommandImpl; new (__0_0: HeadBucketCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

You can use this operation to determine if a bucket exists and if 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 400 Bad Request, 403 * Forbidden or 404 Not Found code. A message body is not included, so * you cannot determine the exception beyond these HTTP response codes.

* *

* Directory buckets - You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the * Amazon S3 User Guide.

*
*
*
Authentication and authorization
*
*

All HeadBucket requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz- prefix, including * x-amz-copy-source, must be signed. For more information, see REST Authentication.

*

* Directory bucket - You must use IAM credentials to authenticate and authorize your access to the HeadBucket API operation, instead of using the * temporary security credentials through the CreateSession API operation.

*

Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.

*
*
Permissions
*
*

* *
*
HTTP Host header syntax
*
*

* Directory buckets - The HTTP Host header syntax is * Bucket_name.s3express-az_id.region.amazonaws.com.

*
*
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { S3Client, HeadBucketCommand } from "@aws-sdk/client-s3"; // ES Modules import * // const { S3Client, HeadBucketCommand } = require("@aws-sdk/client-s3"); // CommonJS import * const client = new S3Client(config); * const input = { // HeadBucketRequest * Bucket: "STRING_VALUE", // required * ExpectedBucketOwner: "STRING_VALUE", * }; * const command = new HeadBucketCommand(input); * const response = await client.send(command); * // { // HeadBucketOutput * // BucketLocationType: "AvailabilityZone", * // BucketLocationName: "STRING_VALUE", * // BucketRegion: "STRING_VALUE", * // AccessPointAlias: true || false, * // }; * * ``` * * @param HeadBucketCommandInput - {@link HeadBucketCommandInput} * @returns {@link HeadBucketCommandOutput} * @see {@link HeadBucketCommandInput} for command's `input` shape. * @see {@link HeadBucketCommandOutput} for command's `response` shape. * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape. * * @throws {@link NotFound} (client fault) *

The specified content does not exist.

* * @throws {@link S3ServiceException} *

Base exception class for all service exceptions from S3 service.

* * @public * @example To determine if bucket exists * ```javascript * // This operation checks to see if a bucket exists. * const input = { * "Bucket": "acl1" * }; * const command = new HeadBucketCommand(input); * await client.send(command); * // example id: to-determine-if-bucket-exists-1473110292262 * ``` * */ export declare class HeadBucketCommand extends HeadBucketCommand_base { }