全部產品
Search
文件中心

:ALIYUN::ApiGateway::Plugin

更新時間:Jun 19, 2024

ALIYUN::ApiGateway::Plugin類型用於建立API Gateway外掛程式。

文法

{
  "Type": "ALIYUN::ApiGateway::Plugin",
  "Properties": {
    "PluginName": String,
    "Description": String,
    "PluginData": String,
    "PluginType": String,
    "Tags": List
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

PluginData

String

外掛程式定義語句。

支援JSON和YAML格式。

PluginName

String

外掛程式名稱。

長度為4~50個字元,不能以短劃線(-)開頭。可包含英文字母、漢字、數字和短劃線(-)。

PluginType

String

外掛程式類型。

取值:

  • ipControl:IP存取控制。

  • trafficControl:流量控制。

  • backendSignature:後端簽名。

  • jwtAuth:JWT(OpenID Connect)。

  • cors:跨域資源訪問。

  • caching:緩衝。

Description

String

外掛程式說明。

不能超過200個字元。

Tags

List

標籤。

最多添加20個標籤。

更多資訊,請參見Tags屬性

Tags文法

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags屬性

屬性名稱

類型

必須

允許更新

描述

約束

Key

String

標籤鍵。

長度為1~128個字元,不能以aliyunacs:開頭,不能包含http://https://

Value

String

標籤值。

長度為0~128個字元,不能以aliyunacs:開頭,不能包含http://https://

傳回值

Fn::GetAtt

  • Description:外掛程式說明。

  • PluginName:外掛程式名稱。

  • PluginData:外掛程式定義語句。

  • PluginId:外掛程式ID。

  • PluginType:外掛程式類型。

樣本

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Description:
    Description: The description of the plug-in, which cannot exceed 200 characters.
    Type: String
  PluginData:
    Description: The definition statement of the plug-in. Plug-in definition statements
      in the JSON and YAML formats are supported.
    Type: String
  PluginName:
    Description: The name of the plug-in that you want to create. It can contain uppercase
      English letters, lowercase English letters, Chinese characters, numbers, and
      underscores (). It must be 4 to 50 characters in length and cannot start with
      an underscore ().
    Type: String
  PluginType:
    Description: 'The type of the plug-in. Valid values: ipControl: indicates IP address-based
      access control. trafficControl: indicates throttling. backendSignature: indicates
      backend signature. jwtAuth: indicates JWT (OpenId Connect). cors: indicates
      cross-origin resource access (CORS). caching: indicates caching.'
    Type: String
Resources:
  ApiGatewayPlugin:
    Properties:
      Description:
        Ref: Description
      PluginData:
        Ref: PluginData
      PluginName:
        Ref: PluginName
      PluginType:
        Ref: PluginType
    Type: ALIYUN::ApiGateway::Plugin
Outputs:
  Description:
    Description: The description of the plug-in, which cannot exceed 200 characters.
    Value:
      Fn::GetAtt:
      - ApiGatewayPlugin
      - Description
  PluginData:
    Description: The definition statement of the plug-in. Plug-in definition statements
      in the JSON and YAML formats are supported.
    Value:
      Fn::GetAtt:
      - ApiGatewayPlugin
      - PluginData
  PluginId:
    Description: The generated plugin ID.
    Value:
      Fn::GetAtt:
      - ApiGatewayPlugin
      - PluginId
  PluginName:
    Description: The name of the plug-in that you want to create. It can contain uppercase
      English letters, lowercase English letters, Chinese characters, numbers, and
      underscores (). It must be 4 to 50 characters in length and cannot start with
      an underscore ().
    Value:
      Fn::GetAtt:
      - ApiGatewayPlugin
      - PluginName
  PluginType:
    Description: 'The type of the plug-in. Valid values: ipControl: indicates IP address-based
      access control. trafficControl: indicates throttling. backendSignature: indicates
      backend signature. jwtAuth: indicates JWT (OpenId Connect). cors: indicates
      cross-origin resource access (CORS). caching: indicates caching.'
    Value:
      Fn::GetAtt:
      - ApiGatewayPlugin
      - PluginType

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "PluginName": {
      "Type": "String",
      "Description": "The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ()."
    },
    "Description": {
      "Type": "String",
      "Description": "The description of the plug-in, which cannot exceed 200 characters."
    },
    "PluginData": {
      "Type": "String",
      "Description": "The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported."
    },
    "PluginType": {
      "Type": "String",
      "Description": "The type of the plug-in. Valid values: ipControl: indicates IP address-based access control. trafficControl: indicates throttling. backendSignature: indicates backend signature. jwtAuth: indicates JWT (OpenId Connect). cors: indicates cross-origin resource access (CORS). caching: indicates caching."
    }
  },
  "Resources": {
    "ApiGatewayPlugin": {
      "Type": "ALIYUN::ApiGateway::Plugin",
      "Properties": {
        "PluginName": {
          "Ref": "PluginName"
        },
        "Description": {
          "Ref": "Description"
        },
        "PluginData": {
          "Ref": "PluginData"
        },
        "PluginType": {
          "Ref": "PluginType"
        }
      }
    }
  },
  "Outputs": {
    "Description": {
      "Description": "The description of the plug-in, which cannot exceed 200 characters.",
      "Value": {
        "Fn::GetAtt": [
          "ApiGatewayPlugin",
          "Description"
        ]
      }
    },
    "PluginName": {
      "Description": "The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ().",
      "Value": {
        "Fn::GetAtt": [
          "ApiGatewayPlugin",
          "PluginName"
        ]
      }
    },
    "PluginData": {
      "Description": "The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported.",
      "Value": {
        "Fn::GetAtt": [
          "ApiGatewayPlugin",
          "PluginData"
        ]
      }
    },
    "PluginId": {
      "Description": "The generated plugin ID.",
      "Value": {
        "Fn::GetAtt": [
          "ApiGatewayPlugin",
          "PluginId"
        ]
      }
    },
    "PluginType": {
      "Description": "The type of the plug-in. Valid values: ipControl: indicates IP address-based access control. trafficControl: indicates throttling. backendSignature: indicates backend signature. jwtAuth: indicates JWT (OpenId Connect). cors: indicates cross-origin resource access (CORS). caching: indicates caching.",
      "Value": {
        "Fn::GetAtt": [
          "ApiGatewayPlugin",
          "PluginType"
        ]
      }
    }
  }
}