All Products
Search
Document Center

CloudOps Orchestration Service:ACS-Redis-ScheduleToUpgradeInstanceBandwidth

Last Updated:Dec 04, 2024

Template name

ACS-Redis-ScheduleToUpgradeInstanceBandwidth

Execute Now

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

Bandwidth

The bandwidth to be upgraded.

Number

Yes

RegionId

The region ID.

String

No

{{ ACS::RegionId }}

DurationHour

The bandwidth upgrade duration.

Number

No

1

RateControl

The rate control settings.

Json

No

{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}

OOSAssumeRole

The RAM role that is assumed by CloudOps Orchestration Service (OOS).

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"
        }
    ]
}

References

ACS-Redis-ScheduleToUpgradeInstanceBandwidth

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: Scheduled upgrade of the temporary bandwidth of a Redis instance 
  name-en: ACS-Redis-ScheduleToUpgradeInstanceBandwidth 
Parameters:
  RegionId:
    Type: String
    Label:
      en: RegionId
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  Targets:
    Type: Json
    Label:
      en: TargetInstance
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: ALIYUN::Redis::Instance
      RegionId: regionId
  TimerTrigger:
    Type: Json
    Label:
      en: TimerTrigger
    AssociationProperty: ALIYUN::OOS::Component::TimerTrigger
    AssociationPropertyMetadata:
      MinuteInterval: 30
  Bandwidth:
    Type: Number
    Label:
      en: Bandwidth     
    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.  
    MinValue: 1
    MaxValue: 192
  DurationHour:
    Label:
      en: DurationHour  
    Description:
      en: Unit:Hour. The bandwidth upgrade should last at least 1 hours
    Type: Number
    MinValue: 1
    Default: 1
  RateControl:
    Label:
      en: RateControl
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: TimerTrigger
    Action: ACS::TimerTrigger
    Description:
      en: Triggers a task as scheduled by specifying type and expression
    Properties:
      Type:
        Fn::Select:
          - type
          - '{{ TimerTrigger }}'
      Expression:
        Fn::Select:
          - expression
          - '{{ TimerTrigger }}'
      EndDate:
        Fn::Select:
          - endDate
          - '{{ TimerTrigger }}'
      TimeZone:
        Fn::Select:
          - timeZone
          - '{{ TimerTrigger }}'
  - Name: GetInstance
    Description:
      en: Get 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: Modify redis instance bandwidth
    Properties:
      RegionId: '{{ RegionId }}'
      InstanceId: '{{ ACS::TaskLoopItem }}'
      Bandwidth: '{{ Bandwidth }}'
      DurationHour: '{{ DurationHour }}'
    Loop:
      RateControl: '{{ RateControl }}'
      Items: '{{ GetInstance.InstanceIds }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - TimerTrigger
        Label:
          default:
            en: Timer Trigger Configure
      - Parameters:
          - RegionId
          - Targets
          - Bandwidth
          - DurationHour
        Label:
          default:
            en: Select Instances
      - Parameters:
          - RateControl
          - OOSAssumeRole
        Label:
          default:
            en: Control Options