From 97ce1a3dcbc18b86abb3159e8016a0f38a69e6cc Mon Sep 17 00:00:00 2001 From: Mikhail Shilkov Date: Sun, 26 Nov 2023 08:41:45 +0100 Subject: [PATCH] Add missing autoscaling metric names (#3040) I added all enum values from https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html Fix #2523 --- provider/cmd/pulumi-resource-aws/schema.json | 21 ++++++++++++ provider/resources.go | 7 ++++ sdk/dotnet/AutoScaling/Enums.cs | 7 ++++ sdk/go/aws/autoscaling/pulumiEnums.go | 33 +++++++++++-------- .../pulumi/aws/autoscaling/enums/Metric.java | 9 ++++- sdk/nodejs/types/enums/autoscaling/index.ts | 7 ++++ sdk/python/pulumi_aws/autoscaling/_enums.py | 7 ++++ 7 files changed, 77 insertions(+), 14 deletions(-) diff --git a/provider/cmd/pulumi-resource-aws/schema.json b/provider/cmd/pulumi-resource-aws/schema.json index 51e85436c24..17000c1a047 100644 --- a/provider/cmd/pulumi-resource-aws/schema.json +++ b/provider/cmd/pulumi-resource-aws/schema.json @@ -16120,6 +16120,27 @@ }, { "value": "GroupTotalCapacity" + }, + { + "value": "WarmPoolDesiredCapacity" + }, + { + "value": "WarmPoolWarmedCapacity" + }, + { + "value": "WarmPoolPendingCapacity" + }, + { + "value": "WarmPoolTerminatingCapacity" + }, + { + "value": "WarmPoolTotalCapacity" + }, + { + "value": "GroupAndWarmPoolDesiredCapacity" + }, + { + "value": "GroupAndWarmPoolTotalCapacity" } ] }, diff --git a/provider/resources.go b/provider/resources.go index 642367c1ff3..9ec795a085d 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -4137,6 +4137,13 @@ $ pulumi import aws:networkfirewall/resourcePolicy:ResourcePolicy example arn:aw {Value: "GroupTerminatingCapacity"}, {Value: "GroupTotalInstances"}, {Value: "GroupTotalCapacity"}, + {Value: "WarmPoolDesiredCapacity"}, + {Value: "WarmPoolWarmedCapacity"}, + {Value: "WarmPoolPendingCapacity"}, + {Value: "WarmPoolTerminatingCapacity"}, + {Value: "WarmPoolTotalCapacity"}, + {Value: "GroupAndWarmPoolDesiredCapacity"}, + {Value: "GroupAndWarmPoolTotalCapacity"}, }, }, "aws:autoscaling/NotificationType:NotificationType": { diff --git a/sdk/dotnet/AutoScaling/Enums.cs b/sdk/dotnet/AutoScaling/Enums.cs index 72eb3d94680..f7ac2d25dc5 100644 --- a/sdk/dotnet/AutoScaling/Enums.cs +++ b/sdk/dotnet/AutoScaling/Enums.cs @@ -33,6 +33,13 @@ private Metric(string value) public static Metric GroupTerminatingCapacity { get; } = new Metric("GroupTerminatingCapacity"); public static Metric GroupTotalInstances { get; } = new Metric("GroupTotalInstances"); public static Metric GroupTotalCapacity { get; } = new Metric("GroupTotalCapacity"); + public static Metric WarmPoolDesiredCapacity { get; } = new Metric("WarmPoolDesiredCapacity"); + public static Metric WarmPoolWarmedCapacity { get; } = new Metric("WarmPoolWarmedCapacity"); + public static Metric WarmPoolPendingCapacity { get; } = new Metric("WarmPoolPendingCapacity"); + public static Metric WarmPoolTerminatingCapacity { get; } = new Metric("WarmPoolTerminatingCapacity"); + public static Metric WarmPoolTotalCapacity { get; } = new Metric("WarmPoolTotalCapacity"); + public static Metric GroupAndWarmPoolDesiredCapacity { get; } = new Metric("GroupAndWarmPoolDesiredCapacity"); + public static Metric GroupAndWarmPoolTotalCapacity { get; } = new Metric("GroupAndWarmPoolTotalCapacity"); public static bool operator ==(Metric left, Metric right) => left.Equals(right); public static bool operator !=(Metric left, Metric right) => !left.Equals(right); diff --git a/sdk/go/aws/autoscaling/pulumiEnums.go b/sdk/go/aws/autoscaling/pulumiEnums.go index ae19db4af99..252fdf0878d 100644 --- a/sdk/go/aws/autoscaling/pulumiEnums.go +++ b/sdk/go/aws/autoscaling/pulumiEnums.go @@ -15,19 +15,26 @@ import ( type Metric string const ( - MetricGroupMinSize = Metric("GroupMinSize") - MetricGroupMaxSize = Metric("GroupMaxSize") - MetricGroupDesiredCapacity = Metric("GroupDesiredCapacity") - MetricGroupInServiceInstances = Metric("GroupInServiceInstances") - MetricGroupInServiceCapacity = Metric("GroupInServiceCapacity") - MetricGroupPendingInstances = Metric("GroupPendingInstances") - MetricGroupPendingCapacity = Metric("GroupPendingCapacity") - MetricGroupStandbyInstances = Metric("GroupStandbyInstances") - MetricGroupStandbyCapacity = Metric("GroupStandbyCapacity") - MetricGroupTerminatingInstances = Metric("GroupTerminatingInstances") - MetricGroupTerminatingCapacity = Metric("GroupTerminatingCapacity") - MetricGroupTotalInstances = Metric("GroupTotalInstances") - MetricGroupTotalCapacity = Metric("GroupTotalCapacity") + MetricGroupMinSize = Metric("GroupMinSize") + MetricGroupMaxSize = Metric("GroupMaxSize") + MetricGroupDesiredCapacity = Metric("GroupDesiredCapacity") + MetricGroupInServiceInstances = Metric("GroupInServiceInstances") + MetricGroupInServiceCapacity = Metric("GroupInServiceCapacity") + MetricGroupPendingInstances = Metric("GroupPendingInstances") + MetricGroupPendingCapacity = Metric("GroupPendingCapacity") + MetricGroupStandbyInstances = Metric("GroupStandbyInstances") + MetricGroupStandbyCapacity = Metric("GroupStandbyCapacity") + MetricGroupTerminatingInstances = Metric("GroupTerminatingInstances") + MetricGroupTerminatingCapacity = Metric("GroupTerminatingCapacity") + MetricGroupTotalInstances = Metric("GroupTotalInstances") + MetricGroupTotalCapacity = Metric("GroupTotalCapacity") + MetricWarmPoolDesiredCapacity = Metric("WarmPoolDesiredCapacity") + MetricWarmPoolWarmedCapacity = Metric("WarmPoolWarmedCapacity") + MetricWarmPoolPendingCapacity = Metric("WarmPoolPendingCapacity") + MetricWarmPoolTerminatingCapacity = Metric("WarmPoolTerminatingCapacity") + MetricWarmPoolTotalCapacity = Metric("WarmPoolTotalCapacity") + MetricGroupAndWarmPoolDesiredCapacity = Metric("GroupAndWarmPoolDesiredCapacity") + MetricGroupAndWarmPoolTotalCapacity = Metric("GroupAndWarmPoolTotalCapacity") ) func (Metric) ElementType() reflect.Type { diff --git a/sdk/java/src/main/java/com/pulumi/aws/autoscaling/enums/Metric.java b/sdk/java/src/main/java/com/pulumi/aws/autoscaling/enums/Metric.java index 1cfd468cc77..895cbb94984 100644 --- a/sdk/java/src/main/java/com/pulumi/aws/autoscaling/enums/Metric.java +++ b/sdk/java/src/main/java/com/pulumi/aws/autoscaling/enums/Metric.java @@ -26,7 +26,14 @@ public enum Metric { GroupTerminatingInstances("GroupTerminatingInstances"), GroupTerminatingCapacity("GroupTerminatingCapacity"), GroupTotalInstances("GroupTotalInstances"), - GroupTotalCapacity("GroupTotalCapacity"); + GroupTotalCapacity("GroupTotalCapacity"), + WarmPoolDesiredCapacity("WarmPoolDesiredCapacity"), + WarmPoolWarmedCapacity("WarmPoolWarmedCapacity"), + WarmPoolPendingCapacity("WarmPoolPendingCapacity"), + WarmPoolTerminatingCapacity("WarmPoolTerminatingCapacity"), + WarmPoolTotalCapacity("WarmPoolTotalCapacity"), + GroupAndWarmPoolDesiredCapacity("GroupAndWarmPoolDesiredCapacity"), + GroupAndWarmPoolTotalCapacity("GroupAndWarmPoolTotalCapacity"); private final String value; diff --git a/sdk/nodejs/types/enums/autoscaling/index.ts b/sdk/nodejs/types/enums/autoscaling/index.ts index d4e9d04bd96..f47af6ad631 100644 --- a/sdk/nodejs/types/enums/autoscaling/index.ts +++ b/sdk/nodejs/types/enums/autoscaling/index.ts @@ -16,6 +16,13 @@ export const Metric = { GroupTerminatingCapacity: "GroupTerminatingCapacity", GroupTotalInstances: "GroupTotalInstances", GroupTotalCapacity: "GroupTotalCapacity", + WarmPoolDesiredCapacity: "WarmPoolDesiredCapacity", + WarmPoolWarmedCapacity: "WarmPoolWarmedCapacity", + WarmPoolPendingCapacity: "WarmPoolPendingCapacity", + WarmPoolTerminatingCapacity: "WarmPoolTerminatingCapacity", + WarmPoolTotalCapacity: "WarmPoolTotalCapacity", + GroupAndWarmPoolDesiredCapacity: "GroupAndWarmPoolDesiredCapacity", + GroupAndWarmPoolTotalCapacity: "GroupAndWarmPoolTotalCapacity", } as const; /** diff --git a/sdk/python/pulumi_aws/autoscaling/_enums.py b/sdk/python/pulumi_aws/autoscaling/_enums.py index 2b552d81c5f..9a98c600827 100644 --- a/sdk/python/pulumi_aws/autoscaling/_enums.py +++ b/sdk/python/pulumi_aws/autoscaling/_enums.py @@ -28,6 +28,13 @@ class Metric(str, Enum): GROUP_TERMINATING_CAPACITY = "GroupTerminatingCapacity" GROUP_TOTAL_INSTANCES = "GroupTotalInstances" GROUP_TOTAL_CAPACITY = "GroupTotalCapacity" + WARM_POOL_DESIRED_CAPACITY = "WarmPoolDesiredCapacity" + WARM_POOL_WARMED_CAPACITY = "WarmPoolWarmedCapacity" + WARM_POOL_PENDING_CAPACITY = "WarmPoolPendingCapacity" + WARM_POOL_TERMINATING_CAPACITY = "WarmPoolTerminatingCapacity" + WARM_POOL_TOTAL_CAPACITY = "WarmPoolTotalCapacity" + GROUP_AND_WARM_POOL_DESIRED_CAPACITY = "GroupAndWarmPoolDesiredCapacity" + GROUP_AND_WARM_POOL_TOTAL_CAPACITY = "GroupAndWarmPoolTotalCapacity" class MetricsGranularity(str, Enum):