Show / Hide Table of Contents

Interface IDataSourceOptions

Optional configuration for data sources.

Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IDataSourceOptions
Syntax (vb)
Public Interface IDataSourceOptions
Remarks

ExampleMetadata: infused

Examples
var schema = new SchemaFile(new SchemaProps { FilePath = "mySchemaFile" });
            var api = new GraphqlApi(this, "api", new GraphqlApiProps {
                Name = "myApi",
                Definition = Definition.FromSchema(schema),
                EnhancedMetricsConfig = new EnhancedMetricsConfig {
                    DataSourceLevelMetricsBehavior = DataSourceLevelMetricsBehavior.PER_DATA_SOURCE_METRICS,
                    OperationLevelMetricsConfig = OperationLevelMetricsConfig.ENABLED,
                    ResolverLevelMetricsBehavior = ResolverLevelMetricsBehavior.PER_RESOLVER_METRICS
                }
            });

            var noneDS = api.AddNoneDataSource("none", new DataSourceOptions {
                MetricsConfig = DataSourceMetricsConfig.ENABLED
            });

            noneDS.CreateResolver("noneResolver", new BaseResolverProps {
                TypeName = "Mutation",
                FieldName = "addDemoMetricsConfig",
                MetricsConfig = ResolverMetricsConfig.ENABLED
            });

Synopsis

Properties

Description

The description of the data source.

MetricsConfig

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.

Name

The name of the data source, overrides the id given by cdk.

Properties

Description

The description of the data source.

string? Description { get; }
Property Value

string

Remarks

Default: - No description

MetricsConfig

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.

DataSourceMetricsConfig? MetricsConfig { get; }
Property Value

DataSourceMetricsConfig?

Remarks

Default: - Enhance metrics are disabled

Name

The name of the data source, overrides the id given by cdk.

string? Name { get; }
Property Value

string

Remarks

Default: - generated by cdk given the id

Back to top Generated by DocFX