Untuk menggunakan App Optimize API, Anda harus mengaktifkannya di Google Cloud project tempat Anda ingin membuat dan mengelola resource laporan penggunaan dan biaya. Anda dapat mengaktifkan API menggunakan Google Cloud konsol atau Google Cloud CLI.
Sebelum memulai
- Login keakun Anda. Google Cloud Jika Anda baru menggunakan Google Cloud, buat akun untuk mengevaluasi performa produk kami dalam skenario dunia nyata. Pelanggan baru juga mendapatkan kredit gratis senilai $300 untuk menjalankan, menguji, dan men-deploy workload.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Mengaktifkan API
Untuk mengaktifkan App Optimize API, ikuti salah satu kumpulan petunjuk berikut:
Konsol
Di Google Cloud konsol, buka API Library.
Jika diminta, pilih Google Cloud project Anda.
Di halaman App Optimize API, klik Enable.
gcloud
- Instal dan lakukan inisialisasi Google Cloud CLI.
Untuk mengaktifkan App Optimize API, jalankan perintah berikut:
gcloud services enable appoptimize.googleapis.com --project=PROJECT_IDGanti
PROJECT_IDdengan Google Cloud project IDAnda.
Memastikan API sudah diaktifkan
Untuk memeriksa apakah App Optimize API diaktifkan, ikuti salah satu kumpulan petunjuk berikut:
Konsol
Di Google Cloud konsol, buka halaman Enabled APIs & services.
Dalam daftar, temukan dan pastikan App Optimize API tercantum.
gcloud
Jalankan perintah berikut:
gcloud services list --enabled --project=PROJECT_ID --filter="NAME:appoptimize.googleapis.com"Jika API diaktifkan, outputnya akan mencakup:
NAME TITLE appoptimize.googleapis.com App Optimize API
Langkah berikutnya
- Panduan memulai: Membuat dan membaca laporan
- Menyiapkan autentikasi
- Kontrol akses dengan IAM
- Ringkasan App Optimize API