AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Specifies how requests are redirected. In the event of an error, you can specify a different error code to return.

Inheritance Hierarchy

System.Object
  Amazon.S3.Model.RoutingRuleRedirect

Namespace: Amazon.S3.Model
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z

Syntax

C#
public class RoutingRuleRedirect

The RoutingRuleRedirect type exposes the following members

Constructors

NameDescription
Public Method RoutingRuleRedirect()

Properties

NameTypeDescription
Public Property HostName System.String

Gets and sets the property HostName.

The host name to use in the redirect request.

Public Property HttpRedirectCode System.String

Gets and sets the property HttpRedirectCode.

The HTTP redirect code to use on the response. Not required if one of the siblings is present.

Public Property Protocol System.String

Gets and sets the property Protocol.

Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

Public Property ReplaceKeyPrefixWith System.String

Gets and sets the property ReplaceKeyPrefixWith.

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with KeyPrefixEquals set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required if one of the siblings is present. Can be present only if ReplaceKeyWith is not provided.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Public Property ReplaceKeyWith System.String

Gets and sets the property ReplaceKeyWith.

The specific object key to use in the redirect request. For example, redirect request to error.html. Not required if one of the siblings is present. Can be present only if ReplaceKeyPrefixWith is not provided.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer