libZSservicesZSamazonka-s3ZSamazonka-s3
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.S3.Types.Redirect

Description

 
Synopsis

Documentation

data Redirect Source #

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

See: newRedirect smart constructor.

Constructors

Redirect' 

Fields

  • hostName :: Maybe Text

    The host name to use in the redirect request.

  • protocol :: Maybe Protocol

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

  • httpRedirectCode :: Maybe Text

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

  • replaceKeyWith :: Maybe Text

    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.

  • replaceKeyPrefixWith :: Maybe Text

    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.

Instances

Instances details
Eq Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Read Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Show Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Generic Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Associated Types

type Rep Redirect :: Type -> Type #

Methods

from :: Redirect -> Rep Redirect x #

to :: Rep Redirect x -> Redirect #

NFData Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Methods

rnf :: Redirect -> () #

Hashable Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Methods

hashWithSalt :: Int -> Redirect -> Int #

hash :: Redirect -> Int #

FromXML Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

ToXML Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Methods

toXML :: Redirect -> XML #

type Rep Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

type Rep Redirect = D1 ('MetaData "Redirect" "Amazonka.S3.Types.Redirect" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "Redirect'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "hostName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "protocol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Protocol))) :*: (S1 ('MetaSel ('Just "httpRedirectCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "replaceKeyWith") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "replaceKeyPrefixWith") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))))

newRedirect :: Redirect Source #

Create a value of Redirect with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:hostName:Redirect', redirect_hostName - The host name to use in the redirect request.

$sel:protocol:Redirect', redirect_protocol - Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

$sel:httpRedirectCode:Redirect', redirect_httpRedirectCode - The HTTP redirect code to use on the response. Not required if one of the siblings is present.

$sel:replaceKeyWith:Redirect', redirect_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.

$sel:replaceKeyPrefixWith:Redirect', redirect_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.

redirect_hostName :: Lens' Redirect (Maybe Text) Source #

The host name to use in the redirect request.

redirect_protocol :: Lens' Redirect (Maybe Protocol) Source #

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

redirect_httpRedirectCode :: Lens' Redirect (Maybe Text) Source #

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

redirect_replaceKeyWith :: Lens' Redirect (Maybe Text) Source #

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.

redirect_replaceKeyPrefixWith :: Lens' Redirect (Maybe Text) Source #

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.