EventBridgeDataSourceProps

class aws_cdk.aws_appsync.EventBridgeDataSourceProps(*, api, description=None, name=None, service_role=None, event_bus)

Bases: BackedDataSourceProps

Properties for an AppSync EventBridge datasource.

Parameters:
  • api (IGraphqlApi) – The API to attach this data source to.

  • description (Optional[str]) – the description of the data source. Default: - None

  • name (Optional[str]) – The name of the data source. Default: - id of data source

  • service_role (Optional[IRole]) – The IAM service role to be assumed by AppSync to interact with the data source. Default: - Create a new role

  • event_bus (IEventBus) – The EventBridge EventBus.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync
from aws_cdk import aws_events as events
from aws_cdk import aws_iam as iam

# event_bus: events.EventBus
# graphql_api: appsync.GraphqlApi
# role: iam.Role

event_bridge_data_source_props = appsync.EventBridgeDataSourceProps(
    api=graphql_api,
    event_bus=event_bus,

    # the properties below are optional
    description="description",
    name="name",
    service_role=role
)

Attributes

api

The API to attach this data source to.

description

the description of the data source.

Default:
  • None

event_bus

The EventBridge EventBus.

name

The name of the data source.

Default:
  • id of data source

service_role

The IAM service role to be assumed by AppSync to interact with the data source.

Default:
  • Create a new role