Class LambdaDataSource
An AppSync datasource backed by a Lambda function.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LambdaDataSource : BackedDataSource, IGrantable
Syntax (vb)
Public Class LambdaDataSource Inherits BackedDataSource Implements IGrantable
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.Lambda;
using Amazon.CDK.Interfaces.AppSync;
Function function_;
IGraphQLApiRef graphQLApiRef;
Role role;
var lambdaDataSource = new LambdaDataSource(this, "MyLambdaDataSource", new LambdaDataSourceProps {
Api = graphQLApiRef,
LambdaFunction = function_,
// the properties below are optional
Description = "description",
Name = "name",
ServiceRole = role
});
Synopsis
Constructors
| LambdaDataSource(Construct, string, ILambdaDataSourceProps) | An AppSync datasource backed by a Lambda function. |
Properties
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Constructors
LambdaDataSource(Construct, string, ILambdaDataSourceProps)
An AppSync datasource backed by a Lambda function.
public LambdaDataSource(Construct scope, string id, ILambdaDataSourceProps props)
Parameters
- scope Construct
- id string
- props ILambdaDataSourceProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.Lambda;
using Amazon.CDK.Interfaces.AppSync;
Function function_;
IGraphQLApiRef graphQLApiRef;
Role role;
var lambdaDataSource = new LambdaDataSource(this, "MyLambdaDataSource", new LambdaDataSourceProps {
Api = graphQLApiRef,
LambdaFunction = function_,
// the properties below are optional
Description = "description",
Name = "name",
ServiceRole = role
});
Properties
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated