interface WebsiteConfigurationProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.S3.CfnBucket.WebsiteConfigurationProperty |
Java | software.amazon.awscdk.services.s3.CfnBucket.WebsiteConfigurationProperty |
Python | aws_cdk.aws_s3.CfnBucket.WebsiteConfigurationProperty |
TypeScript | @aws-cdk/aws-s3 » CfnBucket » WebsiteConfigurationProperty |
Specifies website configuration parameters for an Amazon S3 bucket.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as s3 from '@aws-cdk/aws-s3';
const websiteConfigurationProperty: s3.CfnBucket.WebsiteConfigurationProperty = {
errorDocument: 'errorDocument',
indexDocument: 'indexDocument',
redirectAllRequestsTo: {
hostName: 'hostName',
// the properties below are optional
protocol: 'protocol',
},
routingRules: [{
redirectRule: {
hostName: 'hostName',
httpRedirectCode: 'httpRedirectCode',
protocol: 'protocol',
replaceKeyPrefixWith: 'replaceKeyPrefixWith',
replaceKeyWith: 'replaceKeyWith',
},
// the properties below are optional
routingRuleCondition: {
httpErrorCodeReturnedEquals: 'httpErrorCodeReturnedEquals',
keyPrefixEquals: 'keyPrefixEquals',
},
}],
};
Properties
Name | Type | Description |
---|---|---|
error | string | The name of the error document for the website. |
index | string | The name of the index document for the website. |
redirect | IResolvable | Redirect | The redirect behavior for every request to this bucket's website endpoint. |
routing | IResolvable | IResolvable | Routing [] | Rules that define when a redirect is applied and the redirect behavior. |
errorDocument?
Type:
string
(optional)
The name of the error document for the website.
indexDocument?
Type:
string
(optional)
The name of the index document for the website.
redirectAllRequestsTo?
Type:
IResolvable
|
Redirect
(optional)
The redirect behavior for every request to this bucket's website endpoint.
If you specify this property, you can't specify any other property.
routingRules?
Type:
IResolvable
|
IResolvable
|
Routing
[]
(optional)
Rules that define when a redirect is applied and the redirect behavior.