LoginSignup
29
9

AWS CLI Command Reference(amplify)の逆引きシート作ってみた

Posted at

1. 新しいAmplifyアプリを作成したい

CLIコマンド

command
create-app

サンプルコード

command
aws amplify create-app --name <hoge> --repository <fuga> --platform <bar>

2. Amplifyアプリの新しいバックエンド環境を作成したい

CLIコマンド

command
create-backend-environment

サンプルコード

command
aws amplify create-backend-environment --app-id <hoge> --environment-name <fuga> --stack-name <bar>

3. Amplifyアプリの新しいブランチを作成したい

CLIコマンド

shell
create-branch

サンプルコード

shell
aws amplify create-branch --app-id <hoge> --branch-name <fuga> --stage <bar>

4. 手動でデプロイされたAmplifyアプリのデプロイメントを作成したい

CLIコマンド

shell
create-deployment

サンプルコード

shell
aws amplify create-deployment --app-id <hoge> --branch-name <fuga> --file-map <bar>

5. カスタムドメインをAmplifyアプリに関連付けしたい

CLIコマンド

shell
create-domain-association

サンプルコード

shell
aws amplify create-domain-association --app-id <hoge> --domain-name <fuga> --sub-domain-settings <bar>

6. Amplifyアプリに新しいWebhookを作成したい

CLIコマンド

shell
create-webhook

サンプルコード

shell
aws amplify create-webhook --app-id <hoge> --branch-name <fuga> --description <bar>

7. アプリIDで指定された既存のAmplifyアプリを削除したい

CLIコマンド

shell
delete-app

サンプルコード

shell
aws amplify delete-app --app-id <hoge>

8. Amplifyアプリのバックエンド環境を削除したい

CLIコマンド

shell
delete-backend-environment

サンプルコード

shell
aws amplify delete-backend-environment --app-id <hoge> --environment-name <fuga>

9. Amplifyアプリのブランチを削除したい

CLIコマンド

shell
delete-branch

サンプルコード

shell
aws amplify delete-branch --app-id <hoge> --branch-name <fuga>

10. Amplifyアプリのドメインの関連付けを削除したい

CLIコマンド

shell
delete-domain-association

サンプルコード

shell
aws amplify delete-domain-association --app-id <hoge> --domain-name <fuga>

11. Amplifyアプリのブランチのジョブを削除したい

CLIコマンド

shell
delete-job

サンプルコード

shell
aws amplify delete-job --app-id <hoge> --branch-name <fuga> --job-id <bar>

12. Webhookを削除したい

CLIコマンド

shell
delete-webhook

サンプルコード

shell
aws amplify delete-webhook --webhook-id <hoge>

13. 指定された時間範囲のウェブサイトのアクセスログを返したい

CLIコマンド

shell
generate-access-logs

サンプルコード

shell
aws amplify generate-access-logs --app-id <hoge> --domain-name <fuga> --start-time <bar> --end-time <baz>

14. アプリIDで指定された既存のAmplifyアプリを取得したい

CLIコマンド

shell
get-app

サンプルコード

shell
aws amplify get-app --app-id <hoge>

15. アーティファクトIDに対応するアーティファクト情報を取得したい

CLIコマンド

shell
get-artifact-url

サンプルコード

shell
aws amplify get-artifact-url --artifact-id <hoge>

16. Amplifyアプリのバックエンド環境を取得したい

CLIコマンド

shell
get-backend-environment

サンプルコード

shell
aws amplify get-backend-environment --app-id <hoge> --environment-name <fuga>

17. Amplifyアプリのブランチを取得したい

CLIコマンド

shell
get-branch

サンプルコード

shell
aws amplify get-branch --app-id <hoge> --branch-name <fuga>

18. Amplifyアプリのドメイン情報を取得したい

CLIコマンド

shell
get-domain-association

サンプルコード

shell
aws amplify get-domain-association --app-id <hoge> --domain-name <fuga>

19. Amplifyアプリのブランチのジョブを取得したい

CLIコマンド

shell
get-job

サンプルコード

shell
aws amplify get-job --app-id <hoge> --branch-name <fuga> --job-id <bar>

