amazonka-s3-2.0: Amazon Simple Storage Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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.

  • httpRedirectCode :: Maybe Text

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

  • protocol :: Maybe Protocol

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

  • 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.

  • 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.

Instances

Instances details
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 #

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 #

Read Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Show Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

NFData Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Methods

rnf :: Redirect -> () #

Eq Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Hashable Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

Methods

hashWithSalt :: Int -> Redirect -> Int #

hash :: Redirect -> Int #

type Rep Redirect Source # 
Instance details

Defined in Amazonka.S3.Types.Redirect

type Rep Redirect = D1 ('MetaData "Redirect" "Amazonka.S3.Types.Redirect" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "Redirect'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "hostName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpRedirectCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "protocol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Protocol)) :*: (S1 ('MetaSel ('Just "replaceKeyPrefixWith") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "replaceKeyWith") '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:httpRedirectCode:Redirect', redirect_httpRedirectCode - The HTTP redirect code to use on the response. Not required if one of the siblings is present.

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

$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.

$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.

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

The host name to use in the redirect 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_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_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.

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.