Class CfnGraphQLApi.EnhancedMetricsConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGraphQLApi.EnhancedMetricsConfigProperty>
- Enclosing interface:
CfnGraphQLApi.EnhancedMetricsConfigProperty
CfnGraphQLApi.EnhancedMetricsConfigProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.dataSourceLevelMetricsBehavior
(String dataSourceLevelMetricsBehavior) operationLevelMetricsConfig
(String operationLevelMetricsConfig) resolverLevelMetricsBehavior
(String resolverLevelMetricsBehavior)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dataSourceLevelMetricsBehavior
@Stability(Stable) public CfnGraphQLApi.EnhancedMetricsConfigProperty.Builder dataSourceLevelMetricsBehavior(String dataSourceLevelMetricsBehavior) - Parameters:
dataSourceLevelMetricsBehavior
- Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:. This parameter is required.- Requests : The number of invocations that occured during a request.
- Latency : The time to complete a data source invocation.
- Errors : The number of errors that occurred during a data source invocation.
These metrics can be emitted to CloudWatch per data source or for all data sources in the request. Metrics will be recorded by API ID and data source name.
dataSourceLevelMetricsBehavior
accepts one of these values at a time:FULL_REQUEST_DATA_SOURCE_METRICS
: Records and emits metric data for all data sources in the request.PER_DATA_SOURCE_METRICS
: Records and emits metric data for data sources that have theMetricsConfig
value set toENABLED
.
- Returns:
this
-
operationLevelMetricsConfig
@Stability(Stable) public CfnGraphQLApi.EnhancedMetricsConfigProperty.Builder operationLevelMetricsConfig(String operationLevelMetricsConfig) - Parameters:
operationLevelMetricsConfig
- Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:. This parameter is required.- Requests : The number of times a specified GraphQL operation was called.
- GraphQL errors : The number of GraphQL errors that occurred during a specified GraphQL operation.
Metrics will be recorded by API ID and operation name. You can set the value to
ENABLED
orDISABLED
.- Returns:
this
-
resolverLevelMetricsBehavior
@Stability(Stable) public CfnGraphQLApi.EnhancedMetricsConfigProperty.Builder resolverLevelMetricsBehavior(String resolverLevelMetricsBehavior) - Parameters:
resolverLevelMetricsBehavior
- Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:. This parameter is required.- GraphQL errors : The number of GraphQL errors that occurred.
- Requests : The number of invocations that occurred during a request.
- Latency : The time to complete a resolver invocation.
- Cache hits : The number of cache hits during a request.
- Cache misses : The number of cache misses during a request.
These metrics can be emitted to CloudWatch per resolver or for all resolvers in the request. Metrics will be recorded by API ID and resolver name.
resolverLevelMetricsBehavior
accepts one of these values at a time:FULL_REQUEST_RESOLVER_METRICS
: Records and emits metric data for all resolvers in the request.PER_RESOLVER_METRICS
: Records and emits metric data for resolvers that have theMetricsConfig
value set toENABLED
.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnGraphQLApi.EnhancedMetricsConfigProperty>
- Returns:
- a new instance of
CfnGraphQLApi.EnhancedMetricsConfigProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-