Class RoutingRuleCondition
Inheritance
System.Object
RoutingRuleCondition
Implements
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RoutingRuleCondition : Object, IRoutingRuleCondition
Syntax (vb)
Public Class RoutingRuleCondition
Inherits Object
Implements 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
Constructors
RoutingRuleCondition() |
Properties
HttpErrorCodeReturnedEquals | The HTTP error code when the redirect is applied. |
KeyPrefixEquals | The object key name prefix when the redirect is applied. |
Constructors
RoutingRuleCondition()
public RoutingRuleCondition()
Properties
HttpErrorCodeReturnedEquals
The HTTP error code when the redirect is applied.
public string HttpErrorCodeReturnedEquals { get; set; }
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.
public string KeyPrefixEquals { get; set; }
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