翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
Global Datastore の使用 (CLI)
AWS Command Line Interface (AWS CLI) を使用して、コマンドラインから複数の AWS サービスを制御し、スクリプトを使用して自動化できます。CLI AWS はアドホック (ワンタイム) オペレーションに使用できます。
のダウンロードと設定 AWS CLI
は Windows、macOS、または Linux で AWS CLI 実行されます。これをダウンロードして設定するには、次の手順に従います。
CLI をダウンロード、インストール、設定するには
-
AWS コマンドラインインターフェイス
ウェブページで AWS CLI をダウンロードします。 -
「 AWS Command Line Interface ユーザーガイド」の AWS 「 CLI のインストール」および AWS 「 CLI の設定」の手順に従います。
グローバルデータストアでの AWS CLI の使用
Global Datastore を操作するには、次の CLI オペレーションを使用します。
-
create-global-replication-group
aws elasticache create-global-replication-group \ --global-replication-group-id-suffixmy global datastore\ --primary-replication-group-idsample-repl-group\ --global-replication-group-descriptionan optional description of the global datastoreAmazon ElastiCache は、Global Datastore ID の作成時にプレフィックスを自動的に適用します。各 AWS リージョンには独自のプレフィックスがあります。例えば、米国西部 (北カルフォルニア) リージョンで作成された Global Datastore ID は、指定したサフィックス名と共に「virxk」で始まります。サフィックスは、自動生成されたプレフィックスと組み合わされて、複数のリージョンにまたがるグローバルデータストア名の一意性を保証します。
次の表に、各 AWS リージョンとそのグローバルデータストア ID プレフィックスを示します。
リージョン名/リージョン Prefix 米国東部 (オハイオ) リージョン
us-east-2fpkhr米国東部(バージニア州北部) リージョン
us-east-1ldgnfUS West (N. California) Region
us-west-1virxk米国西部 (オレゴン) リージョン
us-west-2sgauiカナダ (中部) リージョン
ca-central-1bxodzアジアパシフィック (ムンバイ) リージョン
ap-south-1erpgtアジアパシフィック (東京) リージョン
ap-northeast-1quwswアジアパシフィック (ソウル) リージョン
ap-northeast-2lfqnhアジアパシフィック(大阪)リージョン
ap-northeast-3nlapnアジアパシフィック (シンガポール) リージョン
ap-southeast-1vlqxnアジアパシフィック (シドニー) リージョン
ap-southeast-2vbgxd欧州 (フランクフルト) リージョン
eu-central-1iudkw欧州 (アイルランド) リージョン
eu-west-1gxeiz欧州 (ロンドン) リージョン
eu-west-2okuqmEU (パリ) リージョン
eu-west-3fgjhi南米 (サンパウロ) リージョン
sa-east-1juxlw中国 (北京) リージョン
cn-north-1emvgo中国 (寧夏) リージョン
cn-northwest-1ckbemアジアパシフィック (香港) リージョン
ap-east-1knjmpAWS GovCloud (米国西部)
us-gov-west-1sgwui -
[create-replication-group] – このオペレーションを使用して、Global Datastore の名前を
--global-replication-group-idパラメータに指定することで、Global Datastore のセカンダリクラスターを作成します。aws elasticache create-replication-group \ --replication-group-idsecondary replication group name\ --replication-group-description“Replication group description"\ --global-replication-group-idglobal datastore nameこのオペレーションを呼び出して
--global-replication-group-id値を渡す際、ElastiCache は、グローバルレプリケーショングループのプライマリレプリケーショングループから次のパラメータの値を推測します。これらのパラメータには値を渡さないでください。"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-idmy global datastore\ --show-member-infoan 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-idmy global datastore\ --automatic-failover-enabled \ --cache-node-typenode type\ --cache-parameter-group-nameparameter group name\ --engine-versionengine version\ -—apply-immediately \ --global-replication-group-descriptiondescriptionElastiCache GlobalDataStore の Redis OSS から Valkey へのクロスエンジンアップグレード
コンソール、API、または CLI を使用して、既存の Redis OSS グローバルレプリケーショングループを Valkey にアップグレードできます。
既存の Redis OSS グローバルレプリケーショングループがある場合は、modify-global-replication-group API で新しいエンジンとエンジンバージョンを指定することで、Valkey にアップグレードできます。
Linux、macOS、Unix の場合:
aws elasticache modify-global-replication-group \ --global-replication-group-id myGlobalReplGroup \ --engine valkey \ --apply-immediately \ --engine-version 8.0Windows の場合:
aws elasticache modify-global-replication-group ^ --global-replication-group-id myGlobalReplGroup ^ --engine valkey ^ --apply-immediately ^ --engine-version 8.0アップグレードする既存の Redis OSS グローバルレプリケーショングループに適用されたカスタムキャッシュパラメータグループがある場合は、リクエストでカスタムの Valkey キャッシュパラメータグループも渡す必要があります。入力された Valkey カスタムパラメータグループは、既存の Redis OSS カスタムパラメータグループと同じ Redis OSS 静的パラメータ値を持っている必要があります。
Linux、macOS、Unix の場合:
aws elasticache modify-global-replication-group \ --global-replication-group-id myGlobalReplGroup \ --engine valkey \ --engine-version 8.0 \ --apply-immediately \ --cache-parameter-group-name myParamGroupWindows の場合:
aws elasticache modify-global-replication-group ^ --global-replication-group-id myGlobalReplGroup ^ --engine valkey ^ --engine-version 8.0 ^ --apply-immediately ^ --cache-parameter-group-name myParamGroup -
delete-global-replication-group
aws elasticache delete-global-replication-group \ --global-replication-group-idmy global datastore\ --retain-primary-replication-groupdefaults to true -
disassociate-global-replication-group
aws elasticache disassociate-global-replication-group \ --global-replication-group-idmy global datastore\ --replication-group-idmy secondary cluster\ --replication-group-regionthe AWS Region in which the secondary cluster resides -
failover-global-replication-group
aws elasticache failover-replication-group \ --global-replication-group-idmy global datastore\ --primary-regionThe AWS Region of the primary cluster\ --primary-replication-group-idThe 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-immediatelyyes\ --global-replication-group-idglobal-replication-group-name\ --node-group-count3 -
decrease-node-groups-in-global-replication-group
aws elasticache decrease-node-groups-in-global-replication-group \ --apply-immediatelyyes\ --global-replication-group-idglobal-replication-group-name\ --node-group-count3 -
rebalance-shards-in-global-replication-group
aws elasticache rebalance-shards-in-global-replication-group \ --apply-immediatelyyes\ --global-replication-group-idglobal-replication-group-name
ヘルプを使用して、ElastiCache for Valkey または Redis OSS で使用できるすべてのコマンドを一覧表示します。
aws elasticache help
また、ヘルプを使用して、特定コマンドを記述したり、その用法の詳細を確認したりすることもできます。
aws elasticache create-global-replication-group help