in lib/template/pattern/cloudwatch-pattern.ts [169:187]
public createEndpointInstanceMetrics(endpointName: string, variantName: string, metricNames: string[], options: cloudwatch.MetricOptions = {}): cloudwatch.Metric[] {
const metric: cloudwatch.Metric[] = metricNames.map(metricName => {
return new cloudwatch.Metric({
metricName,
namespace: '/aws/sagemaker/Endpoints',
dimensions: {
EndpointName: endpointName,
VariantName: variantName,
},
statistic: 'Average',
unit: cloudwatch.Unit.PERCENT,
period: this.props.period,
label: options.label != undefined ? options.label : metricName,
...options
});
})
return metric;
}