| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.CloudFront.GetFunction
Description
Gets the code of a CloudFront function. To get configuration information
and metadata about a function, use DescribeFunction.
To get a function's code, you must provide the function's name and
stage. To get these values, you can use ListFunctions.
Synopsis
- data GetFunction = GetFunction' {
- stage :: Maybe FunctionStage
- name :: Text
- newGetFunction :: Text -> GetFunction
- getFunction_stage :: Lens' GetFunction (Maybe FunctionStage)
- getFunction_name :: Lens' GetFunction Text
- data GetFunctionResponse = GetFunctionResponse' {
- contentType :: Maybe Text
- eTag :: Maybe Text
- functionCode :: Maybe (Sensitive ByteString)
- httpStatus :: Int
- newGetFunctionResponse :: Int -> GetFunctionResponse
- getFunctionResponse_contentType :: Lens' GetFunctionResponse (Maybe Text)
- getFunctionResponse_eTag :: Lens' GetFunctionResponse (Maybe Text)
- getFunctionResponse_functionCode :: Lens' GetFunctionResponse (Maybe ByteString)
- getFunctionResponse_httpStatus :: Lens' GetFunctionResponse Int
Creating a Request
data GetFunction Source #
See: newGetFunction smart constructor.
Constructors
| GetFunction' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> GetFunction |
Create a value of GetFunction 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:
GetFunction, getFunction_stage - The function's stage, either DEVELOPMENT or LIVE.
GetFunction, getFunction_name - The name of the function whose code you are getting.
Request Lenses
getFunction_stage :: Lens' GetFunction (Maybe FunctionStage) Source #
The function's stage, either DEVELOPMENT or LIVE.
getFunction_name :: Lens' GetFunction Text Source #
The name of the function whose code you are getting.
Destructuring the Response
data GetFunctionResponse Source #
See: newGetFunctionResponse smart constructor.
Constructors
| GetFunctionResponse' | |
Fields
| |
Instances
newGetFunctionResponse Source #
Arguments
| :: Int | |
| -> GetFunctionResponse |
Create a value of GetFunctionResponse 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:
GetFunctionResponse, getFunctionResponse_contentType - The content type (media type) of the response.
$sel:eTag:GetFunctionResponse', getFunctionResponse_eTag - The version identifier for the current version of the CloudFront
function.
$sel:functionCode:GetFunctionResponse', getFunctionResponse_functionCode - The function code of a CloudFront function.
$sel:httpStatus:GetFunctionResponse', getFunctionResponse_httpStatus - The response's http status code.
Response Lenses
getFunctionResponse_contentType :: Lens' GetFunctionResponse (Maybe Text) Source #
The content type (media type) of the response.
getFunctionResponse_eTag :: Lens' GetFunctionResponse (Maybe Text) Source #
The version identifier for the current version of the CloudFront function.
getFunctionResponse_functionCode :: Lens' GetFunctionResponse (Maybe ByteString) Source #
The function code of a CloudFront function.
getFunctionResponse_httpStatus :: Lens' GetFunctionResponse Int Source #
The response's http status code.