interface HttpDataSourceOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppSync.HttpDataSourceOptions |
Java | software.amazon.awscdk.services.appsync.HttpDataSourceOptions |
Python | aws_cdk.aws_appsync.HttpDataSourceOptions |
TypeScript (source) | @aws-cdk/aws-appsync » HttpDataSourceOptions |
Optional configuration for Http data sources.
Example
const api = new appsync.GraphqlApi(this, 'api', {
name: 'api',
schema: appsync.Schema.fromAsset(path.join(__dirname, 'schema.graphql')),
});
const httpDs = api.addHttpDataSource(
'ds',
'https://states.amazonaws.com',
{
name: 'httpDsWithStepF',
description: 'from appsync to StepFunctions Workflow',
authorizationConfig: {
signingRegion: 'us-east-1',
signingServiceName: 'states',
}
}
);
httpDs.createResolver({
typeName: 'Mutation',
fieldName: 'callStepFunction',
requestMappingTemplate: appsync.MappingTemplate.fromFile('request.vtl'),
responseMappingTemplate: appsync.MappingTemplate.fromFile('response.vtl'),
});
Properties
Name | Type | Description |
---|---|---|
authorization | Aws | The authorization config in case the HTTP endpoint requires authorization. |
description? | string | The description of the data source. |
name? | string | The name of the data source, overrides the id given by cdk. |
authorizationConfig?
Type:
Aws
(optional, default: none)
The authorization config in case the HTTP endpoint requires authorization.
description?
Type:
string
(optional, default: No description)
The description of the data source.
name?
Type:
string
(optional, default: generated by cdk given the id)
The name of the data source, overrides the id given by cdk.