全部產品
Search
文件中心

CloudOps Orchestration Service:ACS-Redis-ScheduleToUpgradeInstanceBandwidth

更新時間:Dec 20, 2025

模板名稱

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