Skip to content

Latest commit

 

History

History
116 lines (73 loc) · 4.8 KB

README.ja.md

File metadata and controls

116 lines (73 loc) · 4.8 KB

他言語バージョンもあります: EnglishPortuguês


クイックスタート

Linux のインストールマニュアルはこちら、Windows のインストールマニュアルはこちらを参照してください。

# インストール
brew tap momentohq/tap
brew install momento-cli

# サインアップ [available regions are us-west-2, us-east-1, ap-south-1, ap-northeast-1, eu-west-1]
momento account signup aws --email <TYPE_YOUR_EMAIL_HERE> --region <TYPE_DESIRED_REGION>

# 上記のメールアドレスに送付されたトークンとデフォルトのキャッシュ名とTTLであなたのアカウントコンフィグ
momento configure --quick

# キャッシュ作成
momento cache create example-cache

# キャッシュからSet・Getでバリューを取得
momento cache set key value --ttl 100 --cache example-cache
momento cache get key --cache example-cache

インストール

Linux

  1. 最新の linux tar.gz ファイルをhttps://github.com/momentohq/momento-cli/releases/latestからダウンロードする。
  2. tar -xvf momento-cli-X.X.X.linux_x86_64.tar.gzファイルを展開する。
  3. ./momentoを実行パスに置く。

Windows

  1. 最新の windows zip ファイルをhttps://github.com/momentohq/momento-cli/releases/latestからダウンロードする。
  2. momento-cli-X.X.X.windows_x86_64.zipファイルを展開する。
  3. 展開した.exe file を実行する。

アップグレード

brew update momento-cli
brew upgrade momento-cli

サインアップ方法

注意: サインアップ中にエラーが発生した場合は、CLI のバージョンを最新バージョンに更新して下さい。

# デフォルトのリージョンはus-west-2です
momento account signup aws --email <ご自身のメールアドレス>

# (オプション) help機能を使って、利用可能なリージョンを確認し、サインアップの際に特定のリージョンを選択して下さい。
momento account signup --help
momento account signup --email <ご自身のメールアドレス> --region <ご希望のリージョン>

上記のコマンドはアクセストークンを発行し、提供していただいたメールアドレスに送付します。こちらのトークンは独自にキャッシュインタラクションを識別します。トークンはセンシティブなパスワードの様に扱ってください。また、秘密を確信するため全ての必要不可欠な対応をお願いします。AWS Secrets Manager の様なシークレット管理サービスにトークンを保管する事をお勧めします。

コンフィグ

初回コンフィグ


momento configure

上記コマンドは Momento オーストークン、デフォルトのキャッシュ名、デフォルトの TTL の入力を要求します。入力後、トークンは保存され、あなたの”デフォルト”プロファイルとして使用されます。

momento configure --profile new-profile

上記コマンドも Momento オーストークン、デフォルトのキャッシュ名、デフォルトの TTL の入力を要求します。入力後、トークンは保存され、あなたの”new-profile”プロファイルとして使用されます。


既存のコンフィグをアップデート

ご希望のプロファイルをアップデートするには、上記と同様のコマンドをご使用ください。

CLI 使用方法

# デフォルトプロファイルが使用される
momento cache create example-cache
momento cache set key value --ttl 100 --cache example-cache
momento cache get key --cache example-cache

ご希望のプロファイルを指定する事もできます。

# new-profileが使用される
momento cache create example-cache --profile new-profile
momento cache set key value --ttl 100 --cache example-cache --profile new-profile
momento cache get key --cache example-cache --profile new-profile

ご自身のプロジェクト内での Momento 使用方法

ご自身のプロジェクトに Momento をインテグレートする際には、ぜひ私達のSDKを確認してください!

Momento CLI リポジトリへの貢献について

もし Momento CLI リポジトリへの貢献に興味がありましたら、こちらの貢献ガイドのご参考をお願いします。