/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.S3.Model { /// /// Container for the parameters to the HeadBucket operation. /// 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. /// /// /// /// To use this API against an access point, you must provide the alias of the access /// point in place of the bucket name or specify the access point ARN. When using the /// access point ARN, you must direct requests to the access point hostname. The access /// point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. /// When using the Amazon Web Services SDKs, you provide the ARN in place of the bucket /// name. For more information see, Using /// access points. /// /// internal partial class HeadBucketRequest : AmazonWebServiceRequest { private string bucketName; private string expectedBucketOwner; /// /// Gets and sets the property BucketName. /// /// The bucket name. /// /// /// /// When using this action with an access point, you must direct requests to the access /// point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. /// When using this action with an access point through the Amazon Web Services SDKs, /// you provide the access point ARN in place of the bucket name. For more information /// about access point ARNs, see Using /// access points in the Amazon S3 User Guide. /// /// /// /// When you use this action with Amazon S3 on Outposts, you must direct requests to the /// S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. /// When you use this action with S3 on Outposts through the Amazon Web Services SDKs, /// you provide the Outposts access point ARN in place of the bucket name. For more information /// about S3 on Outposts ARNs, see What /// is S3 on Outposts? in the Amazon S3 User Guide. /// /// public string BucketName { get { return this.bucketName; } set { this.bucketName = value; } } // Check to see if BucketName property is set internal bool IsSetBucketName() { return this.bucketName != null; } /// /// Gets and sets the property ExpectedBucketOwner. /// /// The account ID of the expected bucket owner. If the bucket is owned by a different /// account, the request will fail with an HTTP 403 (Access Denied) error. /// /// public string ExpectedBucketOwner { get { return this.expectedBucketOwner; } set { this.expectedBucketOwner = value; } } // Check to see if ExpectedBucketOwner property is set internal bool IsSetExpectedBucketOwner() { return !String.IsNullOrEmpty(this.expectedBucketOwner); } } }