Show / Hide Table of Contents

Class CfnBucket.RoutingRuleProperty

Specifies the redirect behavior and when a redirect is applied.

Inheritance
System.Object
CfnBucket.RoutingRuleProperty
Implements
CfnBucket.IRoutingRuleProperty
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.AWS.S3.dll
Syntax (csharp)
public class RoutingRuleProperty : Object, CfnBucket.IRoutingRuleProperty
Syntax (vb)
Public Class RoutingRuleProperty
    Inherits Object
    Implements CfnBucket.IRoutingRuleProperty
Remarks

For more information about routing rules, see Configuring advanced conditional redirects in the Amazon S3 User Guide .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;

RoutingRuleProperty routingRuleProperty = new RoutingRuleProperty {
    RedirectRule = new RedirectRuleProperty {
        HostName = "hostName",
        HttpRedirectCode = "httpRedirectCode",
        Protocol = "protocol",
        ReplaceKeyPrefixWith = "replaceKeyPrefixWith",
        ReplaceKeyWith = "replaceKeyWith"
    },

    // the properties below are optional
    RoutingRuleCondition = new RoutingRuleConditionProperty {
        HttpErrorCodeReturnedEquals = "httpErrorCodeReturnedEquals",
        KeyPrefixEquals = "keyPrefixEquals"
    }
};

Synopsis

Constructors

RoutingRuleProperty()

Properties

RedirectRule

Container for redirect information.

RoutingRuleCondition

A container for describing a condition that must be met for the specified redirect to apply.

Constructors

RoutingRuleProperty()

public RoutingRuleProperty()

Properties

RedirectRule

Container for redirect information.

public object RedirectRule { get; set; }
Property Value

System.Object

Remarks

You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html#cfn-s3-websiteconfiguration-routingrules-redirectrule

RoutingRuleCondition

A container for describing a condition that must be met for the specified redirect to apply.

public object RoutingRuleCondition { get; set; }
Property Value

System.Object

Remarks

For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html#cfn-s3-websiteconfiguration-routingrules-routingrulecondition

Implements

CfnBucket.IRoutingRuleProperty
Back to top Generated by DocFX