libZSservicesZSamazonka-cloudfrontZSamazonka-cloudfront
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.CloudFront.CreateFunction

Description

Creates a CloudFront function.

To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function.

When you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function with TestFunction, and update it with UpdateFunction.

When you’re ready to use your function with a CloudFront distribution, use PublishFunction to copy the function from the DEVELOPMENT stage to LIVE. When it’s live, you can attach the function to a distribution’s cache behavior, using the function’s ARN.

Synopsis

Creating a Request

data CreateFunction Source #

See: newCreateFunction smart constructor.

Constructors

CreateFunction' 

Fields

Instances

Instances details
Eq CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Show CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Generic CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Associated Types

type Rep CreateFunction :: Type -> Type #

NFData CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Methods

rnf :: CreateFunction -> () #

Hashable CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

AWSRequest CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Associated Types

type AWSResponse CreateFunction #

ToHeaders CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

ToPath CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

ToQuery CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

ToElement CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

ToXML CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Methods

toXML :: CreateFunction -> XML #

type Rep CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

type Rep CreateFunction = D1 ('MetaData "CreateFunction" "Amazonka.CloudFront.CreateFunction" "libZSservicesZSamazonka-cloudfrontZSamazonka-cloudfront" 'False) (C1 ('MetaCons "CreateFunction'" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "functionConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FunctionConfig) :*: S1 ('MetaSel ('Just "functionCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive Base64)))))
type AWSResponse CreateFunction Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

newCreateFunction Source #

Create a value of CreateFunction 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:name:CreateFunction', createFunction_name - A name to identify the function.

$sel:functionConfig:CreateFunction', createFunction_functionConfig - Configuration information about the function, including an optional comment and the function’s runtime.

$sel:functionCode:CreateFunction', createFunction_functionCode - The function code. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide.-- -- Note: This Lens automatically encodes and decodes Base64 data. -- The underlying isomorphism will encode to Base64 representation during -- serialisation, and decode from Base64 representation during deserialisation. -- This Lens accepts and returns only raw unencoded data.

Request Lenses

createFunction_name :: Lens' CreateFunction Text Source #

A name to identify the function.

createFunction_functionConfig :: Lens' CreateFunction FunctionConfig Source #

Configuration information about the function, including an optional comment and the function’s runtime.

createFunction_functionCode :: Lens' CreateFunction ByteString Source #

The function code. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide.-- -- Note: This Lens automatically encodes and decodes Base64 data. -- The underlying isomorphism will encode to Base64 representation during -- serialisation, and decode from Base64 representation during deserialisation. -- This Lens accepts and returns only raw unencoded data.

Destructuring the Response

data CreateFunctionResponse Source #

See: newCreateFunctionResponse smart constructor.

Constructors

CreateFunctionResponse' 

Fields

Instances

Instances details
Eq CreateFunctionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Read CreateFunctionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Show CreateFunctionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Generic CreateFunctionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Associated Types

type Rep CreateFunctionResponse :: Type -> Type #

NFData CreateFunctionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

Methods

rnf :: CreateFunctionResponse -> () #

type Rep CreateFunctionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateFunction

type Rep CreateFunctionResponse = D1 ('MetaData "CreateFunctionResponse" "Amazonka.CloudFront.CreateFunction" "libZSservicesZSamazonka-cloudfrontZSamazonka-cloudfront" 'False) (C1 ('MetaCons "CreateFunctionResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "eTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "location") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "functionSummary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FunctionSummary)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateFunctionResponse Source #

Create a value of CreateFunctionResponse 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:eTag:CreateFunctionResponse', createFunctionResponse_eTag - The version identifier for the current version of the CloudFront function.

$sel:location:CreateFunctionResponse', createFunctionResponse_location - The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API.

$sel:functionSummary:CreateFunctionResponse', createFunctionResponse_functionSummary - Contains configuration information and metadata about a CloudFront function.

$sel:httpStatus:CreateFunctionResponse', createFunctionResponse_httpStatus - The response's http status code.

Response Lenses

createFunctionResponse_eTag :: Lens' CreateFunctionResponse (Maybe Text) Source #

The version identifier for the current version of the CloudFront function.

createFunctionResponse_location :: Lens' CreateFunctionResponse (Maybe Text) Source #

The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API.

createFunctionResponse_functionSummary :: Lens' CreateFunctionResponse (Maybe FunctionSummary) Source #

Contains configuration information and metadata about a CloudFront function.