All Products
Search
Document Center

CloudOps Orchestration Service:ACS-ApiGateway-BulkyModifyApi

Last Updated:Dec 04, 2024

Template name

ACS-ApiGateway-BulkyModifyApi

Execute Now

Template description

Changes the type of an API operation to private.

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Data type

Required

Default value

Limit

instanceId

The ID of the API Gateway instance.

String

Yes

regionId

The region ID.

String

No

{{ ACS::RegionId }}

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": [
                "cloudapi:DescribeApi",
                "cloudapi:ModifyApi"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

References

ACS-ApiGateway-BulkyModifyApi

Template content

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