alicloud.sae.ApplicationScalingRule
Explore with Pulumi AI
Provides a Serverless App Engine (SAE) Application Scaling Rule resource.
For information about Serverless App Engine (SAE) Application Scaling Rule and how to use it, see What is Application Scaling Rule.
NOTE: Available since v1.159.0.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var defaultRegions = AliCloud.GetRegions.Invoke(new()
{
Current = true,
});
var defaultRandomInteger = new Random.RandomInteger("defaultRandomInteger", new()
{
Max = 99999,
Min = 10000,
});
var defaultZones = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "VSwitch",
});
var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
{
VpcName = name,
CidrBlock = "10.4.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
{
VswitchName = name,
CidrBlock = "10.4.0.0/24",
VpcId = defaultNetwork.Id,
ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
{
VpcId = defaultNetwork.Id,
});
var defaultNamespace = new AliCloud.Sae.Namespace("defaultNamespace", new()
{
NamespaceId = Output.Tuple(defaultRegions, defaultRandomInteger.Result).Apply(values =>
{
var defaultRegions = values.Item1;
var result = values.Item2;
return $"{defaultRegions.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)}:example{result}";
}),
NamespaceName = name,
NamespaceDescription = name,
EnableMicroRegistration = false,
});
var defaultApplication = new AliCloud.Sae.Application("defaultApplication", new()
{
AppDescription = name,
AppName = name,
NamespaceId = defaultNamespace.Id,
ImageUrl = $"registry-vpc.{defaultRegions.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)}.aliyuncs.com/sae-demo-image/consumer:1.0",
PackageType = "Image",
SecurityGroupId = defaultSecurityGroup.Id,
VpcId = defaultNetwork.Id,
VswitchId = defaultSwitch.Id,
Timezone = "Asia/Beijing",
Replicas = 5,
Cpu = 500,
Memory = 2048,
});
var defaultApplicationScalingRule = new AliCloud.Sae.ApplicationScalingRule("defaultApplicationScalingRule", new()
{
AppId = defaultApplication.Id,
ScalingRuleName = name,
ScalingRuleEnable = true,
ScalingRuleType = "mix",
MinReadyInstances = 3,
MinReadyInstanceRatio = -1,
ScalingRuleTimer = new AliCloud.Sae.Inputs.ApplicationScalingRuleScalingRuleTimerArgs
{
Period = "* * *",
Schedules = new[]
{
new AliCloud.Sae.Inputs.ApplicationScalingRuleScalingRuleTimerScheduleArgs
{
AtTime = "08:00",
MaxReplicas = 10,
MinReplicas = 3,
},
new AliCloud.Sae.Inputs.ApplicationScalingRuleScalingRuleTimerScheduleArgs
{
AtTime = "20:00",
MaxReplicas = 50,
MinReplicas = 3,
},
},
},
ScalingRuleMetric = new AliCloud.Sae.Inputs.ApplicationScalingRuleScalingRuleMetricArgs
{
MaxReplicas = 50,
MinReplicas = 3,
Metrics = new[]
{
new AliCloud.Sae.Inputs.ApplicationScalingRuleScalingRuleMetricMetricArgs
{
MetricType = "CPU",
MetricTargetAverageUtilization = 20,
},
new AliCloud.Sae.Inputs.ApplicationScalingRuleScalingRuleMetricMetricArgs
{
MetricType = "MEMORY",
MetricTargetAverageUtilization = 30,
},
new AliCloud.Sae.Inputs.ApplicationScalingRuleScalingRuleMetricMetricArgs
{
MetricType = "tcpActiveConn",
MetricTargetAverageUtilization = 20,
},
},
ScaleUpRules = new AliCloud.Sae.Inputs.ApplicationScalingRuleScalingRuleMetricScaleUpRulesArgs
{
Step = 10,
Disabled = false,
StabilizationWindowSeconds = 0,
},
ScaleDownRules = new AliCloud.Sae.Inputs.ApplicationScalingRuleScalingRuleMetricScaleDownRulesArgs
{
Step = 10,
Disabled = false,
StabilizationWindowSeconds = 10,
},
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sae"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
defaultRegions, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
Current: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
defaultRandomInteger, err := random.NewRandomInteger(ctx, "defaultRandomInteger", &random.RandomIntegerArgs{
Max: pulumi.Int(99999),
Min: pulumi.Int(10000),
})
if err != nil {
return err
}
defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/24"),
VpcId: defaultNetwork.ID(),
ZoneId: *pulumi.String(defaultZones.Zones[0].Id),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultNamespace, err := sae.NewNamespace(ctx, "defaultNamespace", &sae.NamespaceArgs{
NamespaceId: defaultRandomInteger.Result.ApplyT(func(result int) (string, error) {
return fmt.Sprintf("%v:example%v", defaultRegions.Regions[0].Id, result), nil
}).(pulumi.StringOutput),
NamespaceName: pulumi.String(name),
NamespaceDescription: pulumi.String(name),
EnableMicroRegistration: pulumi.Bool(false),
})
if err != nil {
return err
}
defaultApplication, err := sae.NewApplication(ctx, "defaultApplication", &sae.ApplicationArgs{
AppDescription: pulumi.String(name),
AppName: pulumi.String(name),
NamespaceId: defaultNamespace.ID(),
ImageUrl: pulumi.String(fmt.Sprintf("registry-vpc.%v.aliyuncs.com/sae-demo-image/consumer:1.0", defaultRegions.Regions[0].Id)),
PackageType: pulumi.String("Image"),
SecurityGroupId: defaultSecurityGroup.ID(),
VpcId: defaultNetwork.ID(),
VswitchId: defaultSwitch.ID(),
Timezone: pulumi.String("Asia/Beijing"),
Replicas: pulumi.Int(5),
Cpu: pulumi.Int(500),
Memory: pulumi.Int(2048),
})
if err != nil {
return err
}
_, err = sae.NewApplicationScalingRule(ctx, "defaultApplicationScalingRule", &sae.ApplicationScalingRuleArgs{
AppId: defaultApplication.ID(),
ScalingRuleName: pulumi.String(name),
ScalingRuleEnable: pulumi.Bool(true),
ScalingRuleType: pulumi.String("mix"),
MinReadyInstances: pulumi.Int(3),
MinReadyInstanceRatio: pulumi.Int(-1),
ScalingRuleTimer: &sae.ApplicationScalingRuleScalingRuleTimerArgs{
Period: pulumi.String("* * *"),
Schedules: sae.ApplicationScalingRuleScalingRuleTimerScheduleArray{
&sae.ApplicationScalingRuleScalingRuleTimerScheduleArgs{
AtTime: pulumi.String("08:00"),
MaxReplicas: pulumi.Int(10),
MinReplicas: pulumi.Int(3),
},
&sae.ApplicationScalingRuleScalingRuleTimerScheduleArgs{
AtTime: pulumi.String("20:00"),
MaxReplicas: pulumi.Int(50),
MinReplicas: pulumi.Int(3),
},
},
},
ScalingRuleMetric: &sae.ApplicationScalingRuleScalingRuleMetricArgs{
MaxReplicas: pulumi.Int(50),
MinReplicas: pulumi.Int(3),
Metrics: sae.ApplicationScalingRuleScalingRuleMetricMetricArray{
&sae.ApplicationScalingRuleScalingRuleMetricMetricArgs{
MetricType: pulumi.String("CPU"),
MetricTargetAverageUtilization: pulumi.Int(20),
},
&sae.ApplicationScalingRuleScalingRuleMetricMetricArgs{
MetricType: pulumi.String("MEMORY"),
MetricTargetAverageUtilization: pulumi.Int(30),
},
&sae.ApplicationScalingRuleScalingRuleMetricMetricArgs{
MetricType: pulumi.String("tcpActiveConn"),
MetricTargetAverageUtilization: pulumi.Int(20),
},
},
ScaleUpRules: &sae.ApplicationScalingRuleScalingRuleMetricScaleUpRulesArgs{
Step: pulumi.Int(10),
Disabled: pulumi.Bool(false),
StabilizationWindowSeconds: pulumi.Int(0),
},
ScaleDownRules: &sae.ApplicationScalingRuleScalingRuleMetricScaleDownRulesArgs{
Step: pulumi.Int(10),
Disabled: pulumi.Bool(false),
StabilizationWindowSeconds: pulumi.Int(10),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetRegionsArgs;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.sae.Namespace;
import com.pulumi.alicloud.sae.NamespaceArgs;
import com.pulumi.alicloud.sae.Application;
import com.pulumi.alicloud.sae.ApplicationArgs;
import com.pulumi.alicloud.sae.ApplicationScalingRule;
import com.pulumi.alicloud.sae.ApplicationScalingRuleArgs;
import com.pulumi.alicloud.sae.inputs.ApplicationScalingRuleScalingRuleTimerArgs;
import com.pulumi.alicloud.sae.inputs.ApplicationScalingRuleScalingRuleMetricArgs;
import com.pulumi.alicloud.sae.inputs.ApplicationScalingRuleScalingRuleMetricScaleUpRulesArgs;
import com.pulumi.alicloud.sae.inputs.ApplicationScalingRuleScalingRuleMetricScaleDownRulesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
var defaultRandomInteger = new RandomInteger("defaultRandomInteger", RandomIntegerArgs.builder()
.max(99999)
.min(10000)
.build());
final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("10.4.0.0/24")
.vpcId(defaultNetwork.id())
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.vpcId(defaultNetwork.id())
.build());
var defaultNamespace = new Namespace("defaultNamespace", NamespaceArgs.builder()
.namespaceId(defaultRandomInteger.result().applyValue(result -> String.format("%s:example%s", defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id()),result)))
.namespaceName(name)
.namespaceDescription(name)
.enableMicroRegistration(false)
.build());
var defaultApplication = new Application("defaultApplication", ApplicationArgs.builder()
.appDescription(name)
.appName(name)
.namespaceId(defaultNamespace.id())
.imageUrl(String.format("registry-vpc.%s.aliyuncs.com/sae-demo-image/consumer:1.0", defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id())))
.packageType("Image")
.securityGroupId(defaultSecurityGroup.id())
.vpcId(defaultNetwork.id())
.vswitchId(defaultSwitch.id())
.timezone("Asia/Beijing")
.replicas("5")
.cpu("500")
.memory("2048")
.build());
var defaultApplicationScalingRule = new ApplicationScalingRule("defaultApplicationScalingRule", ApplicationScalingRuleArgs.builder()
.appId(defaultApplication.id())
.scalingRuleName(name)
.scalingRuleEnable(true)
.scalingRuleType("mix")
.minReadyInstances("3")
.minReadyInstanceRatio("-1")
.scalingRuleTimer(ApplicationScalingRuleScalingRuleTimerArgs.builder()
.period("* * *")
.schedules(
ApplicationScalingRuleScalingRuleTimerScheduleArgs.builder()
.atTime("08:00")
.maxReplicas(10)
.minReplicas(3)
.build(),
ApplicationScalingRuleScalingRuleTimerScheduleArgs.builder()
.atTime("20:00")
.maxReplicas(50)
.minReplicas(3)
.build())
.build())
.scalingRuleMetric(ApplicationScalingRuleScalingRuleMetricArgs.builder()
.maxReplicas(50)
.minReplicas(3)
.metrics(
ApplicationScalingRuleScalingRuleMetricMetricArgs.builder()
.metricType("CPU")
.metricTargetAverageUtilization(20)
.build(),
ApplicationScalingRuleScalingRuleMetricMetricArgs.builder()
.metricType("MEMORY")
.metricTargetAverageUtilization(30)
.build(),
ApplicationScalingRuleScalingRuleMetricMetricArgs.builder()
.metricType("tcpActiveConn")
.metricTargetAverageUtilization(20)
.build())
.scaleUpRules(ApplicationScalingRuleScalingRuleMetricScaleUpRulesArgs.builder()
.step(10)
.disabled(false)
.stabilizationWindowSeconds(0)
.build())
.scaleDownRules(ApplicationScalingRuleScalingRuleMetricScaleDownRulesArgs.builder()
.step(10)
.disabled(false)
.stabilizationWindowSeconds(10)
.build())
.build())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default_regions = alicloud.get_regions(current=True)
default_random_integer = random.RandomInteger("defaultRandomInteger",
max=99999,
min=10000)
default_zones = alicloud.get_zones(available_resource_creation="VSwitch")
default_network = alicloud.vpc.Network("defaultNetwork",
vpc_name=name,
cidr_block="10.4.0.0/16")
default_switch = alicloud.vpc.Switch("defaultSwitch",
vswitch_name=name,
cidr_block="10.4.0.0/24",
vpc_id=default_network.id,
zone_id=default_zones.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_network.id)
default_namespace = alicloud.sae.Namespace("defaultNamespace",
namespace_id=default_random_integer.result.apply(lambda result: f"{default_regions.regions[0].id}:example{result}"),
namespace_name=name,
namespace_description=name,
enable_micro_registration=False)
default_application = alicloud.sae.Application("defaultApplication",
app_description=name,
app_name=name,
namespace_id=default_namespace.id,
image_url=f"registry-vpc.{default_regions.regions[0].id}.aliyuncs.com/sae-demo-image/consumer:1.0",
package_type="Image",
security_group_id=default_security_group.id,
vpc_id=default_network.id,
vswitch_id=default_switch.id,
timezone="Asia/Beijing",
replicas=5,
cpu=500,
memory=2048)
default_application_scaling_rule = alicloud.sae.ApplicationScalingRule("defaultApplicationScalingRule",
app_id=default_application.id,
scaling_rule_name=name,
scaling_rule_enable=True,
scaling_rule_type="mix",
min_ready_instances=3,
min_ready_instance_ratio=-1,
scaling_rule_timer=alicloud.sae.ApplicationScalingRuleScalingRuleTimerArgs(
period="* * *",
schedules=[
alicloud.sae.ApplicationScalingRuleScalingRuleTimerScheduleArgs(
at_time="08:00",
max_replicas=10,
min_replicas=3,
),
alicloud.sae.ApplicationScalingRuleScalingRuleTimerScheduleArgs(
at_time="20:00",
max_replicas=50,
min_replicas=3,
),
],
),
scaling_rule_metric=alicloud.sae.ApplicationScalingRuleScalingRuleMetricArgs(
max_replicas=50,
min_replicas=3,
metrics=[
alicloud.sae.ApplicationScalingRuleScalingRuleMetricMetricArgs(
metric_type="CPU",
metric_target_average_utilization=20,
),
alicloud.sae.ApplicationScalingRuleScalingRuleMetricMetricArgs(
metric_type="MEMORY",
metric_target_average_utilization=30,
),
alicloud.sae.ApplicationScalingRuleScalingRuleMetricMetricArgs(
metric_type="tcpActiveConn",
metric_target_average_utilization=20,
),
],
scale_up_rules=alicloud.sae.ApplicationScalingRuleScalingRuleMetricScaleUpRulesArgs(
step=10,
disabled=False,
stabilization_window_seconds=0,
),
scale_down_rules=alicloud.sae.ApplicationScalingRuleScalingRuleMetricScaleDownRulesArgs(
step=10,
disabled=False,
stabilization_window_seconds=10,
),
))
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const defaultRegions = alicloud.getRegions({
current: true,
});
const defaultRandomInteger = new random.RandomInteger("defaultRandomInteger", {
max: 99999,
min: 10000,
});
const defaultZones = alicloud.getZones({
availableResourceCreation: "VSwitch",
});
const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
vpcName: name,
cidrBlock: "10.4.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
vswitchName: name,
cidrBlock: "10.4.0.0/24",
vpcId: defaultNetwork.id,
zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {vpcId: defaultNetwork.id});
const defaultNamespace = new alicloud.sae.Namespace("defaultNamespace", {
namespaceId: pulumi.all([defaultRegions, defaultRandomInteger.result]).apply(([defaultRegions, result]) => `${defaultRegions.regions?.[0]?.id}:example${result}`),
namespaceName: name,
namespaceDescription: name,
enableMicroRegistration: false,
});
const defaultApplication = new alicloud.sae.Application("defaultApplication", {
appDescription: name,
appName: name,
namespaceId: defaultNamespace.id,
imageUrl: defaultRegions.then(defaultRegions => `registry-vpc.${defaultRegions.regions?.[0]?.id}.aliyuncs.com/sae-demo-image/consumer:1.0`),
packageType: "Image",
securityGroupId: defaultSecurityGroup.id,
vpcId: defaultNetwork.id,
vswitchId: defaultSwitch.id,
timezone: "Asia/Beijing",
replicas: 5,
cpu: 500,
memory: 2048,
});
const defaultApplicationScalingRule = new alicloud.sae.ApplicationScalingRule("defaultApplicationScalingRule", {
appId: defaultApplication.id,
scalingRuleName: name,
scalingRuleEnable: true,
scalingRuleType: "mix",
minReadyInstances: 3,
minReadyInstanceRatio: -1,
scalingRuleTimer: {
period: "* * *",
schedules: [
{
atTime: "08:00",
maxReplicas: 10,
minReplicas: 3,
},
{
atTime: "20:00",
maxReplicas: 50,
minReplicas: 3,
},
],
},
scalingRuleMetric: {
maxReplicas: 50,
minReplicas: 3,
metrics: [
{
metricType: "CPU",
metricTargetAverageUtilization: 20,
},
{
metricType: "MEMORY",
metricTargetAverageUtilization: 30,
},
{
metricType: "tcpActiveConn",
metricTargetAverageUtilization: 20,
},
],
scaleUpRules: {
step: 10,
disabled: false,
stabilizationWindowSeconds: 0,
},
scaleDownRules: {
step: 10,
disabled: false,
stabilizationWindowSeconds: 10,
},
},
});
configuration:
name:
type: string
default: tf-example
resources:
defaultRandomInteger:
type: random:RandomInteger
properties:
max: 99999
min: 10000
defaultNetwork:
type: alicloud:vpc:Network
properties:
vpcName: ${name}
cidrBlock: 10.4.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
properties:
vswitchName: ${name}
cidrBlock: 10.4.0.0/24
vpcId: ${defaultNetwork.id}
zoneId: ${defaultZones.zones[0].id}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
properties:
vpcId: ${defaultNetwork.id}
defaultNamespace:
type: alicloud:sae:Namespace
properties:
namespaceId: ${defaultRegions.regions[0].id}:example${defaultRandomInteger.result}
namespaceName: ${name}
namespaceDescription: ${name}
enableMicroRegistration: false
defaultApplication:
type: alicloud:sae:Application
properties:
appDescription: ${name}
appName: ${name}
namespaceId: ${defaultNamespace.id}
imageUrl: registry-vpc.${defaultRegions.regions[0].id}.aliyuncs.com/sae-demo-image/consumer:1.0
packageType: Image
securityGroupId: ${defaultSecurityGroup.id}
vpcId: ${defaultNetwork.id}
vswitchId: ${defaultSwitch.id}
timezone: Asia/Beijing
replicas: '5'
cpu: '500'
memory: '2048'
defaultApplicationScalingRule:
type: alicloud:sae:ApplicationScalingRule
properties:
appId: ${defaultApplication.id}
scalingRuleName: ${name}
scalingRuleEnable: true
scalingRuleType: mix
minReadyInstances: '3'
minReadyInstanceRatio: '-1'
scalingRuleTimer:
period: '* * *'
schedules:
- atTime: 08:00
maxReplicas: 10
minReplicas: 3
- atTime: 20:00
maxReplicas: 50
minReplicas: 3
scalingRuleMetric:
maxReplicas: 50
minReplicas: 3
metrics:
- metricType: CPU
metricTargetAverageUtilization: 20
- metricType: MEMORY
metricTargetAverageUtilization: 30
- metricType: tcpActiveConn
metricTargetAverageUtilization: 20
scaleUpRules:
step: 10
disabled: false
stabilizationWindowSeconds: 0
scaleDownRules:
step: 10
disabled: false
stabilizationWindowSeconds: 10
variables:
defaultRegions:
fn::invoke:
Function: alicloud:getRegions
Arguments:
current: true
defaultZones:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableResourceCreation: VSwitch
Create ApplicationScalingRule Resource
new ApplicationScalingRule(name: string, args: ApplicationScalingRuleArgs, opts?: CustomResourceOptions);
@overload
def ApplicationScalingRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
min_ready_instance_ratio: Optional[int] = None,
min_ready_instances: Optional[int] = None,
scaling_rule_enable: Optional[bool] = None,
scaling_rule_metric: Optional[ApplicationScalingRuleScalingRuleMetricArgs] = None,
scaling_rule_name: Optional[str] = None,
scaling_rule_timer: Optional[ApplicationScalingRuleScalingRuleTimerArgs] = None,
scaling_rule_type: Optional[str] = None)
@overload
def ApplicationScalingRule(resource_name: str,
args: ApplicationScalingRuleArgs,
opts: Optional[ResourceOptions] = None)
func NewApplicationScalingRule(ctx *Context, name string, args ApplicationScalingRuleArgs, opts ...ResourceOption) (*ApplicationScalingRule, error)
public ApplicationScalingRule(string name, ApplicationScalingRuleArgs args, CustomResourceOptions? opts = null)
public ApplicationScalingRule(String name, ApplicationScalingRuleArgs args)
public ApplicationScalingRule(String name, ApplicationScalingRuleArgs args, CustomResourceOptions options)
type: alicloud:sae:ApplicationScalingRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApplicationScalingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApplicationScalingRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApplicationScalingRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApplicationScalingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApplicationScalingRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApplicationScalingRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ApplicationScalingRule resource accepts the following input properties:
- App
Id string Application ID.
- Scaling
Rule stringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- Scaling
Rule stringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.- Min
Ready intInstance Ratio The min ready instance ratio.
- Min
Ready intInstances The min ready instances.
- Scaling
Rule boolEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- Scaling
Rule Pulumi.Metric Ali Cloud. Sae. Inputs. Application Scaling Rule Scaling Rule Metric Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- Scaling
Rule Pulumi.Timer Ali Cloud. Sae. Inputs. Application Scaling Rule Scaling Rule Timer Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.
- App
Id string Application ID.
- Scaling
Rule stringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- Scaling
Rule stringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.- Min
Ready intInstance Ratio The min ready instance ratio.
- Min
Ready intInstances The min ready instances.
- Scaling
Rule boolEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- Scaling
Rule ApplicationMetric Scaling Rule Scaling Rule Metric Args Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- Scaling
Rule ApplicationTimer Scaling Rule Scaling Rule Timer Args Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.
- app
Id String Application ID.
- scaling
Rule StringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- scaling
Rule StringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.- min
Ready IntegerInstance Ratio The min ready instance ratio.
- min
Ready IntegerInstances The min ready instances.
- scaling
Rule BooleanEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- scaling
Rule ApplicationMetric Scaling Rule Scaling Rule Metric Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- scaling
Rule ApplicationTimer Scaling Rule Scaling Rule Timer Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.
- app
Id string Application ID.
- scaling
Rule stringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- scaling
Rule stringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.- min
Ready numberInstance Ratio The min ready instance ratio.
- min
Ready numberInstances The min ready instances.
- scaling
Rule booleanEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- scaling
Rule ApplicationMetric Scaling Rule Scaling Rule Metric Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- scaling
Rule ApplicationTimer Scaling Rule Scaling Rule Timer Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.
- app_
id str Application ID.
- scaling_
rule_ strname The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- scaling_
rule_ strtype Flexible strategy type. Valid values:
mix
,timing
andmetric
.- min_
ready_ intinstance_ ratio The min ready instance ratio.
- min_
ready_ intinstances The min ready instances.
- scaling_
rule_ boolenable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- scaling_
rule_ Applicationmetric Scaling Rule Scaling Rule Metric Args Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- scaling_
rule_ Applicationtimer Scaling Rule Scaling Rule Timer Args Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.
- app
Id String Application ID.
- scaling
Rule StringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- scaling
Rule StringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.- min
Ready NumberInstance Ratio The min ready instance ratio.
- min
Ready NumberInstances The min ready instances.
- scaling
Rule BooleanEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- scaling
Rule Property MapMetric Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- scaling
Rule Property MapTimer Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApplicationScalingRule resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ApplicationScalingRule Resource
Get an existing ApplicationScalingRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApplicationScalingRuleState, opts?: CustomResourceOptions): ApplicationScalingRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
min_ready_instance_ratio: Optional[int] = None,
min_ready_instances: Optional[int] = None,
scaling_rule_enable: Optional[bool] = None,
scaling_rule_metric: Optional[ApplicationScalingRuleScalingRuleMetricArgs] = None,
scaling_rule_name: Optional[str] = None,
scaling_rule_timer: Optional[ApplicationScalingRuleScalingRuleTimerArgs] = None,
scaling_rule_type: Optional[str] = None) -> ApplicationScalingRule
func GetApplicationScalingRule(ctx *Context, name string, id IDInput, state *ApplicationScalingRuleState, opts ...ResourceOption) (*ApplicationScalingRule, error)
public static ApplicationScalingRule Get(string name, Input<string> id, ApplicationScalingRuleState? state, CustomResourceOptions? opts = null)
public static ApplicationScalingRule get(String name, Output<String> id, ApplicationScalingRuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- App
Id string Application ID.
- Min
Ready intInstance Ratio The min ready instance ratio.
- Min
Ready intInstances The min ready instances.
- Scaling
Rule boolEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- Scaling
Rule Pulumi.Metric Ali Cloud. Sae. Inputs. Application Scaling Rule Scaling Rule Metric Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- Scaling
Rule stringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- Scaling
Rule Pulumi.Timer Ali Cloud. Sae. Inputs. Application Scaling Rule Scaling Rule Timer Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.- Scaling
Rule stringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.
- App
Id string Application ID.
- Min
Ready intInstance Ratio The min ready instance ratio.
- Min
Ready intInstances The min ready instances.
- Scaling
Rule boolEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- Scaling
Rule ApplicationMetric Scaling Rule Scaling Rule Metric Args Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- Scaling
Rule stringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- Scaling
Rule ApplicationTimer Scaling Rule Scaling Rule Timer Args Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.- Scaling
Rule stringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.
- app
Id String Application ID.
- min
Ready IntegerInstance Ratio The min ready instance ratio.
- min
Ready IntegerInstances The min ready instances.
- scaling
Rule BooleanEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- scaling
Rule ApplicationMetric Scaling Rule Scaling Rule Metric Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- scaling
Rule StringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- scaling
Rule ApplicationTimer Scaling Rule Scaling Rule Timer Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.- scaling
Rule StringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.
- app
Id string Application ID.
- min
Ready numberInstance Ratio The min ready instance ratio.
- min
Ready numberInstances The min ready instances.
- scaling
Rule booleanEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- scaling
Rule ApplicationMetric Scaling Rule Scaling Rule Metric Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- scaling
Rule stringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- scaling
Rule ApplicationTimer Scaling Rule Scaling Rule Timer Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.- scaling
Rule stringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.
- app_
id str Application ID.
- min_
ready_ intinstance_ ratio The min ready instance ratio.
- min_
ready_ intinstances The min ready instances.
- scaling_
rule_ boolenable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- scaling_
rule_ Applicationmetric Scaling Rule Scaling Rule Metric Args Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- scaling_
rule_ strname The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- scaling_
rule_ Applicationtimer Scaling Rule Scaling Rule Timer Args Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.- scaling_
rule_ strtype Flexible strategy type. Valid values:
mix
,timing
andmetric
.
- app
Id String Application ID.
- min
Ready NumberInstance Ratio The min ready instance ratio.
- min
Ready NumberInstances The min ready instances.
- scaling
Rule BooleanEnable True whether the auto scaling policy is enabled. The value description is as follows: true: enabled state. false: disabled status. Valid values:
false
,true
.- scaling
Rule Property MapMetric Monitor the configuration of the indicator elasticity strategy. See
scaling_rule_metric
below.- scaling
Rule StringName The name of a custom elastic scaling policy. In the application, the policy name cannot be repeated. It must start with a lowercase letter, and can only contain lowercase letters, numbers, and dashes (-), and no more than 32 characters. After the scaling policy is successfully created, the policy name cannot be modified.
- scaling
Rule Property MapTimer Configuration of Timing Resilient Policies. See
scaling_rule_timer
below.- scaling
Rule StringType Flexible strategy type. Valid values:
mix
,timing
andmetric
.
Supporting Types
ApplicationScalingRuleScalingRuleMetric, ApplicationScalingRuleScalingRuleMetricArgs
- Max
Replicas int Maximum number of instances applied.
- Metrics
List<Pulumi.
Ali Cloud. Sae. Inputs. Application Scaling Rule Scaling Rule Metric Metric> Indicator rule configuration. See
metrics
below.- Min
Replicas int Minimum number of instances applied.
- Scale
Down Pulumi.Rules Ali Cloud. Sae. Inputs. Application Scaling Rule Scaling Rule Metric Scale Down Rules Apply shrink rules. See
scale_down_rules
below.- Scale
Up Pulumi.Rules Ali Cloud. Sae. Inputs. Application Scaling Rule Scaling Rule Metric Scale Up Rules Apply expansion rules. See
scale_up_rules
below.
- Max
Replicas int Maximum number of instances applied.
- Metrics
[]Application
Scaling Rule Scaling Rule Metric Metric Indicator rule configuration. See
metrics
below.- Min
Replicas int Minimum number of instances applied.
- Scale
Down ApplicationRules Scaling Rule Scaling Rule Metric Scale Down Rules Apply shrink rules. See
scale_down_rules
below.- Scale
Up ApplicationRules Scaling Rule Scaling Rule Metric Scale Up Rules Apply expansion rules. See
scale_up_rules
below.
- max
Replicas Integer Maximum number of instances applied.
- metrics
List<Application
Scaling Rule Scaling Rule Metric Metric> Indicator rule configuration. See
metrics
below.- min
Replicas Integer Minimum number of instances applied.
- scale
Down ApplicationRules Scaling Rule Scaling Rule Metric Scale Down Rules Apply shrink rules. See
scale_down_rules
below.- scale
Up ApplicationRules Scaling Rule Scaling Rule Metric Scale Up Rules Apply expansion rules. See
scale_up_rules
below.
- max
Replicas number Maximum number of instances applied.
- metrics
Application
Scaling Rule Scaling Rule Metric Metric[] Indicator rule configuration. See
metrics
below.- min
Replicas number Minimum number of instances applied.
- scale
Down ApplicationRules Scaling Rule Scaling Rule Metric Scale Down Rules Apply shrink rules. See
scale_down_rules
below.- scale
Up ApplicationRules Scaling Rule Scaling Rule Metric Scale Up Rules Apply expansion rules. See
scale_up_rules
below.
- max_
replicas int Maximum number of instances applied.
- metrics
Sequence[Application
Scaling Rule Scaling Rule Metric Metric] Indicator rule configuration. See
metrics
below.- min_
replicas int Minimum number of instances applied.
- scale_
down_ Applicationrules Scaling Rule Scaling Rule Metric Scale Down Rules Apply shrink rules. See
scale_down_rules
below.- scale_
up_ Applicationrules Scaling Rule Scaling Rule Metric Scale Up Rules Apply expansion rules. See
scale_up_rules
below.
- max
Replicas Number Maximum number of instances applied.
- metrics List<Property Map>
Indicator rule configuration. See
metrics
below.- min
Replicas Number Minimum number of instances applied.
- scale
Down Property MapRules Apply shrink rules. See
scale_down_rules
below.- scale
Up Property MapRules Apply expansion rules. See
scale_up_rules
below.
ApplicationScalingRuleScalingRuleMetricMetric, ApplicationScalingRuleScalingRuleMetricMetricArgs
- Metric
Target intAverage Utilization According to different
metric_type
, set the target value of the corresponding monitoring index.- Metric
Type string Monitoring indicator trigger condition. Valid values:
CPU
,MEMORY
,tcpActiveConn
,QPS
,RT
,SLB_QPS
,SLB_RT
,INTRANET_SLB_QPS
andINTRANET_SLB_RT
. The values are described as follows:- CPU: CPU usage.
- MEMORY: MEMORY usage.
- tcpActiveConn: The average number of TCP active connections for a single instance in 30 seconds.
- QPS: The average QPS of a single instance within 1 minute of JAVA application.
- RT: The average response time of all service interfaces within 1 minute of JAVA application.
- SLB_QPS: The average public network SLB QPS of a single instance within 15 seconds.
- SLB_RT: The average response time of public network SLB within 15 seconds.
- INTRANET_SLB_QPS: The average private network SLB QPS of a single instance within 15 seconds.
- INTRANET_SLB_RT: The average response time of private network SLB within 15 seconds.
NOTE: From version 1.206.0,
metric_type
can be set toQPS
,RT
,INTRANET_SLB_QPS
,INTRANET_SLB_RT
.
- Slb
Id string SLB ID.
- Slb
Log stringStore The log store of the Log Service.
- Slb
Project string The project of the Log Service.
- Vport string
SLB listening port.
- Metric
Target intAverage Utilization According to different
metric_type
, set the target value of the corresponding monitoring index.- Metric
Type string Monitoring indicator trigger condition. Valid values:
CPU
,MEMORY
,tcpActiveConn
,QPS
,RT
,SLB_QPS
,SLB_RT
,INTRANET_SLB_QPS
andINTRANET_SLB_RT
. The values are described as follows:- CPU: CPU usage.
- MEMORY: MEMORY usage.
- tcpActiveConn: The average number of TCP active connections for a single instance in 30 seconds.
- QPS: The average QPS of a single instance within 1 minute of JAVA application.
- RT: The average response time of all service interfaces within 1 minute of JAVA application.
- SLB_QPS: The average public network SLB QPS of a single instance within 15 seconds.
- SLB_RT: The average response time of public network SLB within 15 seconds.
- INTRANET_SLB_QPS: The average private network SLB QPS of a single instance within 15 seconds.
- INTRANET_SLB_RT: The average response time of private network SLB within 15 seconds.
NOTE: From version 1.206.0,
metric_type
can be set toQPS
,RT
,INTRANET_SLB_QPS
,INTRANET_SLB_RT
.
- Slb
Id string SLB ID.
- Slb
Log stringStore The log store of the Log Service.
- Slb
Project string The project of the Log Service.
- Vport string
SLB listening port.
- metric
Target IntegerAverage Utilization According to different
metric_type
, set the target value of the corresponding monitoring index.- metric
Type String Monitoring indicator trigger condition. Valid values:
CPU
,MEMORY
,tcpActiveConn
,QPS
,RT
,SLB_QPS
,SLB_RT
,INTRANET_SLB_QPS
andINTRANET_SLB_RT
. The values are described as follows:- CPU: CPU usage.
- MEMORY: MEMORY usage.
- tcpActiveConn: The average number of TCP active connections for a single instance in 30 seconds.
- QPS: The average QPS of a single instance within 1 minute of JAVA application.
- RT: The average response time of all service interfaces within 1 minute of JAVA application.
- SLB_QPS: The average public network SLB QPS of a single instance within 15 seconds.
- SLB_RT: The average response time of public network SLB within 15 seconds.
- INTRANET_SLB_QPS: The average private network SLB QPS of a single instance within 15 seconds.
- INTRANET_SLB_RT: The average response time of private network SLB within 15 seconds.
NOTE: From version 1.206.0,
metric_type
can be set toQPS
,RT
,INTRANET_SLB_QPS
,INTRANET_SLB_RT
.
- slb
Id String SLB ID.
- slb
Log StringStore The log store of the Log Service.
- slb
Project String The project of the Log Service.
- vport String
SLB listening port.
- metric
Target numberAverage Utilization According to different
metric_type
, set the target value of the corresponding monitoring index.- metric
Type string Monitoring indicator trigger condition. Valid values:
CPU
,MEMORY
,tcpActiveConn
,QPS
,RT
,SLB_QPS
,SLB_RT
,INTRANET_SLB_QPS
andINTRANET_SLB_RT
. The values are described as follows:- CPU: CPU usage.
- MEMORY: MEMORY usage.
- tcpActiveConn: The average number of TCP active connections for a single instance in 30 seconds.
- QPS: The average QPS of a single instance within 1 minute of JAVA application.
- RT: The average response time of all service interfaces within 1 minute of JAVA application.
- SLB_QPS: The average public network SLB QPS of a single instance within 15 seconds.
- SLB_RT: The average response time of public network SLB within 15 seconds.
- INTRANET_SLB_QPS: The average private network SLB QPS of a single instance within 15 seconds.
- INTRANET_SLB_RT: The average response time of private network SLB within 15 seconds.
NOTE: From version 1.206.0,
metric_type
can be set toQPS
,RT
,INTRANET_SLB_QPS
,INTRANET_SLB_RT
.
- slb
Id string SLB ID.
- slb
Log stringStore The log store of the Log Service.
- slb
Project string The project of the Log Service.
- vport string
SLB listening port.
- metric_
target_ intaverage_ utilization According to different
metric_type
, set the target value of the corresponding monitoring index.- metric_
type str Monitoring indicator trigger condition. Valid values:
CPU
,MEMORY
,tcpActiveConn
,QPS
,RT
,SLB_QPS
,SLB_RT
,INTRANET_SLB_QPS
andINTRANET_SLB_RT
. The values are described as follows:- CPU: CPU usage.
- MEMORY: MEMORY usage.
- tcpActiveConn: The average number of TCP active connections for a single instance in 30 seconds.
- QPS: The average QPS of a single instance within 1 minute of JAVA application.
- RT: The average response time of all service interfaces within 1 minute of JAVA application.
- SLB_QPS: The average public network SLB QPS of a single instance within 15 seconds.
- SLB_RT: The average response time of public network SLB within 15 seconds.
- INTRANET_SLB_QPS: The average private network SLB QPS of a single instance within 15 seconds.
- INTRANET_SLB_RT: The average response time of private network SLB within 15 seconds.
NOTE: From version 1.206.0,
metric_type
can be set toQPS
,RT
,INTRANET_SLB_QPS
,INTRANET_SLB_RT
.
- slb_
id str SLB ID.
- slb_
log_ strstore The log store of the Log Service.
- slb_
project str The project of the Log Service.
- vport str
SLB listening port.
- metric
Target NumberAverage Utilization According to different
metric_type
, set the target value of the corresponding monitoring index.- metric
Type String Monitoring indicator trigger condition. Valid values:
CPU
,MEMORY
,tcpActiveConn
,QPS
,RT
,SLB_QPS
,SLB_RT
,INTRANET_SLB_QPS
andINTRANET_SLB_RT
. The values are described as follows:- CPU: CPU usage.
- MEMORY: MEMORY usage.
- tcpActiveConn: The average number of TCP active connections for a single instance in 30 seconds.
- QPS: The average QPS of a single instance within 1 minute of JAVA application.
- RT: The average response time of all service interfaces within 1 minute of JAVA application.
- SLB_QPS: The average public network SLB QPS of a single instance within 15 seconds.
- SLB_RT: The average response time of public network SLB within 15 seconds.
- INTRANET_SLB_QPS: The average private network SLB QPS of a single instance within 15 seconds.
- INTRANET_SLB_RT: The average response time of private network SLB within 15 seconds.
NOTE: From version 1.206.0,
metric_type
can be set toQPS
,RT
,INTRANET_SLB_QPS
,INTRANET_SLB_RT
.
- slb
Id String SLB ID.
- slb
Log StringStore The log store of the Log Service.
- slb
Project String The project of the Log Service.
- vport String
SLB listening port.
ApplicationScalingRuleScalingRuleMetricScaleDownRules, ApplicationScalingRuleScalingRuleMetricScaleDownRulesArgs
- Disabled bool
Whether shrinkage is prohibited.
- Stabilization
Window intSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- Step int
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- Disabled bool
Whether shrinkage is prohibited.
- Stabilization
Window intSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- Step int
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- disabled Boolean
Whether shrinkage is prohibited.
- stabilization
Window IntegerSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- step Integer
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- disabled boolean
Whether shrinkage is prohibited.
- stabilization
Window numberSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- step number
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- disabled bool
Whether shrinkage is prohibited.
- stabilization_
window_ intseconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- step int
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- disabled Boolean
Whether shrinkage is prohibited.
- stabilization
Window NumberSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- step Number
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
ApplicationScalingRuleScalingRuleMetricScaleUpRules, ApplicationScalingRuleScalingRuleMetricScaleUpRulesArgs
- Disabled bool
Whether shrinkage is prohibited.
- Stabilization
Window intSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- Step int
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- Disabled bool
Whether shrinkage is prohibited.
- Stabilization
Window intSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- Step int
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- disabled Boolean
Whether shrinkage is prohibited.
- stabilization
Window IntegerSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- step Integer
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- disabled boolean
Whether shrinkage is prohibited.
- stabilization
Window numberSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- step number
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- disabled bool
Whether shrinkage is prohibited.
- stabilization_
window_ intseconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- step int
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
- disabled Boolean
Whether shrinkage is prohibited.
- stabilization
Window NumberSeconds Cooling time for expansion or contraction. Valid values:
0
to3600
. Unit: seconds. The default is0
seconds.- step Number
Elastic expansion or contraction step size. the maximum number of instances to be scaled in per unit time.
ApplicationScalingRuleScalingRuleTimer, ApplicationScalingRuleScalingRuleTimerArgs
- Begin
Date string The Start date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- End
Date string The End Date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- Period string
The period in which a timed elastic scaling strategy is executed.
- Schedules
List<Pulumi.
Ali Cloud. Sae. Inputs. Application Scaling Rule Scaling Rule Timer Schedule> Resilient Scaling Strategy Trigger Timing. See
schedules
below.
- Begin
Date string The Start date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- End
Date string The End Date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- Period string
The period in which a timed elastic scaling strategy is executed.
- Schedules
[]Application
Scaling Rule Scaling Rule Timer Schedule Resilient Scaling Strategy Trigger Timing. See
schedules
below.
- begin
Date String The Start date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- end
Date String The End Date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- period String
The period in which a timed elastic scaling strategy is executed.
- schedules
List<Application
Scaling Rule Scaling Rule Timer Schedule> Resilient Scaling Strategy Trigger Timing. See
schedules
below.
- begin
Date string The Start date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- end
Date string The End Date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- period string
The period in which a timed elastic scaling strategy is executed.
- schedules
Application
Scaling Rule Scaling Rule Timer Schedule[] Resilient Scaling Strategy Trigger Timing. See
schedules
below.
- begin_
date str The Start date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- end_
date str The End Date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- period str
The period in which a timed elastic scaling strategy is executed.
- schedules
Sequence[Application
Scaling Rule Scaling Rule Timer Schedule] Resilient Scaling Strategy Trigger Timing. See
schedules
below.
- begin
Date String The Start date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- end
Date String The End Date. When the
begin_date
andend_date
values are empty. it indicates long-term execution and is the default value.- period String
The period in which a timed elastic scaling strategy is executed.
- schedules List<Property Map>
Resilient Scaling Strategy Trigger Timing. See
schedules
below.
ApplicationScalingRuleScalingRuleTimerSchedule, ApplicationScalingRuleScalingRuleTimerScheduleArgs
- At
Time string Trigger point in time. When supporting format: minutes, for example:
08:00
.- Max
Replicas int Maximum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- Min
Replicas int Minimum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- Target
Replicas int This parameter can specify the number of instances to be applied or the minimum number of surviving instances per deployment. value range [1,50]. > NOTE: The attribute is valid when the attribute
scaling_rule_type
istiming
.
- At
Time string Trigger point in time. When supporting format: minutes, for example:
08:00
.- Max
Replicas int Maximum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- Min
Replicas int Minimum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- Target
Replicas int This parameter can specify the number of instances to be applied or the minimum number of surviving instances per deployment. value range [1,50]. > NOTE: The attribute is valid when the attribute
scaling_rule_type
istiming
.
- at
Time String Trigger point in time. When supporting format: minutes, for example:
08:00
.- max
Replicas Integer Maximum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- min
Replicas Integer Minimum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- target
Replicas Integer This parameter can specify the number of instances to be applied or the minimum number of surviving instances per deployment. value range [1,50]. > NOTE: The attribute is valid when the attribute
scaling_rule_type
istiming
.
- at
Time string Trigger point in time. When supporting format: minutes, for example:
08:00
.- max
Replicas number Maximum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- min
Replicas number Minimum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- target
Replicas number This parameter can specify the number of instances to be applied or the minimum number of surviving instances per deployment. value range [1,50]. > NOTE: The attribute is valid when the attribute
scaling_rule_type
istiming
.
- at_
time str Trigger point in time. When supporting format: minutes, for example:
08:00
.- max_
replicas int Maximum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- min_
replicas int Minimum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- target_
replicas int This parameter can specify the number of instances to be applied or the minimum number of surviving instances per deployment. value range [1,50]. > NOTE: The attribute is valid when the attribute
scaling_rule_type
istiming
.
- at
Time String Trigger point in time. When supporting format: minutes, for example:
08:00
.- max
Replicas Number Maximum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- min
Replicas Number Minimum number of instances applied. > NOTE: The attribute is valid when the attribute
scaling_rule_type
ismix
.- target
Replicas Number This parameter can specify the number of instances to be applied or the minimum number of surviving instances per deployment. value range [1,50]. > NOTE: The attribute is valid when the attribute
scaling_rule_type
istiming
.
Import
Serverless App Engine (SAE) Application Scaling Rule can be imported using the id, e.g.
$ pulumi import alicloud:sae/applicationScalingRule:ApplicationScalingRule example <app_id>:<scaling_rule_name>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.