-
Notifications
You must be signed in to change notification settings - Fork 17
/
UtilizationScalingProps.go
65 lines (62 loc) · 2.82 KB
/
UtilizationScalingProps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package awsdynamodb
import (
"github.com/aws/aws-cdk-go/awscdk/v2"
)
// Properties for enabling DynamoDB utilization tracking.
//
// Example:
// globalTable := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
// PartitionKey: &Attribute{
// Name: jsii.String("id"),
// Type: dynamodb.AttributeType_STRING,
// },
// ReplicationRegions: []*string{
// jsii.String("us-east-1"),
// jsii.String("us-east-2"),
// jsii.String("us-west-2"),
// },
// BillingMode: dynamodb.BillingMode_PROVISIONED,
// })
//
// globalTable.AutoScaleWriteCapacity(&EnableScalingProps{
// MinCapacity: jsii.Number(1),
// MaxCapacity: jsii.Number(10),
// }).ScaleOnUtilization(&UtilizationScalingProps{
// TargetUtilizationPercent: jsii.Number(75),
// })
//
type UtilizationScalingProps struct {
// Indicates whether scale in by the target tracking policy is disabled.
//
// If the value is true, scale in is disabled and the target tracking policy
// won't remove capacity from the scalable resource. Otherwise, scale in is
// enabled and the target tracking policy can remove capacity from the
// scalable resource.
// Default: false.
//
DisableScaleIn *bool `field:"optional" json:"disableScaleIn" yaml:"disableScaleIn"`
// A name for the scaling policy.
// Default: - Automatically generated name.
//
PolicyName *string `field:"optional" json:"policyName" yaml:"policyName"`
// Period after a scale in activity completes before another scale in activity can start.
// Default: Duration.seconds(300) for the following scalable targets: ECS services,
// Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters,
// Amazon SageMaker endpoint variants, Custom resources. For all other scalable
// targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB
// global secondary indexes, Amazon Comprehend document classification endpoints,
// Lambda provisioned concurrency.
//
ScaleInCooldown awscdk.Duration `field:"optional" json:"scaleInCooldown" yaml:"scaleInCooldown"`
// Period after a scale out activity completes before another scale out activity can start.
// Default: Duration.seconds(300) for the following scalable targets: ECS services,
// Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters,
// Amazon SageMaker endpoint variants, Custom resources. For all other scalable
// targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB
// global secondary indexes, Amazon Comprehend document classification endpoints,
// Lambda provisioned concurrency.
//
ScaleOutCooldown awscdk.Duration `field:"optional" json:"scaleOutCooldown" yaml:"scaleOutCooldown"`
// Target utilization percentage for the attribute.
TargetUtilizationPercent *float64 `field:"required" json:"targetUtilizationPercent" yaml:"targetUtilizationPercent"`
}