Global Datastore の使用 (CLI) - Amazon ElastiCache (Redis OSS)

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

Global Datastore の使用 (CLI)

AWS Command Line Interface (AWS CLI) を使用して、コマンドラインから複数の AWS サービスを制御したり、スクリプトを使用して自動化したりできます。 AWS CLI はアドホック (ワンタイム) オペレーションに使用できます。

のダウンロードと設定 AWS CLI

は Windows、macOSで AWS CLI 実行されます。これをダウンロードして設定するには、次の手順に従います。

CLI をダウンロード、インストール、設定するには
  1. AWS コマンドラインインターフェイスのウェブページで AWS CLI をダウンロードします。

  2. ユーザーガイドの「 AWS CLI のインストール」および「 CLI AWS Command Line Interface の設定 AWS 」の手順に従います。

グローバルデータストアでの AWS CLI の使用

Global Datastore を操作するには、次の CLI オペレーションを使用します。

  • create-global-replication-group

    aws elasticache create-global-replication-group \ --global-replication-group-id-suffix my global datastore \ --primary-replication-group-id sample-repl-group \ --global-replication-group-description an optional description of the global datastore

    Amazon は、作成時にグローバルデータストア ID にプレフィックス ElastiCache を自動的に適用します。各 AWS リージョンには独自のプレフィックスがあります。例えば、米国西部 (北カルフォルニア) リージョンで作成された Global Datastore ID は、指定したサフィックス名と共に「virxk」で始まります。サフィックスは、自動生成されたプレフィックスと組み合わされて、複数のリージョンにまたがるグローバルデータストア名の一意性を保証します。

    次の表に、各 AWS リージョンとそのグローバルデータストア ID プレフィックスを示します。

    リージョン名/リージョン プレフィックス

    米国東部 (オハイオ) リージョン

    us-east-2

    fpkhr

    米国東部(バージニア州北部) リージョン

    us-east-1

    ldgnf

    US West (N. California) Region

    us-west-1

    virxk

    米国西部 (オレゴン) リージョン

    us-west-2

    sgaui

    カナダ (中部) リージョン

    ca-central-1

    bxodz

    アジアパシフィック (ムンバイ) リージョン

    ap-south-1

    erpgt

    アジアパシフィック (東京) リージョン

    ap-northeast-1

    quwsw

    アジアパシフィック (ソウル) リージョン

    ap-northeast-2

    lfqnh

    アジアパシフィック(大阪)リージョン

    ap-northeast-3

    nlapn

    アジアパシフィック (シンガポール) リージョン

    ap-southeast-1

    vlqxn

    アジアパシフィック (シドニー) リージョン

    ap-southeast-2

    vbgxd

    欧州 (フランクフルト) リージョン

    eu-central-1

    iudkw

    欧州 (アイルランド) リージョン

    eu-west-1

    gxeiz

    欧州 (ロンドン) リージョン

    eu-west-2

    okuqm

    EU (パリ) リージョン

    eu-west-3

    fgjhi

    南米 (サンパウロ) リージョン

    sa-east-1

    juxlw

    中国 (北京) リージョン

    cn-north-1

    emvgo

    中国 (寧夏) リージョン

    cn-northwest-1

    ckbem

    アジアパシフィック (香港) リージョン

    ap-east-1

    knjmp

    AWS GovCloud (米国西部)

    us-gov-west-1

    sgwui
  • create-replication-group – このオペレーションを使用して、グローバルデータストアの名前を --global-replication-group-idパラメータに指定して、グローバルデータストアのセカンダリクラスターを作成します。

    aws elasticache create-replication-group \ --replication-group-id secondary replication group name \ --replication-group-description “Replication group description" \ --global-replication-group-id global datastore name

    このオペレーションを呼び出して--global-replication-group-id値を渡すと、 ElastiCache (Redis OSS) は次のパラメータのグローバルレプリケーショングループのプライマリレプリケーショングループから値を推測します。これらのパラメータには値を渡さないでください。

    "PrimaryClusterId",

    "AutomaticFailoverEnabled",

    "NumNodeGroups",

    "CacheParameterGroupName",

    "CacheNodeType",

    "Engine",

    "EngineVersion",

    "CacheSecurityGroupNames",

    "EnableTransitEncryption",

    "AtRestEncryptionEnabled",

    "SnapshotArns",

    "SnapshotName"

  • describe-global-replication-groups

    aws elasticache describe-global-replication-groups \ --global-replication-group-id my global datastore \ --show-member-info an optional parameter that returns a list of the primary and secondary clusters that make up the global datastore
  • modify-global-replication-group

    aws elasticache modify-global-replication-group \ --global-replication-group-id my global datastore \ --automatic-failover-enabled \ --cache-node-type node type \ --cache-parameter-group-name parameter group name \ --engine-version engine version \ -—apply-immediately \ --global-replication-group-description description
  • delete-global-replication-group

    aws elasticache delete-global-replication-group \ --global-replication-group-id my global datastore \ --retain-primary-replication-group defaults to true
  • disassociate-global-replication-group

    aws elasticache disassociate-global-replication-group \ --global-replication-group-id my global datastore \ --replication-group-id my secondary cluster \ --replication-group-region the AWS Region in which the secondary cluster resides
  • failover-global-replication-group

    aws elasticache failover-replication-group \ --global-replication-group-id my global datastore \ --primary-region The AWS Region of the primary cluster \ --primary-replication-group-id The name of the global datastore, including the suffix.
  • increase-node-groups-in-global-replication-group

    aws elasticache increase-node-groups-in-global-replication-group \ --apply-immediately yes \ --global-replication-group-id global-replication-group-name \ --node-group-count 3
  • decrease-node-groups-in-global-replication-group

    aws elasticache decrease-node-groups-in-global-replication-group \ --apply-immediately yes \ --global-replication-group-id global-replication-group-name \ --node-group-count 3
  • rebalance-shards-in-global-レプリケーショングループ

    aws elasticache rebalance-shards-in-global-replication-group \ --apply-immediately yes \ --global-replication-group-id global-replication-group-name

ヘルプを使用して、使用可能なすべてのコマンド ElastiCache (Redis OSS) を一覧表示します。

aws elasticache help

また、ヘルプを使用して、特定コマンドを記述したり、その用法の詳細を確認したりすることもできます。

aws elasticache create-global-replication-group help