全部產品
Search
文件中心

CloudOps Orchestration Service:ACS-ApiGateway-BulkyModifyApi

更新時間:Sep 06, 2024

模板名稱

ACS-ApiGateway-BulkyModifyApi 修改API為私人類型

立即執行

模板描述

修改API為私人類型

模板類型

自動化

所有者

Alibaba Cloud

輸入參數

參數名稱

描述

類型

是否必填

預設值

約束

instanceId

API Gateway執行個體ID

String

regionId

地區ID

String

{{ ACS::RegionId }}

rateControl

任務執行的並發比率

Json

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

OOSAssumeRole

OOS扮演的RAM角色

String

""

輸出參數

執行此模板需要的權限原則

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "cloudapi:DescribeApi",
                "cloudapi:ModifyApi"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

詳情

ACS-ApiGateway-BulkyModifyApi詳情

模板內容

FormatVersion: OOS-2019-06-01
Description:
  en: Modify API to private
  zh-cn: 修改API為私人類型
  name-en: ACS-ApiGateway-BulkyModifyApi
  name-zh-cn: 修改API為私人類型
  categories:
    - security
Parameters:
  regionId:
    Label:
      en: RegionId
      zh-cn: 地區ID
    Type: String
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  instanceId:
    Label:
      en: InstanceId
      zh-cn: API Gateway執行個體ID
    Type: String
  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: describeApi
    Action: 'ACS::ExecuteAPI'
    Description:
      en: Query parameters
      zh-cn: 查詢API參數資訊
    Properties:
      Service: CLOUDAPI
      API: DescribeApi
      Parameters:
        RegionId: '{{ regionId }}'
        ApiId: '{{ instanceId }}'
    Outputs:
      ApiName:
        Type: String
        ValueSelector: .ApiName
      RequestConfig:
        Type: String
        ValueSelector: .RequestConfig
      ServiceConfig:
        Type: String
        ValueSelector: .ServiceConfig
      GroupId:
        Type: String
        ValueSelector: .GroupId
      Description:
        Type: String
        ValueSelector: .Description
      AuthType:
        Type: String
        ValueSelector: .AuthType
      ForceNonceCheck:
        Type: Boolean
        ValueSelector: .ForceNonceCheck
      RequestParameters:
        Type: String
        ValueSelector: .RequestParameters.RequestParameter
      ServiceParameters:
        Type: String
        ValueSelector: .ServiceParameters.ServiceParameter
      ServiceParametersMap:
        Type: String
        ValueSelector: .ServiceParametersMap.ServiceParameterMap
      ResultType:
        Type: String
        ValueSelector: .ResultType
      ResultSample:
        Type: String
        ValueSelector: .ResultSample
      FailResultSample:
        Type: String
        ValueSelector: .FailResultSample
      ErrorCodeSamples:
        Type: String
        ValueSelector: .ErrorCodeSamples.ErrorCodeSample
      AllowSignatureMethod:
        Type: String
        ValueSelector: .AllowSignatureMethod
      WebSocketApiType:
        Type: String
        ValueSelector: .WebSocketApiType
      DisableInternet:
        Type: Boolean
        ValueSelector: .DisableInternet
      AppCodeAuthType:
        Type: String
        ValueSelector: .AppCodeAuthType
      SystemParameters:
        Type: String
        ValueSelector: .SystemParameters.SystemParameter
      ConstantParameters:
        Type: String
        ValueSelector: .ConstantParameters.ConstantParameter
      ResultDescriptions:
        Type: String
        ValueSelector: .ResultDescriptions.ResultDescription
      OpenIdConnectConfig:
        Type: String
        ValueSelector: .OpenIdConnectConfig
      ResultBodyModel:
        Type: String
        ValueSelector: .ResultBodyModel
      BackendId:
        Type: String
        ValueSelector: .BackendConfig.BackendId
      BackendEnable:
        Type: Boolean
        ValueSelector: .BackendEnable
  - Name: modifyApi
    Action: ACS::ExecuteAPI
    Description:
      en: Modify API to private
      zh-cn: 修改API為私人類型
    Properties:
      Service: CLOUDAPI
      API: ModifyApi
      Parameters:
        RegionId: '{{ regionId }}'
        ApiId: '{{ instanceId }}'
        ApiName: '{{ describeApi.ApiName }}'
        RequestConfig: '{{ describeApi.RequestConfig }}'
        ServiceConfig: '{{ describeApi.ServiceConfig }}'
        Visibility: PRIVATE
        GroupId: '{{ describeApi.GroupId }}'
        Description: '{{ describeApi.Description }}'
        AuthType: '{{ describeApi.AuthType }}'
        RequestParameters: '{{ describeApi.RequestParameters }}'
        ServiceParameters: '{{ describeApi.ServiceParameters }}'
        ServiceParametersMap: '{{ describeApi.ServiceParametersMap }}'
        ResultType: '{{ describeApi.ResultType }}'
        ResultSample: '{{ describeApi.ResultSample }}'
        FailResultSample: '{{ describeApi.FailResultSample }}'
        ErrorCodeSamples: '{{ describeApi.ErrorCodeSamples }}'
        AllowSignatureMethod: '{{ describeApi.AllowSignatureMethod }}'
        WebSocketApiType: '{{ describeApi.WebSocketApiType }}'
        ForceNonceCheck: '{{ describeApi.ForceNonceCheck }}'
        DisableInternet: '{{ describeApi.DisableInternet }}'
        AppCodeAuthType: '{{ describeApi.AppCodeAuthType }}'
        SystemParameters: '{{ describeApi.SystemParameters }}'
        ConstantParameters: '{{ describeApi.ConstantParameters }}'
        ResultDescriptions: '{{ describeApi.ResultDescriptions }}'
        OpenIdConnectConfig: '{{ describeApi.OpenIdConnectConfig }}'
        ResultBodyModel: '{{ describeApi.ResultBodyModel }}'
        BackendId: '{{ describeApi.BackendId }}'
        BackendEnable: '{{ describeApi.BackendEnable }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - instanceId
        Label:
          default:
            zh-cn: 選擇執行個體
            en: Select instance
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: 進階選項
            en: Control Options