Template name
ACS-Redis-ScheduleToUpgradeInstanceBandwidth - Schedules a temporary bandwidth upgrade for a Redis instance.
Template description
Temporarily upgrades the bandwidth of Tair (Redis OSS-compatible) instances as scheduled.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
Parameter | Description | Data type | Required | Default value | Limit |
Targets | The destination instances. | Json | Yes | ||
TimerTrigger | The type of the timer trigger. | Json | Yes | ||
RegionId | The region ID. | String | No | {{ ACS::RegionId }} | |
DurationHour | Concurrent task execution rate | Number | No | 1 | |
OOSAssumeRole | OOS RAM role | String | No | "" | |
Bandwidth | The bandwidth to add. | Number | No | 20 | |
Bandwidths | The array of bandwidths to add. | List | No | [] | |
RateControl | The concurrency rate for task execution. | Json | No | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | The RAM role that Operation Orchestration Service (OOS) assumes. | String | No | "" |
Output parameters
N/A.
Permission policy that is required to execute the template
{
"Version": "1",
"Statement": [
{
"Action": [
"kvstore:DescribeInstances",
"kvstore:EnableAdditionalBandwidth"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Details
ACS-Redis-ScheduleToUpgradeInstanceBandwidth
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Schedules temporary bandwidth upgrades for a Redis instance.
name-en: ACS-Redis-ScheduleToUpgradeInstanceBandwidth
categories:
- tair
Parameters:
RegionId:
Type: String
Label:
en: Region ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
Targets:
Type: Json
Label:
en: Target instance
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: ALIYUN::Redis::Instance
RegionId: RegionId
TimerTrigger:
Type: Json
Label:
en: Timer trigger
AssociationProperty: ALIYUN::OOS::Component::TimerTrigger
AssociationPropertyMetadata:
MinuteInterval: 30
DurationHour:
Label:
en: Duration in hours
Description:
en: 'Unit: hours. The minimum duration is 1 hour.'
Type: Number
MinValue: 1
Default: 1
NodeId:
Label:
en: Node ID
Description:
en: 'The ID of the data shard. Call the DescribeLogicInstanceTopology operation to obtain the ID. To specify multiple shard IDs, separate them with commas (,). You can also set this parameter to All, which indicates all data shards. Note: This parameter is available and required only when the instance uses a cluster or read/write splitting architecture.'
Type: List
Default: ALL
Bandwidth:
Type: Number
Label:
en: Bandwidth
Description:
en: 'Unit: MB/s. The maximum bandwidth that you can add is six times the default bandwidth of the instance type, but cannot exceed 192 MB/s. For example, if the default bandwidth of an instance is 10 MB/s, the value range for this parameter is 0 to 60.'
MinValue: 1
MaxValue: 192
Default: 20
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${NodeId}
- ALL
Bandwidths:
Type: List
Label:
en: Bandwidths
Description:
en: 'Unit: MB/s. The maximum bandwidth that you can add is six times the default bandwidth of the instance type, but cannot exceed 192 MB/s. For example, if the default bandwidth of an instance is 10 MB/s, the value range for this parameter is 0 to 60. If you specify multiple data shard IDs for the NodeId parameter, the bandwidth values that you specify for this parameter must correspond to the data shard IDs in sequence. Separate multiple bandwidth values with commas (,).'
Default: []
AssociationProperty: List[Parameter]
AssociationPropertyMetadata:
Parameter:
Type: Number
Visible:
Condition:
Fn::Not:
Fn::Equals:
- ${NodeId}
- ALL
RateControl:
Label:
en: Rate control
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOS assume role
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: TimerTrigger
Action: ACS::TimerTrigger
Description:
en: Triggers a task based on the specified type and expression.
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: Gets the Redis instances.
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: Modifies the bandwidth of the Redis instance.
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:
en: Timer trigger settings
- Parameters:
- RegionId
- Targets
- Bandwidth
- DurationHour
Label:
default:
en: Instance settings
- Parameters:
- RateControl
- OOSAssumeRole
Label:
default:
en: Advanced options