20. 指定したwebhookIDに対応するwebhook情報を取得したい

CLIコマンド

shell
get-webhook

サンプルコード

shell
aws amplify get-webhook --webhook-id <hoge>

21. 既存のAmplifyアプリのリストを取得したい

CLIコマンド

shell
list-apps

サンプルコード

shell
aws amplify list-apps

22. 指定したアプリ・ブランチ・ジョブのリストを取得したい

CLIコマンド

shell
list-artifacts

サンプルコード

shell
aws amplify list-artifacts --app-id <hoge> --branch-name <fuga>

23. Amplifyアプリのバックエンド環境を一覧表示したい

CLIコマンド

shell
list-backend-environments

サンプルコード

shell
aws amplify list-backend-environments --app-id <hoge>

24. Amplifyアプリのブランチを一覧表示したい

CLIコマンド

shell
list-branches

サンプルコード

shell
aws amplify list-branches --app-id <hoge>

25. Amplifyアプリのドメインの関連付けを返したい

CLIコマンド

shell
list-domain-associations

サンプルコード

shell
aws amplify list-domain-associations --app-id <hoge>

26. Amplifyアプリのブランチのジョブを一覧表示したい

CLIコマンド

shell
list-jobs

サンプルコード

shell
aws amplify list-jobs --app-id <hoge> --branch-name <fuga>

27. 指定されたAmazon Resource Name (ARN)のタグのリストを表示したい

CLIコマンド

shell
list-tags-for-resource

サンプルコード

shell
aws amplify list-tags-for-resource --resource-arn <hoge>

28. Amplifyアプリのwebhookのリストを表示したい

CLIコマンド

shell
list-webhooks

サンプルコード

shell
aws amplify list-webhooks --app-id <hoge>

29. 手動でデプロイされたアプリのデプロイを開始したい

CLIコマンド

shell
start-deployment

サンプルコード

shell
aws amplify start-deployment --app-id <hoge> --branch-name <fuga> --source-url <bar>

30. Amplifyアプリのブランチに新しいジョブを開始したい

CLIコマンド

shell
start-job

サンプルコード

shell
aws amplify start-job --app-id <hoge> --branch-name <fuga> --job-type <bar>

31. Amplifyアプリのブランチで進行中のジョブを停止したい

CLIコマンド

shell
stop-job

サンプルコード

shell
aws amplify stop-job --app-id <hoge> --branch-name <fuga> --job-id <bar>

32. リソースにタグのキーと値を付けたい

CLIコマンド

shell
tag-resource

サンプルコード

shell
aws amplify tag-resource --resource-arn <hoge> --tags <fuga>

33. 指定されたAmazon Resource Name(ARN)を持つリソースへのタグ付けを解除したい

CLIコマンド

shell
untag-resource

サンプルコード

shell
aws amplify untag-resource --resource-arn <hoge> --tag-keys <fuga>

34. 既存のAmplifyアプリを更新したい

CLIコマンド

shell
update-app

サンプルコード

shell
aws amplify update-app --app-id <hoge> --name <fuga> --platform <bar>

35. Amplifyアプリのブランチを更新したい

CLIコマンド

shell
update-branch

サンプルコード

shell
aws amplify update-branch --app-id <hoge> --branch-name <fuga> --description <bar>

36. Amplifyアプリの新しいドメイン関連付けを作成したい

CLIコマンド

shell
update-domain-association

サンプルコード

shell
aws amplify update-domain-association --app-id <hoge> --domain-name <fuga> --sub-domain-settings <bar>

37. Amplifyアプリケーションに関連付けられたWebhookを更新したい

CLIコマンド

shell
update-webhook

サンプルコード

shell
aws amplify update-webhook --webhook-id <webhook-id> --branch-name <branch-name> --description "Updated webhook"

さいごに

各CLIコマンドの「オプション」の説明まで記載ができておりません。
オプションの内容も知りたい!って方は各項目のリンク先にある「Options」に詳細が書かれています。
そちらもご覧いただければと思います。
最後までご覧いただきありがとうございました!

29
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
29
9