public createApiGatewayMetric()

in lib/template/pattern/cloudwatch-pattern.ts [242:255]


    public createApiGatewayMetric(apiName: string, metricName: string, options: cloudwatch.MetricOptions = {}): cloudwatch.Metric {
        return new cloudwatch.Metric({
            metricName,
            namespace: 'AWS/ApiGateway',
            dimensions: {
                ApiName: apiName,
            },
            statistic: options.statistic,
            unit: options.unit,
            period: this.props.period,
            label: options.label != undefined ? options.label : metricName,
            ...options
        });
    }