模板名称
ACS-Redis-ScheduleToUpgradeInstanceBandwidth 定时升级Redis实例临时带宽
模板描述
定时升级Redis实例临时带宽
模板类型
自动化
所有者
Alibaba Cloud
输入参数
参数名称 | 描述 | 类型 | 是否必填 | 默认值 | 约束 |
Targets | 目标实例 | Json | 是 | ||
TimerTrigger | 定时类型 | Json | 是 | ||
RegionId | 地域ID | String | 否 | {{ ACS::RegionId }} | |
DurationHour | 带宽升级持续时间 | Number | 否 | 1 | |
NodeId | 数据分片ID | List | 否 | ALL | |
Bandwidth | 要增加的带宽 | Number | 否 | 20 | |
Bandwidths | 要增加的带宽数组 | List | 否 | [] | |
RateControl | 任务执行的并发比率 | Json | 否 | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | OOS扮演的RAM角色 | String | 否 | "" |
输出参数
无
执行此模板需要的权限策略
{
"Version": "1",
"Statement": [
{
"Action": [
"kvstore:DescribeInstances",
"kvstore:EnableAdditionalBandwidth"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
详情
ACS-Redis-ScheduleToUpgradeInstanceBandwidth详情
模板内容
FormatVersion: OOS-2019-06-01
Description:
en: Scheduled upgrade of the temporary bandwidth of a Redis instance
zh-cn: 定时升级Redis实例临时带宽
name-en: ACS-Redis-ScheduleToUpgradeInstanceBandwidth
name-zh-cn: 定时升级Redis实例临时带宽
categories:
- tair
Parameters:
RegionId:
Type: String
Label:
en: RegionId
zh-cn: 地域ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
Targets:
Type: Json
Label:
en: TargetInstance
zh-cn: 目标实例
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: ALIYUN::Redis::Instance
RegionId: RegionId
TimerTrigger:
Type: Json
Label:
en: TimerTrigger
zh-cn: 定时类型
AssociationProperty: ALIYUN::OOS::Component::TimerTrigger
AssociationPropertyMetadata:
MinuteInterval: 30
DurationHour:
Label:
en: DurationHour
zh-cn: 带宽升级持续时间
Description:
zh-cn: 单位:小时。持续时间最少1小时
en: Unit:Hour. The bandwidth upgrade should last at least 1 hours
Type: Number
MinValue: 1
Default: 1
NodeId:
Label:
en: NodeId
zh-cn: 数据分片ID
Description:
zh-cn: 数据分片ID,您可以调用[DescribeLogicInstanceTopology]获取,传入多个时使用英文逗号(,)分隔;您也可以传入 All(即表示所有数据分片)。注:当实例为[集群架构]或[读写分离架构]时,本参数才可用且必须传入。
en: 'Data shard ID, you can call [DescribeLogicInstanceTopology] to obtain, use English commas (,) to separate multiple shards; you can also pass in All (that is, all data shards). Note: This parameter is available and must be passed in when the instance is [Cluster Architecture] or [Read-Write Separation Architecture].'
Type: List
Default: ALL
Bandwidth:
Type: Number
Label:
en: Bandwidth
zh-cn: 要增加的带宽
Description:
en: Unit:MB/s. The maximum incoming bandwidth is 6 times the default bandwidth of this instance specification, but the upper limit is 192MB/s. For example, the default bandwidth of an instance is 10 MB/s, and the value range of this parameter is 0~60.
zh-cn: 单位:MB/s。最大可传入该实例规格默认带宽的 6 倍,但上限为 192MB/s。例如实例默认带宽为 10 MB/s,本参数的取值范围为 0~60。
MinValue: 1
MaxValue: 192
Default: 20
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${NodeId}
- ALL
Bandwidths:
Type: List
Label:
en: Bandwidths
zh-cn: 要增加的带宽数组
Description:
en: Unit:MB/s. The maximum incoming bandwidth is 6 times the default bandwidth of this instance specification, but the upper limit is 192MB/s. For example, the default bandwidth of an instance is 10 MB/s, and the value range of this parameter is 0~60.If the request parameter NodeId passes in multiple data shard IDs, the bandwidth value passed in this parameter must correspond to the order of the data shard IDs, and multiple bandwidth values must be separated by commas (,).
zh-cn: 单位:MB/s。最大可传入该实例规格默认带宽的 6 倍,但上限为 192MB/s。例如实例默认带宽为 10 MB/s,本参数的取值范围为 0~60。如果请求参数 NodeId 传入了多个数据分片ID,本参数传入的带宽值需和 NodeId 的顺序对应,多个带宽值之间使用英文逗号(,)分隔。
Default: []
AssociationProperty: List[Parameter]
AssociationPropertyMetadata:
Parameter:
Type: Number
Visible:
Condition:
Fn::Not:
Fn::Equals:
- ${NodeId}
- ALL
RateControl:
Label:
en: RateControl
zh-cn: 任务执行的并发比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: TimerTrigger
Action: ACS::TimerTrigger
Description:
en: Triggers a task as scheduled by specifying type and expression
zh-cn: 通过指定触发类型和表达式按计划触发任务
Properties:
Type:
Fn::Select:
- type
- '{{ TimerTrigger }}'
Expression:
Fn::Select:
- expression
- '{{ TimerTrigger }}'
StartDate:
Fn::Select:
- startDate
- '{{ TimerTrigger }}'
EndDate:
Fn::Select:
- endDate
- '{{ TimerTrigger }}'
TimeZone:
Fn::Select:
- timeZone
- '{{ TimerTrigger }}'
- Name: GetInstance
Description:
en: Get the redis instances
zh-cn: 获取Redis实例
Action: ACS::SelectTargets
Properties:
ResourceType: ALIYUN::Redis::Instance
RegionId: '{{ RegionId }}'
Filters:
- '{{ Targets }}'
Outputs:
InstanceIds:
Type: List
ValueSelector: Instances.Instance[].InstanceId
- Name: UpgradeRedisInstanceBandwidth
Action: ACS::Redis::UpgradeRedisInstanceBandwidth
Description:
en: Modify redis instance bandwidth
zh-cn: 调整Redis实例的带宽
Properties:
RegionId: '{{ RegionId }}'
InstanceId: '{{ ACS::TaskLoopItem }}'
Bandwidth: '{{ Bandwidth }}'
Bandwidths: '{{ Bandwidths }}'
DurationHour: '{{ DurationHour }}'
NodeId: '{{ NodeId }}'
Loop:
RateControl: '{{ RateControl }}'
Items: '{{ GetInstance.InstanceIds }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- TimerTrigger
Label:
default:
zh-cn: 定时设置
en: Timer Trigger Configure
- Parameters:
- RegionId
- Targets
- Bandwidth
- DurationHour
Label:
default:
zh-cn: 选择实例
en: Select Instances
- Parameters:
- RateControl
- OOSAssumeRole
Label:
default:
zh-cn: 高级选项
en: Control Options
该文章对您有帮助吗?