@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class EnhancedMetricsConfig extends Object implements Serializable, Cloneable, StructuredPojo
Enables and controls the enhanced metrics feature. Enhanced metrics emit granular data on API usage and performance such as AppSync request and error counts, latency, and cache hits/misses. All enhanced metric data is sent to your CloudWatch account, and you can configure the types of data that will be sent.
 Enhanced metrics can be configured at the resolver, data source, and operation levels.
 EnhancedMetricsConfig contains three required parameters, each controlling one of these categories:
 
 resolverLevelMetricsBehavior: Controls how resolver metrics will be emitted to CloudWatch. Resolver
 metrics include:
 
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 the
 metricsConfig value set to ENABLED.
 
 dataSourceLevelMetricsBehavior: Controls how data source metrics will be emitted to CloudWatch. Data
 source metrics include:
 
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 the
 metricsConfig value set to ENABLED.
 
 operationLevelMetricsConfig: Controls how operation metrics will be emitted to CloudWatch. Operation
 metrics include:
 
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 or
 DISABLED.
 
| Constructor and Description | 
|---|
EnhancedMetricsConfig()  | 
| Modifier and Type | Method and Description | 
|---|---|
EnhancedMetricsConfig | 
clone()  | 
boolean | 
equals(Object obj)  | 
String | 
getDataSourceLevelMetricsBehavior()
 Controls how data source metrics will be emitted to CloudWatch. 
 | 
String | 
getOperationLevelMetricsConfig()
 Controls how operation metrics will be emitted to CloudWatch. 
 | 
String | 
getResolverLevelMetricsBehavior()
 Controls how resolver metrics will be emitted to CloudWatch. 
 | 
int | 
hashCode()  | 
void | 
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given  
ProtocolMarshaller. | 
void | 
setDataSourceLevelMetricsBehavior(String dataSourceLevelMetricsBehavior)
 Controls how data source metrics will be emitted to CloudWatch. 
 | 
void | 
setOperationLevelMetricsConfig(String operationLevelMetricsConfig)
 Controls how operation metrics will be emitted to CloudWatch. 
 | 
void | 
setResolverLevelMetricsBehavior(String resolverLevelMetricsBehavior)
 Controls how resolver metrics will be emitted to CloudWatch. 
 | 
String | 
toString()
Returns a string representation of this object. 
 | 
EnhancedMetricsConfig | 
withDataSourceLevelMetricsBehavior(DataSourceLevelMetricsBehavior dataSourceLevelMetricsBehavior)
 Controls how data source metrics will be emitted to CloudWatch. 
 | 
EnhancedMetricsConfig | 
withDataSourceLevelMetricsBehavior(String dataSourceLevelMetricsBehavior)
 Controls how data source metrics will be emitted to CloudWatch. 
 | 
EnhancedMetricsConfig | 
withOperationLevelMetricsConfig(OperationLevelMetricsConfig operationLevelMetricsConfig)
 Controls how operation metrics will be emitted to CloudWatch. 
 | 
EnhancedMetricsConfig | 
withOperationLevelMetricsConfig(String operationLevelMetricsConfig)
 Controls how operation metrics will be emitted to CloudWatch. 
 | 
EnhancedMetricsConfig | 
withResolverLevelMetricsBehavior(ResolverLevelMetricsBehavior resolverLevelMetricsBehavior)
 Controls how resolver metrics will be emitted to CloudWatch. 
 | 
EnhancedMetricsConfig | 
withResolverLevelMetricsBehavior(String resolverLevelMetricsBehavior)
 Controls how resolver metrics will be emitted to CloudWatch. 
 | 
public void setResolverLevelMetricsBehavior(String resolverLevelMetricsBehavior)
Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
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 the
 metricsConfig value set to ENABLED.
 
resolverLevelMetricsBehavior - Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
        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 the
        metricsConfig value set to ENABLED.
        
ResolverLevelMetricsBehaviorpublic String getResolverLevelMetricsBehavior()
Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
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 the
 metricsConfig value set to ENABLED.
 
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 the
         metricsConfig value set to ENABLED.
         
ResolverLevelMetricsBehaviorpublic EnhancedMetricsConfig withResolverLevelMetricsBehavior(String resolverLevelMetricsBehavior)
Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
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 the
 metricsConfig value set to ENABLED.
 
resolverLevelMetricsBehavior - Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
        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 the
        metricsConfig value set to ENABLED.
        
ResolverLevelMetricsBehaviorpublic EnhancedMetricsConfig withResolverLevelMetricsBehavior(ResolverLevelMetricsBehavior resolverLevelMetricsBehavior)
Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
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 the
 metricsConfig value set to ENABLED.
 
resolverLevelMetricsBehavior - Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
        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 the
        metricsConfig value set to ENABLED.
        
ResolverLevelMetricsBehaviorpublic void setDataSourceLevelMetricsBehavior(String dataSourceLevelMetricsBehavior)
Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
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 the
 metricsConfig value set to ENABLED.
 
dataSourceLevelMetricsBehavior - Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
        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 the
        metricsConfig value set to ENABLED.
        
DataSourceLevelMetricsBehaviorpublic String getDataSourceLevelMetricsBehavior()
Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
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 the
 metricsConfig value set to ENABLED.
 
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 the
         metricsConfig value set to ENABLED.
         
DataSourceLevelMetricsBehaviorpublic EnhancedMetricsConfig withDataSourceLevelMetricsBehavior(String dataSourceLevelMetricsBehavior)
Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
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 the
 metricsConfig value set to ENABLED.
 
dataSourceLevelMetricsBehavior - Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
        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 the
        metricsConfig value set to ENABLED.
        
DataSourceLevelMetricsBehaviorpublic EnhancedMetricsConfig withDataSourceLevelMetricsBehavior(DataSourceLevelMetricsBehavior dataSourceLevelMetricsBehavior)
Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
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 the
 metricsConfig value set to ENABLED.
 
dataSourceLevelMetricsBehavior - Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
        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 the
        metricsConfig value set to ENABLED.
        
DataSourceLevelMetricsBehaviorpublic void setOperationLevelMetricsConfig(String operationLevelMetricsConfig)
Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
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 or
 DISABLED.
 
operationLevelMetricsConfig - Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
        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 or
        DISABLED.
OperationLevelMetricsConfigpublic String getOperationLevelMetricsConfig()
Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
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 or
 DISABLED.
 
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 or
         DISABLED.
OperationLevelMetricsConfigpublic EnhancedMetricsConfig withOperationLevelMetricsConfig(String operationLevelMetricsConfig)
Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
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 or
 DISABLED.
 
operationLevelMetricsConfig - Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
        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 or
        DISABLED.
OperationLevelMetricsConfigpublic EnhancedMetricsConfig withOperationLevelMetricsConfig(OperationLevelMetricsConfig operationLevelMetricsConfig)
Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
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 or
 DISABLED.
 
operationLevelMetricsConfig - Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
        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 or
        DISABLED.
OperationLevelMetricsConfigpublic String toString()
toString in class ObjectObject.toString()public EnhancedMetricsConfig clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.