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

Resource Orchestration Service:ALIYUN::SAE::Ingress

最終更新日:Mar 17, 2025

ALIYUN::SAE::Ingress は、ルーティングルールを作成するために使用されます。

構文

{
  "Type": "ALIYUN::SAE::Ingress",
  "Properties": {
    "DefaultRule": Map,
    "Description": String,
    "ListenerPort": Integer,
    "NamespaceId": String,
    "Rules": List,
    "SlbId": String,
    "CertIds": List,
    "CertId": String,
    "LoadBalanceType": String,
    "ListenerProtocol": String
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

DefaultRule

Map

はい

はい

デフォルトの転送ルール。

デフォルトの転送ルールでポートとアプリケーションを指定して、アプリケーションの IP アドレスに基づいてトラフィックを転送できます。

詳細については、このトピックの「DefaultRule プロパティ」セクションをご参照ください。

説明

Rules プロパティで指定された転送ルールに一致しないすべてのリクエストは、アプリケーションに転送されます。

Description

String

はい

はい

ルーティングルール名。

なし。

ListenerPort

Integer

はい

はい

Server Load Balancer( SLB )インスタンスのリスナーポート。

空いているポートを指定する必要があります。

NamespaceId

String

はい

いいえ

アプリケーションが属する名前空間の ID 。

複数の名前空間に属するアプリケーションはサポートされていません。

Rules

List

はい

はい

カスタム転送ルール。

カスタム転送ルールでポートとアプリケーションを指定して、指定されたドメイン名とリクエストパスに基づいてトラフィックを転送できます。

詳細については、このトピックの「Rules プロパティ」セクションをご参照ください。

SlbId

String

はい

いいえ

ルーティングルールで使用される SLB インスタンス。

なし。

CertIds

List

いいえ

はい

Application Load Balancer(ALB)インスタンスに関連付けられている証明書の ID です。

有効な値は、次の制限事項に従います。

  • LoadBalanceTypealb に設定すると、CertIds を使用して HTTPS リスナーに複数の証明書を設定できます。複数の証明書 ID はコンマ (,) で区切ってください。

  • ALB インスタンスで使用される SSL 証明書の ID は、SSL Certificates Service から取得できます。たとえば、756***-cn-hangzhou を指定した場合、756*** はサービスページから取得した証明書 ID です。-cn-hangzhou は固定サフィックスです。詳細については、「証明書の管理」をご参照ください。

CertId

String

いいえ

はい

Classic Load Balancer(CLB)インスタンスに関連付けられている証明書の ID です。

有効な値は、次の制限事項に従います。

  • LoadBalanceTypeclb に設定すると、CertId を使用して HTTPS リスナーの証明書を設定できます。

CLB インスタンスの SSL 証明書の ID の使用方法の詳細については、「証明書の追加」をご参照ください。

LoadBalanceType

String

いいえ

いいえ

SLB インスタンスタイプ。

ルーティングルールを作成するときにタイプを指定できます。ルーティングルールを更新するときにタイプを変更することはできません。有効な値:

  • clb: CLB (旧称 SLB) インスタンス

  • alb: ALB インスタンス

ListenerProtocol

String

いいえ

はい

リクエストの転送に使用されるプロトコル。

有効な値:

  • HTTP: HTTP は、送信されるデータを識別する必要があるアプリケーションに適しています。

  • HTTPS: HTTPS は、暗号化されたデータ転送が必要なアプリケーションに適しています。

DefaultRule 構文

"DefaultRule": {
  "BackendProtocol": String,
  "AppId": String,
  "ContainerPort": Integer
}

DefaultRule プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

AppId

String

はい

はい

アプリケーション ID 。

なし。

ContainerPort

Integer

はい

はい

コンテナポート。

有効な値:

0 ~ 65535 。

BackendProtocol

String

いいえ

はい

バックエンドサービスで使用されるプロトコル。

有効な値:

  • http

  • https

  • grpc

Rules 構文

"Rules": [
  {
    "Path": String,
    "BackendProtocol": String,
    "AppId": String,
    "RewritePath": String,
    "ContainerPort": Integer,
    "Domain": String
  }
]

Rules プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

AppId

String

はい

はい

アプリケーション ID 。

なし。

ContainerPort

Integer

はい

はい

コンテナポート。

有効な値:

0 ~ 65535 。

Domain

String

はい

はい

ドメイン名。

なし。

Path

String

はい

はい

リクエストパス。

なし。

BackendProtocol

String

いいえ

はい

バックエンドサービスで使用されるプロトコル。

有効な値:

  • http

  • https

  • grpc

RewritePath

String

いいえ

いいえ

書き換えパス。

なし。

戻り値

Fn::GetAtt

IngressId: ルーティングルールの ID 。

  • YAML 形式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DefaultRule:
        AssociationPropertyMetadata:
          Parameters:
            BackendProtocol:
              Type: String
              Description:
                ja: アプリケーションのプロトコル。
              AllowedValues:
                - http
                - https
                - grpc
              Required: false
            AppId:
              Type: String
              Description:
                ja: アプリケーション ID
              Required: true
            ContainerPort:
              Type: Number
              Description:
                ja: アプリケーションのコンテナポート。
              Required: true
              MinValue: 0
              MaxValue: 65535
        Type: Json
        Description:
          ja: 'デフォルトの転送ルール。デフォルトの転送ルールでポートとアプリケーションを指定して、アプリケーションの IP アドレスに基づいてトラフィックを転送できます。'
        Required: true
      SlbId:
        Type: String
        AssociationProperty: ALIYUN::SLB::LoadBalancer::LoadBalancerId
        Description:
          ja: ルーティングルールで使用される Server Load Balancer (SLB) インスタンス。
        Required: true
      ListenerPort:
        Type: Number
        Description:
          ja: SLB インスタンスのリスナーポート。空いているポートを指定する必要があります。
        Required: true
        MinValue: 0
        MaxValue: 65535
      Description:
        AssociationProperty: TextArea
        Type: String
        Description:
          ja: ルーティングルール名。
        AllowedPattern: ^[a-z0-9]([a-z0-9.-]{0,61}[a-z0-9])?$
        Required: true
      NamespaceId:
        Type: String
        Description:
          ja: アプリケーションが属する名前空間の ID 。この操作を呼び出すたびに、名前空間 ID を 1 つだけ指定できます。
        Required: true
      Rules:
        AssociationPropertyMetadata:
          Parameters:
            Path:
              Type: String
              Description:
                ja: リクエストパス。
              Required: true
            BackendProtocol:
              Type: String
              Description:
                ja: アプリケーションのプロトコル。
              AllowedValues:
                - http
                - https
                - grpc
              Required: false
            AppId:
              Type: String
              Description:
                ja: アプリケーション ID
              Required: true
            RewritePath:
              Type: String
              Description:
                ja: 書き換えパス。
              Required: false
            ContainerPort:
              Type: Number
              Description:
                ja: アプリケーションのコンテナポート。
              Required: true
              MinValue: 0
              MaxValue: 65535
            Domain:
              Type: String
              Description:
                ja: ドメイン名。
              Required: true
        AssociationProperty: List[Parameters]
        Type: Json
        Description:
          ja: 転送ルール。転送ルールでポートとアプリケーションを指定して、指定されたドメイン名とリクエストパスに基づいてトラフィックを転送できます。
        Required: true
        MinLength: 1
        MaxLength: 10
    Resources:
      Ingress:
        Type: ALIYUN::SAE::Ingress
        Properties:
          DefaultRule:
            Ref: DefaultRule
          SlbId:
            Ref: SlbId
          ListenerPort:
            Ref: ListenerPort
          Description:
            Ref: Description
          NamespaceId:
            Ref: NamespaceId
          Rules:
            Ref: Rules
    Outputs:
      IngressId:
        Description: ルーティングルールの ID 。
        Value:
          Fn::GetAtt:
            - Ingress
            - IngressId
    
  • JSON 形式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "DefaultRule": {
          "AssociationPropertyMetadata": {
            "Parameters": {
              "BackendProtocol": {
                "Type": "String",
                "Description": {
                  "ja": "アプリケーションのプロトコル。"
                },
                "AllowedValues": [
                  "http",
                  "https",
                  "grpc"
                ],
                "Required": false
              },
              "AppId": {
                "Type": "String",
                "Description": {
                  "ja": "アプリケーション ID"
                },
                "Required": true
              },
              "ContainerPort": {
                "Type": "Number",
                "Description": {
                  "ja": "アプリケーションのコンテナポート。"
                },
                "Required": true,
                "MinValue": 0,
                "MaxValue": 65535
              }
            }
          },
          "Type": "Json",
          "Description": {
            "ja": "デフォルトの転送ルール。デフォルトの転送ルールでポートとアプリケーションを指定して、アプリケーションの IP アドレスに基づいてトラフィックを転送できます。"
          },
          "Required": true
        },
        "SlbId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::SLB::LoadBalancer::LoadBalancerId",
          "Description": {
            "ja": "ルーティングルールで使用される Server Load Balancer (SLB) インスタンス。"
          },
          "Required": true
        },
        "ListenerPort": {
          "Type": "Number",
          "Description": {
            "ja": "SLB インスタンスのリスナーポート。空いているポートを指定する必要があります。"
          },
          "Required": true,
          "MinValue": 0,
          "MaxValue": 65535
        },
        "Description": {
          "AssociationProperty": "TextArea",
          "Type": "String",
          "Description": {
            "ja": "ルーティングルール名。"
          },
          "AllowedPattern": "^[a-z0-9]([a-z0-9.-]{0,61}[a-z0-9])?$",
          "Required": true
        },
        "NamespaceId": {
          "Type": "String",
          "Description": {
            "ja": "アプリケーションが属する名前空間の ID 。この操作を呼び出すたびに、名前空間 ID を 1 つだけ指定できます。"
          },
          "Required": true
        },
        "Rules": {
          "AssociationPropertyMetadata": {
            "Parameters": {
              "Path": {
                "Type": "String",
                "Description": {
                  "ja": "リクエストパス。"
                },
                "Required": true
              },
              "BackendProtocol": {
                "Type": "String",
                "Description": {
                  "ja": "アプリケーションのプロトコル。"
                },
                "AllowedValues": [
                  "http",
                  "https",
                  "grpc"
                ],
                "Required": false
              },
              "AppId": {
                "Type": "String",
                "Description": {
                  "ja": "アプリケーション ID"
                },
                "Required": true
              },
              "RewritePath": {
                "Type": "String",
                "Description": {
                  "ja": "書き換えパス。"
                },
                "Required": false
              },
              "ContainerPort": {
                "Type": "Number",
                "Description": {
                  "ja": "アプリケーションのコンテナポート。"
                },
                "Required": true,
                "MinValue": 0,
                "MaxValue": 65535
              },
              "Domain": {
                "Type": "String",
                "Description": {
                  "ja": "ドメイン名。"
                },
                "Required": true
              }
            }
          },
          "AssociationProperty": "List[Parameters]",
          "Type": "Json",
          "Description": {
            "ja": "転送ルール。転送ルールでポートとアプリケーションを指定して、指定されたドメイン名とリクエストパスに基づいてトラフィックを転送できます。"
          },
          "Required": true,
          "MinLength": 1,
          "MaxLength": 10
        }
      },
      "Resources": {
        "Ingress": {
          "Type": "ALIYUN::SAE::Ingress",
          "Properties": {
            "DefaultRule": {
              "Ref": "DefaultRule"
            },
            "SlbId": {
              "Ref": "SlbId"
            },
            "ListenerPort": {
              "Ref": "ListenerPort"
            },
            "Description": {
              "Ref": "Description"
            },
            "NamespaceId": {
              "Ref": "NamespaceId"
            },
            "Rules": {
              "Ref": "Rules"
            }
          }
        }
      },
      "Outputs": {
        "IngressId": {
          "Description": "ルーティングルールの ID 。",
          "Value": {
            "Fn::GetAtt": [
              "Ingress",
              "IngressId"
            ]
          }
        }
      }
    }