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

Resource Orchestration Service:ALIYUN::POLARDB::DBClusterEndpoint

最終更新日:Jan 16, 2025

ALIYUN::POLARDB::DBClusterEndpoint は、PolarDB クラスタのカスタムエンドポイントを作成するために使用されます。

構文

{
  "Type": "ALIYUN::POLARDB::DBClusterEndpoint",
  "Properties": {
    "DBClusterId": String,
    "ReadWriteMode": String,
    "EndpointType": String,
    "AutoAddNewNodes": String,
    "Nodes": List,
    "EndpointConfig": Map
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

DBClusterId

String

はい

いいえ

クラスタのID。

なし。

ReadWriteMode

String

いいえ

はい

読み取り/書き込みモード。

有効な値:

  • ReadWrite

  • ReadOnly (デフォルト)

EndpointType

String

いいえ

いいえ

クラスタエンドポイントのタイプ。

値を Custom に設定します。

AutoAddNewNodes

String

いいえ

はい

新しく追加されたノードをクラスタエンドポイントに自動的に関連付けるかどうかを指定します。

有効な値:

  • Enable

  • Disable (デフォルト)

Nodes

List

いいえ

はい

読み取りリクエストの処理に使用されるノード。

例: ["pi-bpsg35x****", "pi-bp3ddh****"]

このプロパティには少なくとも 2 つのノードを指定する必要があります。 このプロパティを指定しない場合、クラスタ内のすべてのノードがエンドポイントに送信された読み取りリクエストの処理に使用されます。

EndpointConfig

Map

いいえ

はい

クラスタエンドポイントの高度な構成。

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

EndpointConfig 構文

"EndpointConfig": {
  "ConsistLevel": String,
  "ConsistTimeout": String,
  "LoadBalancePolicy": String,
  "ConnectionPersist": String,
  "DistributedTransaction": String,
  "EnableOverloadThrottle": String,
  "MasterAcceptReads": String,
  "ConsistTimeoutAction": String,
  "EnableHtapImci": String,
  "MaxParallelDegree": String
}  

EndpointConfig プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

ConsistLevel

String

いいえ

はい

整合性レベル。

有効な値:

  • 0: 最終整合性

    説明

    ReadWriteMode パラメータが ReadOnly に設定されている場合、整合性レベルは 0 である必要があります。

  • 1 (デフォルト): セッション整合性

ConsistTimeout

String

いいえ

はい

グローバル整合性読み取りタイムアウト。

なし。

LoadBalancePolicy

String

いいえ

はい

負荷分散ポリシー。

形式: {"LoadBalancePolicy":"Value"}。

有効な値:

  • 0 (デフォルト): 接続ベースの負荷分散

  • 1: アクティブリクエストベースの負荷分散

ConnectionPersist

String

いいえ

はい

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

形式: {"ConnectionPersist":"Value"}。

有効な値:

  • off (デフォルト): 接続プールを無効にします。

  • Session: セッションレベルの接続プールを有効にします。

  • Transaction: トランザクションレベルの接続プールを有効にします。

DistributedTransaction

String

いいえ

はい

トランザクション分割を有効にするかどうかを指定します。

形式: {"DistributedTransaction":"Value"}。

有効な値:

  • on (デフォルト)

  • off

EnableOverloadThrottle

String

いいえ

はい

過負荷保護を有効にするかどうかを指定します。

形式: {"EnableOverloadThrottle":"Value"}。

有効な値:

  • on

  • off (デフォルト)

MasterAcceptReads

String

いいえ

はい

プライマリノードが読み取りを受け入れるかどうかを指定します。

形式: {"MasterAcceptReads":"off"}。

有効な値:

  • on

  • off (デフォルト)

ConsistTimeoutAction

String

いいえ

はい

グローバル整合性タイムアウトポリシー。

有効な値:

  • 0 (デフォルト): リクエストをプライマリノードに送信します。

  • 1: SQL エラーを返します。

EnableHtapImci

String

いいえ

はい

行ストアノードと列ストアノード間でリクエストの自動分散を有効にするかどうかを指定します。

形式: {"EnableHtapImci":"Value"}。

有効な値:

  • on

  • off (デフォルト)

MaxParallelDegree

String

いいえ

はい

並列クエリを有効にするかどうかを指定します。

形式: {"MaxParallelDegree":"Value"}。

有効な値:

  • on

  • off (デフォルト)

戻り値

Fn::GetAtt

  • DBEndpointId: クラスタエンドポイントの ID。

  • ConnectionString: クラスタの接続文字列。

  • Addresses: IP アドレス。

YAML 形式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  DBClusterEndpoint:
    Type: ALIYUN::POLARDB::DBClusterEndpoint
    Properties:
      DBClusterId:
        Ref: DBClusterId
      ReadWriteMode:
        Ref: ReadWriteMode
      EndpointConfig:
        Ref: EndpointConfig
      AutoAddNewNodes:
        Ref: AutoAddNewNodes
      Nodes:
        Fn::Split:
        - ","
        - Ref: Nodes
      EndpointType:
        Ref: EndpointType
Parameters:
  DBClusterId:
    Type: String
    Description: カスタム接続ポイントを作成する ApsaraDB for POLARDB クラスタの ID。
  ReadWriteMode:
    Default: ReadOnly
    Type: String
    Description: 'クラスタ接続ポイントの読み取り/書き込みモード。有効な値: ReadWrite: 読み取りおよび書き込みリクエストを受信して転送します (自動読み取り/書き込み分割)。 ReadOnly: 読み取りリクエストのみを受信して転送します。 デフォルト値: ReadOnly。'
    AllowedValues:
    - ReadOnly
    - ReadWrite
  EndpointConfig:
    Type: Json
    Description: ''
  AutoAddNewNodes:
    Default: Disable
    Type: String
    Description: |-
      新しく追加されたノードがこの接続ポイントに自動的に追加されるかどうかを指定します。
      有効な値: Enable、Disable。
      デフォルト値: Disable。
    AllowedValues:
    - Disable
    - Enable
  Nodes:
    MinLength: 2
    Type: CommaDelimitedList
    Description: |-
      この接続ポイントに追加して、この接続ポイントからの読み取りリクエストを処理するノード。少なくとも 2 つのノードを追加します。
      このパラメータを指定しない場合、デフォルトではクラスタのすべてのノードがこの接続ポイントに追加されます。
  EndpointType:
    Default: Custom
    Type: String
    Description: クラスタ接続ポイントのタイプ。このパラメータを Custom に設定します。
Outputs:
  DBEndpointId:
    Description: DB クラスタエンドポイント ID。例: pe-xxxxxxxx。
    Value:
      Fn::GetAtt:
      - DBClusterEndpoint
      - DBEndpointId
  ConnectionString:
    Description: DB クラスタエンドポイントの最初の接続文字列。
    Value:
      Fn::GetAtt:
      - DBClusterEndpoint
      - ConnectionString
  Addresses:
    Description: DB クラスタエンドポイントのアドレス項目。
    Value:
      Fn::GetAtt:
      - DBClusterEndpoint
      - Addresses

JSON 形式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "DBClusterEndpoint": {
      "Type": "ALIYUN::POLARDB::DBClusterEndpoint",
      "Properties": {
        "DBClusterId": {
          "Ref": "DBClusterId"
        },
        "ReadWriteMode": {
          "Ref": "ReadWriteMode"
        },
        "EndpointConfig": {
          "Ref": "EndpointConfig"
        },
        "AutoAddNewNodes": {
          "Ref": "AutoAddNewNodes"
        },
        "Nodes": {
          "Fn::Split": [
            ",",
            {
              "Ref": "Nodes"
            }
          ]
        },
        "EndpointType": {
          "Ref": "EndpointType"
        }
      }
    }
  },
  "Parameters": {
    "DBClusterId": {
      "Type": "String",
      "Description": "カスタム接続ポイントを作成する ApsaraDB for POLARDB クラスタの ID。"  // The ID of the ApsaraDB for POLARDB cluster for which a custom connection point is to be created.
    },
    "ReadWriteMode": {
      "Default": "ReadOnly",
      "Type": "String",
      "Description": "クラスタ接続ポイントの読み取り/書き込みモード。有効な値: ReadWrite: 読み取りおよび書き込みリクエストを受信して転送します (自動読み取り/書き込み分割)。ReadOnly: 読み取りリクエストのみを受信して転送します。デフォルト値: ReadOnly。", // The read/write mode of the cluster connection point. Valid values: ReadWrite: receives and forwards read and write requests (automatic read-write splitting). ReadOnly: receives and forwards only read requests. Default value: ReadOnly.
      "AllowedValues": [
        "ReadOnly",
        "ReadWrite"
      ]
    },
    "EndpointConfig": {
      "Type": "Json",
      "Description": ""
    },
    "AutoAddNewNodes": {
      "Default": "Disable",
      "Type": "String",
      "Description": "新しく追加されたノードがこの接続ポイントに自動的に追加されるかどうかを指定します。\n有効な値: Enable、Disable。\nデフォルト値: Disable。", // Specifies whether a newly added node is automatically added to this connection point.\nValid values: Enable, Disable.\nDefault value: Disable.
      "AllowedValues": [
        "Disable",
        "Enable"
      ]
    },
    "Nodes": {
      "MinLength": 2,
      "Type": "CommaDelimitedList",
      "Description": "この接続ポイントに追加して、この接続ポイントからの読み取りリクエストを処理するノード。少なくとも 2 つのノードを追加します。\nこのパラメータを指定しない場合、デフォルトではクラスタのすべてのノードがこの接続ポイントに追加されます。" // The nodes to be added to this connection point to process read requests from this connection point. Add at least two nodes.\nIf you do not specify this parameter, all nodes of the cluster are added to this connection point by default.
    },
    "EndpointType": {
      "Default": "Custom",
      "Type": "String",
      "Description": "クラスタ接続ポイントのタイプ。このパラメータを Custom に設定します。" // The type of the cluster connection point. Set this parameter to Custom.
    }
  },
  "Outputs": {
    "DBEndpointId": {
      "Description": "DB クラスタエンドポイント ID。例: pe-xxxxxxxx。", // DB cluster endpoint ID. E.g. pe-xxxxxxxx.
      "Value": {
        "Fn::GetAtt": [
          "DBClusterEndpoint",
          "DBEndpointId"
        ]
      }
    },
    "ConnectionString": {
      "Description": "DB クラスタエンドポイントの最初の接続文字列。", // The first connection string of the db cluster endpoint.
      "Value": {
        "Fn::GetAtt": [
          "DBClusterEndpoint",
          "ConnectionString"
        ]
      }
    },
    "Addresses": {
      "Description": "DB クラスタエンドポイントのアドレス項目。", // The address items of the db cluster endpoint.
      "Value": {
        "Fn::GetAtt": [
          "DBClusterEndpoint",
          "Addresses"
        ]
      }
    }
  }
}