【ACE】練習問題017

この記事は約4分で読めます。
スポンサーリンク

問題6: Cloud Pub/Subの設定

あなたはCloud Pub/Subのトピックを作成し、そのトピックにサブスクリプションを追加する必要があります。最初にトピックを作成するための適切なコマンドはどれですか?

A. gcloud pubsub topics add my-topic
B. gcloud pubsub topics new my-topic
C. gcloud pubsub topics create my-topic
D. gcloud pubsub topics generate my-topic

問題7: Compute Engineインスタンスのデータディスク追加

既存のCompute Engineインスタンスに新しいデータディスクを追加するためのコマンドはどれですか?

A. gcloud compute instances attach-disk [INSTANCE_NAME] –disk [DISK_NAME]
B. gcloud compute instances add-disk [INSTANCE_NAME] –disk [DISK_NAME]
C. gcloud compute instances mount-disk [INSTANCE_NAME] –disk [DISK_NAME]
D. gcloud compute instances link-disk [INSTANCE_NAME] –disk [DISK_NAME]

問題8: Cloud Functionsのデプロイ

Node.jsランタイムで動作するCloud Functionをデプロイするためのコマンドはどれですか?関数名は「helloWorld」、エントリーポイントは「helloWorldFunction」、トリガーはHTTPです。

A. gcloud functions deploy helloWorld –runtime nodejs10 –trigger-http –entry-point helloWorldFunction
B. gcloud functions deploy helloWorld –runtime nodejs10 –trigger-http –handler helloWorldFunction
C. gcloud functions create helloWorld –runtime nodejs10 –trigger-http –entry-point helloWorldFunction
D. gcloud functions create helloWorld –runtime nodejs10 –trigger-http –handler helloWorldFunction

問題9: IAMポリシーのバインド

プロジェクトの特定のメンバーにViewerロールを付与するための適切なコマンドはどれですか?メンバーは「user@example.com」です。

A. gcloud projects add-iam-policy-binding [PROJECT_ID] –member user@example.com –role roles/viewer
B. gcloud projects set-iam-policy [PROJECT_ID] –member user@example.com –role roles/viewer
C. gcloud projects add-iam-role [PROJECT_ID] –member user@example.com –role roles/viewer
D. gcloud projects set-iam-binding [PROJECT_ID] –member user@example.com –role roles/viewer

問題10: Cloud SQLインスタンスのバックアップ

Cloud SQLインスタンスのバックアップをスケジュールするための設定はどの項目で行いますか?

A. コンソールのインスタンス設定でバックアップオプションを有効にする
B. Cloud SQL APIを使用してバックアップスケジュールを設定する
C. gcloud sql instances create-backup [INSTANCE_NAME] コマンドを使用する
D. gcloud sql backups create [INSTANCE_NAME] コマンドを使用する

答え

  1. C. gcloud pubsub topics create my-topic
  2. A. gcloud compute instances attach-disk [INSTANCE_NAME] –disk [DISK_NAME]
  3. A. gcloud functions deploy helloWorld –runtime nodejs10 –trigger-http –entry-point helloWorldFunction
  4. A. gcloud projects add-iam-policy-binding [PROJECT_ID] –member user@example.com –role roles/viewer
  5. A. コンソールのインスタンス設定でバックアップオプションを有効にする
スポンサーリンク