すべてのプロダクト
Search
ドキュメントセンター

CloudOps Orchestration Service:API 一括変更

最終更新日:Jan 17, 2025

テンプレート名

ACS-ApiGateway-BulkyModifyApi

今すぐ実行

テンプレートの説明

API 操作のタイプを非公開に変更します。

テンプレートタイプ

自動化

所有者

Alibaba Cloud

入力パラメーター

パラメーター

説明

データ型

必須

デフォルト値

制限

instanceId

API Gateway インスタンスの ID。

String

はい

regionId

リージョン ID。

String

いいえ

{{ ACS::RegionId }}

rateControl

レート制御設定。

Json

いいえ

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

OOSAssumeRole

CloudOps Orchestration Service ( 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   
  name-en: ACS-ApiGateway-BulkyModifyApi   
  categories:
    - security
Parameters:
  regionId:
    Label:
      en: RegionId      
    Type: String
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  instanceId:
    Label:
      en: InstanceId     
    Type: String
  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: describeApi
    Action: 'ACS::ExecuteAPI'
    Description:
      en: Query parameters       
    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      
    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:             
            en: Select instance
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:            
            en: Control Options