BackedDataSourceProps
- class aws_cdk.aws_appsync.BackedDataSourceProps(*, api, description=None, metrics_config=None, name=None, service_role=None)
Bases:
BaseDataSourcePropsproperties for an AppSync datasource backed by a resource.
- Parameters:
api (
IGraphQLApiRef) – The API to attach this data source to.description (
Optional[str]) – the description of the data source. Default: - Nonemetrics_config (
Optional[DataSourceMetricsConfig]) – Whether to enable enhanced metrics of the data source Value will be ignored, ifenhancedMetricsConfig.dataSourceLevelMetricsBehavioron AppSync GraphqlApi construct is set toFULL_REQUEST_DATA_SOURCE_METRICS. Default: - no metrics configurationname (
Optional[str]) – The name of the data source. Default: - id of data sourceservice_role (
Optional[IRole]) – The IAM service role to be assumed by AppSync to interact with the data source. Default: - Create a new role
- 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_iam as iam from aws_cdk.interfaces import aws_appsync as interfaces_appsync # graph_qLApi_ref: interfaces_appsync.IGraphQLApiRef # role: iam.Role backed_data_source_props = appsync.BackedDataSourceProps( api=graph_qLApi_ref, # the properties below are optional description="description", metrics_config=appsync.DataSourceMetricsConfig.ENABLED, name="name", service_role=role )
Attributes
- api
The API to attach this data source to.
- description
the description of the data source.
- Default:
None
- metrics_config
Whether to enable enhanced metrics of the data source Value will be ignored, if
enhancedMetricsConfig.dataSourceLevelMetricsBehavioron AppSync GraphqlApi construct is set toFULL_REQUEST_DATA_SOURCE_METRICS.- Default:
no metrics configuration
- 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