Skip to content
v2.273.0

EventBridgeDataSourceProps Struct ​

Properties for an AppSync EventBridge datasource.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
import { aws_events as events } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_appsync as interfaces_appsync } from 'aws-cdk-lib/interfaces';

declare const eventBus: events.EventBus;
declare const graphQLApiRef: interfaces_appsync.IGraphQLApiRef;
declare const role: iam.Role;
const eventBridgeDataSourceProps: appsync.EventBridgeDataSourceProps = {
  api: graphQLApiRef,
  eventBus: eventBus,

  // the properties below are optional
  description: 'description',
  metricsConfig: appsync.DataSourceMetricsConfig.ENABLED,
  name: 'name',
  serviceRole: role,
};

Properties ​

The API to attach this data source to.
descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= None#
the description of the data source.
eventBusIEventBusevent_busIEventBuseventBusIEventBusEventBusIEventBusEventBusIEventBusrequired#
The EventBridge EventBus.
metricsConfigDataSourceMetricsConfigmetrics_configDataSourceMetricsConfigmetricsConfigDataSourceMetricsConfigMetricsConfigDataSourceMetricsConfigMetricsConfigDataSourceMetricsConfig= no metrics configuration#
Whether to enable enhanced metrics of the data source Value will be ignored, if `enhancedMetricsConfig.dataSourceLevelMetricsBehavior` on AppSync GraphqlApi construct is set to `FULL_REQUEST_DATA_SOURCE_METRICS`.
namestringnamestrnameStringNamestringName*string= id of data source#
The name of the data source.
serviceRoleIRoleservice_roleIRoleserviceRoleIRoleServiceRoleIRoleServiceRoleIRole= Create a new role#
The IAM service role to be assumed by AppSync to interact with the data source.

Used as props by ​