Show / Hide Table of Contents

Class RoutingRuleCondition

Inheritance
object
RoutingRuleCondition
Implements
IRoutingRuleCondition
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RoutingRuleCondition : IRoutingRuleCondition
Syntax (vb)
Public Class RoutingRuleCondition 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()
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"
                    }
                } }
            });

Properties

HttpErrorCodeReturnedEquals

The HTTP error code when the redirect is applied.

public string? HttpErrorCodeReturnedEquals { get; set; }
Property Value

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

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

Implements

IRoutingRuleCondition
Back to top Generated by DocFX