Interface IRoutingRule
Rule that define when a redirect is applied and the redirect behavior.
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IRoutingRule
Syntax (vb)
Public Interface IRoutingRule
Remarks
See: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.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;
ReplaceKey replaceKey;
var routingRule = new RoutingRule {
Condition = new RoutingRuleCondition {
HttpErrorCodeReturnedEquals = "httpErrorCodeReturnedEquals",
KeyPrefixEquals = "keyPrefixEquals"
},
HostName = "hostName",
HttpRedirectCode = "httpRedirectCode",
Protocol = RedirectProtocol.HTTP,
ReplaceKey = replaceKey
};
Synopsis
Properties
Condition | Specifies a condition that must be met for the specified redirect to apply. |
HostName | The host name to use in the redirect request. |
HttpRedirectCode | The HTTP redirect code to use on the response. |
Protocol | Protocol to use when redirecting requests. |
ReplaceKey | Specifies the object key prefix to use in the redirect request. |
Properties
Condition
Specifies a condition that must be met for the specified redirect to apply.
virtual IRoutingRuleCondition Condition { get; }
Property Value
Remarks
Default: - No condition
HostName
The host name to use in the redirect request.
virtual string HostName { get; }
Property Value
System.String
Remarks
Default: - The host name used in the original request.
HttpRedirectCode
The HTTP redirect code to use on the response.
virtual string HttpRedirectCode { get; }
Property Value
System.String
Remarks
Default: "301" - Moved Permanently
Protocol
Protocol to use when redirecting requests.
virtual Nullable<RedirectProtocol> Protocol { get; }
Property Value
System.Nullable<RedirectProtocol>
Remarks
Default: - The protocol used in the original request.
ReplaceKey
Specifies the object key prefix to use in the redirect request.
virtual ReplaceKey ReplaceKey { get; }
Property Value
Remarks
Default: - The key will not be replaced