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

Resource Orchestration Service:ALIYUN::ALB::AScript

最終更新日:Mar 17, 2025

ALIYUN::ALB::AScript は、AScript ルールを作成するために使用されます。

構文

{
  "Type": "ALIYUN::ALB::AScript",
  "Properties": {
    "AScriptName": String,
    "ListenerId": String,
    "ScriptContent": String,
    "Enabled": Boolean,
    "ExtAttributeEnabled": Boolean,
    "ExtAttributes": List
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

AScriptName

String

はい

はい

AScript ルールの名前。

名前は 2 ~ 128 文字で、英字、数字、ピリオド(.)、アンダースコア(_)、ハイフン(-)を含めることができます。英字で始める必要があります。

ListenerId

String

はい

いいえ

リスナー ID。

なし。

ScriptContent

String

はい

はい

AScript ルールの内容。

なし。

Enabled

Boolean

いいえ

はい

AScript ルールを有効にするかどうかを指定します。

有効な値:

  • true

  • false (デフォルト)

ExtAttributeEnabled

Boolean

いいえ

はい

AScript ルールの拡張属性を有効にするかどうかを指定します。

有効な値:

  • true

  • false (デフォルト)

ExtAttributes

List

いいえ

はい

拡張属性。

詳細については、「ExtAttributes プロパティ」をご参照ください。

ExtAttributes 構文

"ExtAttributes": [
  {
    "AttributeKey": String,
    "AttributeValue": String
  }
]

ExtAttributes プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

AttributeKey

String

いいえ

いいえ

AScript ルールの属性名。

値を EsDebug に設定します。 EsDebug の値は、リクエストが _es_dbg パラメーターを伝送し、プロパティ値が指定されたキーである場合、デバッグヘッダーが有効になり、実行結果を返すことを指定します。

AttributeValue

String

いいえ

いいえ

AScript ルールの属性値。

値は 1 ~ 128 文字で、英字と数字を含めることができます。

戻り値

Fn::GetAtt

AScriptId: AScript ルールの ID。

  • YAML フォーマット

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ScriptContent:
        Type: String
        Description:
          en: The content of the AScript rule.
        Required: true
      AScriptName:
        Type: String
        Description:
          en: |-
            The name of the AScript rule.
            The name must be 2 to 128 character in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.
        AllowedPattern: ^[a-zA-Z][.-_a-zA-Z0-9]{1,127}$
        Required: true
      ListenerId:
        Type: String
        Description:
          en: The listener ID.
        Required: true
    Resources:
      AScript:
        Type: ALIYUN::ALB::AScript
        Properties:
          ScriptContent:
            Ref: ScriptContent
          AScriptName:
            Ref: AScriptName
          ListenerId:
            Ref: ListenerId
    Outputs:
      AScriptId:
        Description: The AScript rule ID.
        Value:
          Fn::GetAtt:
            - AScript
            - AScriptId
    
  • JSON フォーマット

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ScriptContent": {
          "Type": "String",
          "Description": {
            "en": "The content of the AScript rule."
          },
          "Required": true
        },
        "AScriptName": {
          "Type": "String",
          "Description": {
            "en": "The name of the AScript rule.\nThe name must be 2 to 128 character in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter."
          },
          "AllowedPattern": "^[a-zA-Z][.-_a-zA-Z0-9]{1,127}$",
          "Required": true
        },
        "ListenerId": {
          "Type": "String",
          "Description": {
            "en": "The listener ID."
          },
          "Required": true
        }
      },
      "Resources": {
        "AScript": {
          "Type": "ALIYUN::ALB::AScript",
          "Properties": {
            "ScriptContent": {
              "Ref": "ScriptContent"
            },
            "AScriptName": {
              "Ref": "AScriptName"
            },
            "ListenerId": {
              "Ref": "ListenerId"
            }
          }
        }
      },
      "Outputs": {
        "AScriptId": {
          "Description": "The AScript rule ID.",
          "Value": {
            "Fn::GetAtt": [
              "AScript",
              "AScriptId"
            ]
          }
        }
      }
    }