Interface IRoutingRuleCondition
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IRoutingRuleCondition
Syntax (vb)
Public Interface IRoutingRuleCondition
Remarks
ExampleMetadata: infused
Examples
var bucket = new Bucket(this, "MyRedirectedBucket", new BucketProps {
WebsiteRoutingRules = new [] { new RoutingRule {
HostName = "www.example.com",
HttpRedirectCode = "302",
Protocol = RedirectProtocol.HTTPS,
ReplaceKey = ReplaceKey.PrefixWith("test/"),
Condition = new RoutingRuleCondition {
HttpErrorCodeReturnedEquals = "200",
KeyPrefixEquals = "prefix"
}
} }
});
Synopsis
Properties
HttpErrorCodeReturnedEquals | The HTTP error code when the redirect is applied. |
KeyPrefixEquals | The object key name prefix when the redirect is applied. |
Properties
HttpErrorCodeReturnedEquals
The HTTP error code when the redirect is applied.
virtual string HttpErrorCodeReturnedEquals { get; }
Property Value
System.String
Remarks
In the event of an error, if the error code equals this value, then the specified redirect is applied.
If both condition properties are specified, both must be true for the redirect to be applied.
Default: - The HTTP error code will not be verified
KeyPrefixEquals
The object key name prefix when the redirect is applied.
virtual string KeyPrefixEquals { get; }
Property Value
System.String
Remarks
If both condition properties are specified, both must be true for the redirect to be applied.
Default: - The object key name will not be verified