

# GetBucketDefaultStorageClass

**Note**  
This operation is not supported for directory buckets.

Returns the default storage class of the general purpose bucket. Amazon S3 uses the default storage class for new objects that you write to the bucket without the `x-amz-storage-class` request header. If you haven't set a default storage class for the bucket, Amazon S3 returns `STANDARD`. For more information, see [Setting the default storage class for a bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-default-storage-class.html) in the *Amazon S3 User Guide*.

To use this operation, you must have the `s3:GetBucketDefaultStorageClass` permission.

The following operations are related to `GetBucketDefaultStorageClass`:
+  [PutBucketDefaultStorageClass](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketDefaultStorageClass.html) 
+  [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) 
+  [CopyObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) 
+  [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) 

## Request Syntax
<a name="API_GetBucketDefaultStorageClass_RequestSyntax"></a>

```
GET /?default-storage-class HTTP/1.1
Host: {{Bucket}}.s3.amazonaws.com
x-amz-expected-bucket-owner: {{ExpectedBucketOwner}}
```

## URI Request Parameters
<a name="API_GetBucketDefaultStorageClass_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Bucket](#API_GetBucketDefaultStorageClass_RequestSyntax) **   <a name="AmazonS3-GetBucketDefaultStorageClass-request-header-Bucket"></a>
The name of the general purpose bucket.  
Required: Yes

 ** [x-amz-expected-bucket-owner](#API_GetBucketDefaultStorageClass_RequestSyntax) **   <a name="AmazonS3-GetBucketDefaultStorageClass-request-header-ExpectedBucketOwner"></a>
The AWS account ID of the general purpose bucket's owner.

## Request Body
<a name="API_GetBucketDefaultStorageClass_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_GetBucketDefaultStorageClass_ResponseSyntax"></a>

```
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<DefaultStorageClassConfiguration>
   <DefaultStorageClass>string</DefaultStorageClass>
</DefaultStorageClassConfiguration>
```

## Response Elements
<a name="API_GetBucketDefaultStorageClass_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

 ** [DefaultStorageClassConfiguration](#API_GetBucketDefaultStorageClass_ResponseSyntax) **   <a name="AmazonS3-GetBucketDefaultStorageClass-response-DefaultStorageClassConfiguration"></a>
Root level tag for the DefaultStorageClassConfiguration parameters.  
Required: Yes

 ** [DefaultStorageClass](#API_GetBucketDefaultStorageClass_ResponseSyntax) **   <a name="AmazonS3-GetBucketDefaultStorageClass-response-DefaultStorageClass"></a>
The default storage class of the general purpose bucket. Valid values are `STANDARD` and `INTELLIGENT_TIERING`.  
Type: String  
Valid Values: `STANDARD | INTELLIGENT_TIERING` 

## See Also
<a name="API_GetBucketDefaultStorageClass_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/s3-2006-03-01/GetBucketDefaultStorageClass) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/s3-2006-03-01/GetBucketDefaultStorageClass) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/s3-2006-03-01/GetBucketDefaultStorageClass) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/s3-2006-03-01/GetBucketDefaultStorageClass) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/s3-2006-03-01/GetBucketDefaultStorageClass) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/s3-2006-03-01/GetBucketDefaultStorageClass) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/s3-2006-03-01/GetBucketDefaultStorageClass) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/s3-2006-03-01/GetBucketDefaultStorageClass) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/s3-2006-03-01/GetBucketDefaultStorageClass) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/s3-2006-03-01/GetBucketDefaultStorageClass) 