class GroupMetrics
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AutoScaling.GroupMetrics |
Java | software.amazon.awscdk.services.autoscaling.GroupMetrics |
Python | aws_cdk.aws_autoscaling.GroupMetrics |
TypeScript (source) | @aws-cdk/aws-autoscaling » GroupMetrics |
A set of group metrics.
Example
declare const vpc: ec2.Vpc;
declare const instanceType: ec2.InstanceType;
declare const machineImage: ec2.IMachineImage;
// Enable monitoring of all group metrics
new autoscaling.AutoScalingGroup(this, 'ASG', {
vpc,
instanceType,
machineImage,
// ...
groupMetrics: [autoscaling.GroupMetrics.all()],
});
// Enable monitoring for a subset of group metrics
new autoscaling.AutoScalingGroup(this, 'ASG', {
vpc,
instanceType,
machineImage,
// ...
groupMetrics: [new autoscaling.GroupMetrics(autoscaling.GroupMetric.MIN_SIZE, autoscaling.GroupMetric.MAX_SIZE)],
});
Initializer
new GroupMetrics(...metrics: GroupMetric[])
Parameters
- metrics
Group
Metric
Methods
Name | Description |
---|---|
static all() | Report all group metrics. |
static all()
public static all(): GroupMetrics
Returns
Report all group metrics.