Knowledge Center Monthly Newsletter - March 2025
Stay up to date with the latest from the Knowledge Center. See all new and updated Knowledge Center articles published in the last month and re:Post’s top contributors.
Amazon API Gateway の API キーに関連する使用状況を取得したいです。
以下の手順に従って、AWS マネジメントコンソールまたは AWS コマンドラインインターフェイス (AWS CLI) を使用して API キーの使用状況を取得します。
注: AWS CLI コマンドの実行中にエラーが発生した場合は、最新バージョンの AWS CLI を使用しているかどうかを確認してください。
詳細については、「API Gateway コンソールによる使用プランの作成、構成、テスト」を参照してください。
AWS CLI コマンド get-usage を使用して、次のような日付範囲の使用プランの使用状況データを取得できます。
aws apigateway get-usage --usage-plan-id <usage-plan-id> --start-date "20xx-xx-xx" --end-date "20xx-xx-xx" --key-id <api-key-id>
**注:**使用日の範囲は 90 日を超えることはできません。
詳細については、「API Gateway CLI と REST API を使用した使用プランの作成、構成、テスト」を参照してください。
API キーと使用プランのベストプラクティス