Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Updates a CloudFront function.
You can update a function’s code or the comment that describes the function. You cannot update a function’s name.
To update a function, you provide the function’s name and version
(ETag
value) along with the updated function code. To get the name and
version, you can use ListFunctions
and DescribeFunction
.
Synopsis
- data UpdateFunction = UpdateFunction' {}
- newUpdateFunction :: Text -> FunctionConfig -> ByteString -> Text -> UpdateFunction
- updateFunction_ifMatch :: Lens' UpdateFunction Text
- updateFunction_functionConfig :: Lens' UpdateFunction FunctionConfig
- updateFunction_functionCode :: Lens' UpdateFunction ByteString
- updateFunction_name :: Lens' UpdateFunction Text
- data UpdateFunctionResponse = UpdateFunctionResponse' {}
- newUpdateFunctionResponse :: Int -> UpdateFunctionResponse
- updateFunctionResponse_eTag :: Lens' UpdateFunctionResponse (Maybe Text)
- updateFunctionResponse_functionSummary :: Lens' UpdateFunctionResponse (Maybe FunctionSummary)
- updateFunctionResponse_httpStatus :: Lens' UpdateFunctionResponse Int
Creating a Request
data UpdateFunction Source #
See: newUpdateFunction
smart constructor.
UpdateFunction' | |
|
Instances
:: Text | |
-> FunctionConfig | |
-> ByteString | |
-> Text | |
-> UpdateFunction |
Create a value of UpdateFunction
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:ifMatch:UpdateFunction'
, updateFunction_ifMatch
- The current version (ETag
value) of the function that you are
updating, which you can get using DescribeFunction
.
$sel:functionConfig:UpdateFunction'
, updateFunction_functionConfig
- Configuration information about the function.
$sel:functionCode:UpdateFunction'
, updateFunction_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.
$sel:name:UpdateFunction'
, updateFunction_name
- The name of the function that you are updating.
Request Lenses
updateFunction_ifMatch :: Lens' UpdateFunction Text Source #
The current version (ETag
value) of the function that you are
updating, which you can get using DescribeFunction
.
updateFunction_functionConfig :: Lens' UpdateFunction FunctionConfig Source #
Configuration information about the function.
updateFunction_functionCode :: Lens' UpdateFunction 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.
updateFunction_name :: Lens' UpdateFunction Text Source #
The name of the function that you are updating.
Destructuring the Response
data UpdateFunctionResponse Source #
See: newUpdateFunctionResponse
smart constructor.
UpdateFunctionResponse' | |
|
Instances
newUpdateFunctionResponse Source #
Create a value of UpdateFunctionResponse
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:UpdateFunctionResponse'
, updateFunctionResponse_eTag
- The version identifier for the current version of the CloudFront
function.
$sel:functionSummary:UpdateFunctionResponse'
, updateFunctionResponse_functionSummary
- Contains configuration information and metadata about a CloudFront
function.
$sel:httpStatus:UpdateFunctionResponse'
, updateFunctionResponse_httpStatus
- The response's http status code.
Response Lenses
updateFunctionResponse_eTag :: Lens' UpdateFunctionResponse (Maybe Text) Source #
The version identifier for the current version of the CloudFront function.
updateFunctionResponse_functionSummary :: Lens' UpdateFunctionResponse (Maybe FunctionSummary) Source #
Contains configuration information and metadata about a CloudFront function.
updateFunctionResponse_httpStatus :: Lens' UpdateFunctionResponse Int Source #
The response's http status code.