libZSservicesZSamazonka-amplifyZSamazonka-amplify
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.Amplify.Types.CustomRule

Description

 
Synopsis

Documentation

data CustomRule Source #

Describes a custom rewrite or redirect rule.

See: newCustomRule smart constructor.

Constructors

CustomRule' 

Fields

  • status :: Maybe Text

    The status code for a URL rewrite or redirect rule.

    200
    Represents a 200 rewrite rule.
    301
    Represents a 301 (moved pemanently) redirect rule. This and all future requests should be directed to the target URL.
    302
    Represents a 302 temporary redirect rule.
    404
    Represents a 404 redirect rule.
    404-200
    Represents a 404 rewrite rule.
  • condition :: Maybe Text

    The condition for a URL rewrite or redirect rule, such as a country code.

  • source :: Text

    The source pattern for a URL rewrite or redirect rule.

  • target :: Text

    The target pattern for a URL rewrite or redirect rule.

Instances

Instances details
Eq CustomRule Source # 
Instance details

Defined in Amazonka.Amplify.Types.CustomRule

Read CustomRule Source # 
Instance details

Defined in Amazonka.Amplify.Types.CustomRule

Show CustomRule Source # 
Instance details

Defined in Amazonka.Amplify.Types.CustomRule

Generic CustomRule Source # 
Instance details

Defined in Amazonka.Amplify.Types.CustomRule

Associated Types

type Rep CustomRule :: Type -> Type #

NFData CustomRule Source # 
Instance details

Defined in Amazonka.Amplify.Types.CustomRule

Methods

rnf :: CustomRule -> () #

Hashable CustomRule Source # 
Instance details

Defined in Amazonka.Amplify.Types.CustomRule

ToJSON CustomRule Source # 
Instance details

Defined in Amazonka.Amplify.Types.CustomRule

FromJSON CustomRule Source # 
Instance details

Defined in Amazonka.Amplify.Types.CustomRule

type Rep CustomRule Source # 
Instance details

Defined in Amazonka.Amplify.Types.CustomRule

type Rep CustomRule = D1 ('MetaData "CustomRule" "Amazonka.Amplify.Types.CustomRule" "libZSservicesZSamazonka-amplifyZSamazonka-amplify" 'False) (C1 ('MetaCons "CustomRule'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "condition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "source") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newCustomRule Source #

Create a value of CustomRule 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:status:CustomRule', customRule_status - The status code for a URL rewrite or redirect rule.

200
Represents a 200 rewrite rule.
301
Represents a 301 (moved pemanently) redirect rule. This and all future requests should be directed to the target URL.
302
Represents a 302 temporary redirect rule.
404
Represents a 404 redirect rule.
404-200
Represents a 404 rewrite rule.

$sel:condition:CustomRule', customRule_condition - The condition for a URL rewrite or redirect rule, such as a country code.

$sel:source:CustomRule', customRule_source - The source pattern for a URL rewrite or redirect rule.

$sel:target:CustomRule', customRule_target - The target pattern for a URL rewrite or redirect rule.

customRule_status :: Lens' CustomRule (Maybe Text) Source #

The status code for a URL rewrite or redirect rule.

200
Represents a 200 rewrite rule.
301
Represents a 301 (moved pemanently) redirect rule. This and all future requests should be directed to the target URL.
302
Represents a 302 temporary redirect rule.
404
Represents a 404 redirect rule.
404-200
Represents a 404 rewrite rule.

customRule_condition :: Lens' CustomRule (Maybe Text) Source #

The condition for a URL rewrite or redirect rule, such as a country code.

customRule_source :: Lens' CustomRule Text Source #

The source pattern for a URL rewrite or redirect rule.

customRule_target :: Lens' CustomRule Text Source #

The target pattern for a URL rewrite or redirect rule.