Provides a Alikafka Scheduled Scaling Rule resource.
Elastic timing strategy.
For information about Alikafka Scheduled Scaling Rule and how to use it, see What is Scheduled Scaling Rule.
NOTE: Available since v1.269.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.getZones({
availableResourceCreation: "VSwitch",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "10.4.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: name,
vpcId: defaultNetwork.id,
cidrBlock: "10.4.0.0/24",
zoneId: _default.then(_default => _default.zones?.[0]?.id),
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {vpcId: defaultNetwork.id});
const defaultInstance = new alicloud.alikafka.Instance("default", {
deployType: 4,
instanceType: "alikafka_serverless",
vswitchId: defaultSwitch.id,
specType: "normal",
serviceVersion: "3.3.1",
securityGroup: defaultSecurityGroup.id,
config: "{\"enable.acl\":\"true\"}",
serverlessConfig: {
reservedPublishCapacity: 60,
reservedSubscribeCapacity: 60,
},
});
const defaultScheduledScalingRule = new alicloud.alikafka.ScheduledScalingRule("default", {
scheduleType: "repeat",
reservedSubFlow: 200,
reservedPubFlow: 200,
timeZone: "GMT+8",
durationMinutes: 100,
firstScheduledTime: 1769578000000,
enable: false,
repeatType: "Weekly",
weeklyTypes: [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
],
ruleName: name,
instanceId: defaultInstance.id,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.get_zones(available_resource_creation="VSwitch")
default_network = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="10.4.0.0/16")
default_switch = alicloud.vpc.Switch("default",
vswitch_name=name,
vpc_id=default_network.id,
cidr_block="10.4.0.0/24",
zone_id=default.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("default", vpc_id=default_network.id)
default_instance = alicloud.alikafka.Instance("default",
deploy_type=4,
instance_type="alikafka_serverless",
vswitch_id=default_switch.id,
spec_type="normal",
service_version="3.3.1",
security_group=default_security_group.id,
config="{\"enable.acl\":\"true\"}",
serverless_config={
"reserved_publish_capacity": 60,
"reserved_subscribe_capacity": 60,
})
default_scheduled_scaling_rule = alicloud.alikafka.ScheduledScalingRule("default",
schedule_type="repeat",
reserved_sub_flow=200,
reserved_pub_flow=200,
time_zone="GMT+8",
duration_minutes=100,
first_scheduled_time=1769578000000,
enable=False,
repeat_type="Weekly",
weekly_types=[
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
],
rule_name=name,
instance_id=default_instance.id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alikafka"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"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 := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
VpcId: defaultNetwork.ID(),
CidrBlock: pulumi.String("10.4.0.0/24"),
ZoneId: pulumi.String(_default.Zones[0].Id),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultInstance, err := alikafka.NewInstance(ctx, "default", &alikafka.InstanceArgs{
DeployType: pulumi.Int(4),
InstanceType: pulumi.String("alikafka_serverless"),
VswitchId: defaultSwitch.ID(),
SpecType: pulumi.String("normal"),
ServiceVersion: pulumi.String("3.3.1"),
SecurityGroup: defaultSecurityGroup.ID(),
Config: pulumi.String("{\"enable.acl\":\"true\"}"),
ServerlessConfig: &alikafka.InstanceServerlessConfigArgs{
ReservedPublishCapacity: pulumi.Int(60),
ReservedSubscribeCapacity: pulumi.Int(60),
},
})
if err != nil {
return err
}
_, err = alikafka.NewScheduledScalingRule(ctx, "default", &alikafka.ScheduledScalingRuleArgs{
ScheduleType: pulumi.String("repeat"),
ReservedSubFlow: pulumi.Int(200),
ReservedPubFlow: pulumi.Int(200),
TimeZone: pulumi.String("GMT+8"),
DurationMinutes: pulumi.Int(100),
FirstScheduledTime: pulumi.Int(1769578000000),
Enable: pulumi.Bool(false),
RepeatType: pulumi.String("Weekly"),
WeeklyTypes: pulumi.StringArray{
pulumi.String("Monday"),
pulumi.String("Tuesday"),
pulumi.String("Wednesday"),
pulumi.String("Thursday"),
pulumi.String("Friday"),
},
RuleName: pulumi.String(name),
InstanceId: defaultInstance.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "VSwitch",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "10.4.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = name,
VpcId = defaultNetwork.Id,
CidrBlock = "10.4.0.0/24",
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
VpcId = defaultNetwork.Id,
});
var defaultInstance = new AliCloud.Alikafka.Instance("default", new()
{
DeployType = 4,
InstanceType = "alikafka_serverless",
VswitchId = defaultSwitch.Id,
SpecType = "normal",
ServiceVersion = "3.3.1",
SecurityGroup = defaultSecurityGroup.Id,
Config = "{\"enable.acl\":\"true\"}",
ServerlessConfig = new AliCloud.alikafka.Inputs.InstanceServerlessConfigArgs
{
ReservedPublishCapacity = 60,
ReservedSubscribeCapacity = 60,
},
});
var defaultScheduledScalingRule = new AliCloud.Alikafka.ScheduledScalingRule("default", new()
{
ScheduleType = "repeat",
ReservedSubFlow = 200,
ReservedPubFlow = 200,
TimeZone = "GMT+8",
DurationMinutes = 100,
FirstScheduledTime = 1769578000000,
Enable = false,
RepeatType = "Weekly",
WeeklyTypes = new[]
{
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
},
RuleName = name,
InstanceId = defaultInstance.Id,
});
});
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.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.alikafka.Instance;
import com.pulumi.alicloud.alikafka.InstanceArgs;
import com.pulumi.alicloud.alikafka.inputs.InstanceServerlessConfigArgs;
import com.pulumi.alicloud.alikafka.ScheduledScalingRule;
import com.pulumi.alicloud.alikafka.ScheduledScalingRuleArgs;
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("terraform-example");
final var default = 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)
.vpcId(defaultNetwork.id())
.cidrBlock("10.4.0.0/24")
.zoneId(default_.zones()[0].id())
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.vpcId(defaultNetwork.id())
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.deployType(4)
.instanceType("alikafka_serverless")
.vswitchId(defaultSwitch.id())
.specType("normal")
.serviceVersion("3.3.1")
.securityGroup(defaultSecurityGroup.id())
.config("{\"enable.acl\":\"true\"}")
.serverlessConfig(InstanceServerlessConfigArgs.builder()
.reservedPublishCapacity(60)
.reservedSubscribeCapacity(60)
.build())
.build());
var defaultScheduledScalingRule = new ScheduledScalingRule("defaultScheduledScalingRule", ScheduledScalingRuleArgs.builder()
.scheduleType("repeat")
.reservedSubFlow(200)
.reservedPubFlow(200)
.timeZone("GMT+8")
.durationMinutes(100)
.firstScheduledTime(1769578000000)
.enable(false)
.repeatType("Weekly")
.weeklyTypes(
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday")
.ruleName(name)
.instanceId(defaultInstance.id())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: ${name}
cidrBlock: 10.4.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vswitchName: ${name}
vpcId: ${defaultNetwork.id}
cidrBlock: 10.4.0.0/24
zoneId: ${default.zones[0].id}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: default
properties:
vpcId: ${defaultNetwork.id}
defaultInstance:
type: alicloud:alikafka:Instance
name: default
properties:
deployType: '4'
instanceType: alikafka_serverless
vswitchId: ${defaultSwitch.id}
specType: normal
serviceVersion: 3.3.1
securityGroup: ${defaultSecurityGroup.id}
config: '{"enable.acl":"true"}'
serverlessConfig:
reservedPublishCapacity: 60
reservedSubscribeCapacity: 60
defaultScheduledScalingRule:
type: alicloud:alikafka:ScheduledScalingRule
name: default
properties:
scheduleType: repeat
reservedSubFlow: '200'
reservedPubFlow: '200'
timeZone: GMT+8
durationMinutes: '100'
firstScheduledTime: '1769578000000'
enable: false
repeatType: Weekly
weeklyTypes:
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
ruleName: ${name}
instanceId: ${defaultInstance.id}
variables:
default:
fn::invoke:
function: alicloud:getZones
arguments:
availableResourceCreation: VSwitch
📚 Need more examples? VIEW MORE EXAMPLES
Create ScheduledScalingRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScheduledScalingRule(name: string, args: ScheduledScalingRuleArgs, opts?: CustomResourceOptions);@overload
def ScheduledScalingRule(resource_name: str,
args: ScheduledScalingRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ScheduledScalingRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
duration_minutes: Optional[int] = None,
first_scheduled_time: Optional[int] = None,
instance_id: Optional[str] = None,
reserved_pub_flow: Optional[int] = None,
reserved_sub_flow: Optional[int] = None,
rule_name: Optional[str] = None,
schedule_type: Optional[str] = None,
time_zone: Optional[str] = None,
enable: Optional[bool] = None,
repeat_type: Optional[str] = None,
weekly_types: Optional[Sequence[str]] = None)func NewScheduledScalingRule(ctx *Context, name string, args ScheduledScalingRuleArgs, opts ...ResourceOption) (*ScheduledScalingRule, error)public ScheduledScalingRule(string name, ScheduledScalingRuleArgs args, CustomResourceOptions? opts = null)
public ScheduledScalingRule(String name, ScheduledScalingRuleArgs args)
public ScheduledScalingRule(String name, ScheduledScalingRuleArgs args, CustomResourceOptions options)
type: alicloud:alikafka:ScheduledScalingRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ScheduledScalingRuleArgs
- 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 ScheduledScalingRuleArgs
- 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 ScheduledScalingRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduledScalingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScheduledScalingRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var scheduledScalingRuleResource = new AliCloud.Alikafka.ScheduledScalingRule("scheduledScalingRuleResource", new()
{
DurationMinutes = 0,
FirstScheduledTime = 0,
InstanceId = "string",
ReservedPubFlow = 0,
ReservedSubFlow = 0,
RuleName = "string",
ScheduleType = "string",
TimeZone = "string",
Enable = false,
RepeatType = "string",
WeeklyTypes = new[]
{
"string",
},
});
example, err := alikafka.NewScheduledScalingRule(ctx, "scheduledScalingRuleResource", &alikafka.ScheduledScalingRuleArgs{
DurationMinutes: pulumi.Int(0),
FirstScheduledTime: pulumi.Int(0),
InstanceId: pulumi.String("string"),
ReservedPubFlow: pulumi.Int(0),
ReservedSubFlow: pulumi.Int(0),
RuleName: pulumi.String("string"),
ScheduleType: pulumi.String("string"),
TimeZone: pulumi.String("string"),
Enable: pulumi.Bool(false),
RepeatType: pulumi.String("string"),
WeeklyTypes: pulumi.StringArray{
pulumi.String("string"),
},
})
var scheduledScalingRuleResource = new ScheduledScalingRule("scheduledScalingRuleResource", ScheduledScalingRuleArgs.builder()
.durationMinutes(0)
.firstScheduledTime(0)
.instanceId("string")
.reservedPubFlow(0)
.reservedSubFlow(0)
.ruleName("string")
.scheduleType("string")
.timeZone("string")
.enable(false)
.repeatType("string")
.weeklyTypes("string")
.build());
scheduled_scaling_rule_resource = alicloud.alikafka.ScheduledScalingRule("scheduledScalingRuleResource",
duration_minutes=0,
first_scheduled_time=0,
instance_id="string",
reserved_pub_flow=0,
reserved_sub_flow=0,
rule_name="string",
schedule_type="string",
time_zone="string",
enable=False,
repeat_type="string",
weekly_types=["string"])
const scheduledScalingRuleResource = new alicloud.alikafka.ScheduledScalingRule("scheduledScalingRuleResource", {
durationMinutes: 0,
firstScheduledTime: 0,
instanceId: "string",
reservedPubFlow: 0,
reservedSubFlow: 0,
ruleName: "string",
scheduleType: "string",
timeZone: "string",
enable: false,
repeatType: "string",
weeklyTypes: ["string"],
});
type: alicloud:alikafka:ScheduledScalingRule
properties:
durationMinutes: 0
enable: false
firstScheduledTime: 0
instanceId: string
repeatType: string
reservedPubFlow: 0
reservedSubFlow: 0
ruleName: string
scheduleType: string
timeZone: string
weeklyTypes:
- string
ScheduledScalingRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ScheduledScalingRule resource accepts the following input properties:
- Duration
Minutes int The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- First
Scheduled intTime - The time when the scheduled policy starts to execute.
- Instance
Id string - The instance ID.
- Reserved
Pub intFlow - The scheduled elastic reserved production specification (unit: MB/s).
- Reserved
Sub intFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- Rule
Name string - The name of the scheduled policy rule.
- Schedule
Type string - The schedule type. Valid values:
- Time
Zone string - The time zone (Coordinated Universal Time).
- Enable bool
- Enables or disables the scheduled task policy. Valid values:
- Repeat
Type string - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - Weekly
Types List<string> - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- Duration
Minutes int The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- First
Scheduled intTime - The time when the scheduled policy starts to execute.
- Instance
Id string - The instance ID.
- Reserved
Pub intFlow - The scheduled elastic reserved production specification (unit: MB/s).
- Reserved
Sub intFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- Rule
Name string - The name of the scheduled policy rule.
- Schedule
Type string - The schedule type. Valid values:
- Time
Zone string - The time zone (Coordinated Universal Time).
- Enable bool
- Enables or disables the scheduled task policy. Valid values:
- Repeat
Type string - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - Weekly
Types []string - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- duration
Minutes Integer The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- first
Scheduled IntegerTime - The time when the scheduled policy starts to execute.
- instance
Id String - The instance ID.
- reserved
Pub IntegerFlow - The scheduled elastic reserved production specification (unit: MB/s).
- reserved
Sub IntegerFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- rule
Name String - The name of the scheduled policy rule.
- schedule
Type String - The schedule type. Valid values:
- time
Zone String - The time zone (Coordinated Universal Time).
- enable Boolean
- Enables or disables the scheduled task policy. Valid values:
- repeat
Type String - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - weekly
Types List<String> - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- duration
Minutes number The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- first
Scheduled numberTime - The time when the scheduled policy starts to execute.
- instance
Id string - The instance ID.
- reserved
Pub numberFlow - The scheduled elastic reserved production specification (unit: MB/s).
- reserved
Sub numberFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- rule
Name string - The name of the scheduled policy rule.
- schedule
Type string - The schedule type. Valid values:
- time
Zone string - The time zone (Coordinated Universal Time).
- enable boolean
- Enables or disables the scheduled task policy. Valid values:
- repeat
Type string - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - weekly
Types string[] - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- duration_
minutes int The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- first_
scheduled_ inttime - The time when the scheduled policy starts to execute.
- instance_
id str - The instance ID.
- reserved_
pub_ intflow - The scheduled elastic reserved production specification (unit: MB/s).
- reserved_
sub_ intflow - The scheduled elastic reserved consumption specification (unit: MB/s).
- rule_
name str - The name of the scheduled policy rule.
- schedule_
type str - The schedule type. Valid values:
- time_
zone str - The time zone (Coordinated Universal Time).
- enable bool
- Enables or disables the scheduled task policy. Valid values:
- repeat_
type str - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - weekly_
types Sequence[str] - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- duration
Minutes Number The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- first
Scheduled NumberTime - The time when the scheduled policy starts to execute.
- instance
Id String - The instance ID.
- reserved
Pub NumberFlow - The scheduled elastic reserved production specification (unit: MB/s).
- reserved
Sub NumberFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- rule
Name String - The name of the scheduled policy rule.
- schedule
Type String - The schedule type. Valid values:
- time
Zone String - The time zone (Coordinated Universal Time).
- enable Boolean
- Enables or disables the scheduled task policy. Valid values:
- repeat
Type String - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - weekly
Types List<String> - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScheduledScalingRule 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 ScheduledScalingRule Resource
Get an existing ScheduledScalingRule 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?: ScheduledScalingRuleState, opts?: CustomResourceOptions): ScheduledScalingRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
duration_minutes: Optional[int] = None,
enable: Optional[bool] = None,
first_scheduled_time: Optional[int] = None,
instance_id: Optional[str] = None,
repeat_type: Optional[str] = None,
reserved_pub_flow: Optional[int] = None,
reserved_sub_flow: Optional[int] = None,
rule_name: Optional[str] = None,
schedule_type: Optional[str] = None,
time_zone: Optional[str] = None,
weekly_types: Optional[Sequence[str]] = None) -> ScheduledScalingRulefunc GetScheduledScalingRule(ctx *Context, name string, id IDInput, state *ScheduledScalingRuleState, opts ...ResourceOption) (*ScheduledScalingRule, error)public static ScheduledScalingRule Get(string name, Input<string> id, ScheduledScalingRuleState? state, CustomResourceOptions? opts = null)public static ScheduledScalingRule get(String name, Output<String> id, ScheduledScalingRuleState state, CustomResourceOptions options)resources: _: type: alicloud:alikafka:ScheduledScalingRule get: id: ${id}- 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.
- Duration
Minutes int The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- Enable bool
- Enables or disables the scheduled task policy. Valid values:
- First
Scheduled intTime - The time when the scheduled policy starts to execute.
- Instance
Id string - The instance ID.
- Repeat
Type string - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - Reserved
Pub intFlow - The scheduled elastic reserved production specification (unit: MB/s).
- Reserved
Sub intFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- Rule
Name string - The name of the scheduled policy rule.
- Schedule
Type string - The schedule type. Valid values:
- Time
Zone string - The time zone (Coordinated Universal Time).
- Weekly
Types List<string> - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- Duration
Minutes int The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- Enable bool
- Enables or disables the scheduled task policy. Valid values:
- First
Scheduled intTime - The time when the scheduled policy starts to execute.
- Instance
Id string - The instance ID.
- Repeat
Type string - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - Reserved
Pub intFlow - The scheduled elastic reserved production specification (unit: MB/s).
- Reserved
Sub intFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- Rule
Name string - The name of the scheduled policy rule.
- Schedule
Type string - The schedule type. Valid values:
- Time
Zone string - The time zone (Coordinated Universal Time).
- Weekly
Types []string - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- duration
Minutes Integer The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- enable Boolean
- Enables or disables the scheduled task policy. Valid values:
- first
Scheduled IntegerTime - The time when the scheduled policy starts to execute.
- instance
Id String - The instance ID.
- repeat
Type String - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - reserved
Pub IntegerFlow - The scheduled elastic reserved production specification (unit: MB/s).
- reserved
Sub IntegerFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- rule
Name String - The name of the scheduled policy rule.
- schedule
Type String - The schedule type. Valid values:
- time
Zone String - The time zone (Coordinated Universal Time).
- weekly
Types List<String> - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- duration
Minutes number The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- enable boolean
- Enables or disables the scheduled task policy. Valid values:
- first
Scheduled numberTime - The time when the scheduled policy starts to execute.
- instance
Id string - The instance ID.
- repeat
Type string - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - reserved
Pub numberFlow - The scheduled elastic reserved production specification (unit: MB/s).
- reserved
Sub numberFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- rule
Name string - The name of the scheduled policy rule.
- schedule
Type string - The schedule type. Valid values:
- time
Zone string - The time zone (Coordinated Universal Time).
- weekly
Types string[] - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- duration_
minutes int The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- enable bool
- Enables or disables the scheduled task policy. Valid values:
- first_
scheduled_ inttime - The time when the scheduled policy starts to execute.
- instance_
id str - The instance ID.
- repeat_
type str - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - reserved_
pub_ intflow - The scheduled elastic reserved production specification (unit: MB/s).
- reserved_
sub_ intflow - The scheduled elastic reserved consumption specification (unit: MB/s).
- rule_
name str - The name of the scheduled policy rule.
- schedule_
type str - The schedule type. Valid values:
- time_
zone str - The time zone (Coordinated Universal Time).
- weekly_
types Sequence[str] - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
- duration
Minutes Number The duration (unit: minutes) of a scheduled elastic task.
NOTE: The parameter value must be at least 15 minutes.
- enable Boolean
- Enables or disables the scheduled task policy. Valid values:
- first
Scheduled NumberTime - The time when the scheduled policy starts to execute.
- instance
Id String - The instance ID.
- repeat
Type String - When
schedule_typeisrepeat, the parameter is required. Valid values: -Daily: Daily scheduled task. -Weekly: Weekly scheduled task. - reserved
Pub NumberFlow - The scheduled elastic reserved production specification (unit: MB/s).
- reserved
Sub NumberFlow - The scheduled elastic reserved consumption specification (unit: MB/s).
- rule
Name String - The name of the scheduled policy rule.
- schedule
Type String - The schedule type. Valid values:
- time
Zone String - The time zone (Coordinated Universal Time).
- weekly
Types List<String> - The weekly types. Supports execution on multiple days. When
repeat_typeis set toWeekly, you need to input this parameter. Valid values:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday.
Import
Alikafka Scheduled Scaling Rule can be imported using the id, e.g.
$ pulumi import alicloud:alikafka/scheduledScalingRule:ScheduledScalingRule example <instance_id>:<rule_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
