| 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.AppSync.CreateFunction
Description
Creates a Function object.
A function is a reusable entity. You can use multiple functions to compose the resolver logic.
Synopsis
- data CreateFunction = CreateFunction' {}
- newCreateFunction :: Text -> Text -> Text -> CreateFunction
- createFunction_code :: Lens' CreateFunction (Maybe Text)
- createFunction_description :: Lens' CreateFunction (Maybe Text)
- createFunction_functionVersion :: Lens' CreateFunction (Maybe Text)
- createFunction_maxBatchSize :: Lens' CreateFunction (Maybe Natural)
- createFunction_requestMappingTemplate :: Lens' CreateFunction (Maybe Text)
- createFunction_responseMappingTemplate :: Lens' CreateFunction (Maybe Text)
- createFunction_runtime :: Lens' CreateFunction (Maybe AppSyncRuntime)
- createFunction_syncConfig :: Lens' CreateFunction (Maybe SyncConfig)
- createFunction_apiId :: Lens' CreateFunction Text
- createFunction_name :: Lens' CreateFunction Text
- createFunction_dataSourceName :: Lens' CreateFunction Text
- data CreateFunctionResponse = CreateFunctionResponse' {}
- newCreateFunctionResponse :: Int -> CreateFunctionResponse
- createFunctionResponse_functionConfiguration :: Lens' CreateFunctionResponse (Maybe FunctionConfiguration)
- createFunctionResponse_httpStatus :: Lens' CreateFunctionResponse Int
Creating a Request
data CreateFunction Source #
See: newCreateFunction smart constructor.
Constructors
| CreateFunction' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> Text | |
| -> Text | |
| -> CreateFunction |
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:
CreateFunction, createFunction_code - The function code that contains the request and response functions.
When code is used, the runtime is required. The runtime value must
be APPSYNC_JS.
CreateFunction, createFunction_description - The Function description.
CreateFunction, createFunction_functionVersion - The version of the request mapping template. Currently, the supported
value is 2018-05-29. Note that when using VTL and mapping templates, the
functionVersion is required.
CreateFunction, createFunction_maxBatchSize - The maximum batching size for a resolver.
CreateFunction, createFunction_requestMappingTemplate - The Function request mapping template. Functions support only the
2018-05-29 version of the request mapping template.
CreateFunction, createFunction_responseMappingTemplate - The Function response mapping template.
CreateFunction, createFunction_runtime - Undocumented member.
CreateFunction, createFunction_syncConfig - Undocumented member.
CreateFunction, createFunction_apiId - The GraphQL API ID.
CreateFunction, createFunction_name - The Function name. The function name does not have to be unique.
CreateFunction, createFunction_dataSourceName - The Function DataSource name.
Request Lenses
createFunction_code :: Lens' CreateFunction (Maybe Text) Source #
The function code that contains the request and response functions.
When code is used, the runtime is required. The runtime value must
be APPSYNC_JS.
createFunction_description :: Lens' CreateFunction (Maybe Text) Source #
The Function description.
createFunction_functionVersion :: Lens' CreateFunction (Maybe Text) Source #
The version of the request mapping template. Currently, the supported
value is 2018-05-29. Note that when using VTL and mapping templates, the
functionVersion is required.
createFunction_maxBatchSize :: Lens' CreateFunction (Maybe Natural) Source #
The maximum batching size for a resolver.
createFunction_requestMappingTemplate :: Lens' CreateFunction (Maybe Text) Source #
The Function request mapping template. Functions support only the
2018-05-29 version of the request mapping template.
createFunction_responseMappingTemplate :: Lens' CreateFunction (Maybe Text) Source #
The Function response mapping template.
createFunction_runtime :: Lens' CreateFunction (Maybe AppSyncRuntime) Source #
Undocumented member.
createFunction_syncConfig :: Lens' CreateFunction (Maybe SyncConfig) Source #
Undocumented member.
createFunction_apiId :: Lens' CreateFunction Text Source #
The GraphQL API ID.
createFunction_name :: Lens' CreateFunction Text Source #
The Function name. The function name does not have to be unique.
createFunction_dataSourceName :: Lens' CreateFunction Text Source #
The Function DataSource name.
Destructuring the Response
data CreateFunctionResponse Source #
See: newCreateFunctionResponse smart constructor.
Constructors
| CreateFunctionResponse' | |
Fields
| |
Instances
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:functionConfiguration:CreateFunctionResponse', createFunctionResponse_functionConfiguration - The Function object.
$sel:httpStatus:CreateFunctionResponse', createFunctionResponse_httpStatus - The response's http status code.
Response Lenses
createFunctionResponse_functionConfiguration :: Lens' CreateFunctionResponse (Maybe FunctionConfiguration) Source #
The Function object.
createFunctionResponse_httpStatus :: Lens' CreateFunctionResponse Int Source #
The response's http status code.