Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Ringkasan akses API API Gateway
Halaman ini menjelaskan opsi kontrol akses API yang tersedia untuk Anda di API Gateway.
Ringkasan
API Gateway menggunakan Identity and Access Management (IAM) untuk mengontrol akses ke API Anda. Anda dapat memberikan akses ke API di level project dan di level konsumen layanan. Misalnya,
Anda dapat:
Berikan akses kepada pengguna API Anda agar mereka dapat mengaktifkan API Anda di projectGoogle Cloud mereka sendiri.
Mengizinkan akun utama untuk melihat semua resource API Gateway.
Mengizinkan akun utama membuat, memperbarui, atau menghapus resource API Gateway.
Peran yang mengontrol akses ke layanan dan resource
Anda dapat melihat dan memberikan peran menggunakan panel izin di halaman detail API Gateway >
API atau Gateway di Google Cloud konsol. Peran juga dapat diberikan menggunakan API, atau dengan Google Cloud CLI.
Nama peran IAM
Jabatan Peran
Deskripsi
roles/servicemanagement.serviceConsumer
Pelanggan Layanan
Izin untuk Akun Google, grup Google, atau akun layanan untuk melihat
dan mengaktifkan API di project mereka sendiri. Lihat
topik Kontrol akses Service Management API untuk mengetahui informasi tentang peran ini.
roles/apigateway.viewer
API Gateway Viewer
Akses baca saja ke gateway API dan resource terkait. Peran ini mencakup izin untuk mendapatkan dan membuat daftar API, konfigurasi API, gateway, dan lokasi.
roles/apigateway.admin
Admin API Gateway
Akses penuh ke API gateway dan resource terkait. Peran ini mencakup izin untuk mendapatkan, membuat, memperbarui, dan menghapus API, konfigurasi API, gateway, dan lokasi.
Izin dan peran API Gateway
Tabel berikut mencantumkan peran tingkat project yang memberikan akses ke resource API Gateway dan izin terkaitnya:
Semua izin yang disertakan dalam peran API Gateway Viewer, ditambah:
apigateway.apiconfigs.create
apigateway.apiconfigs.delete
apigateway.apiconfigs.setIamPolicy
apigateway.apiconfigs.update
apigateway.apis.create
apigateway.apis.delete
apigateway.apis.setIamPolicy
apigateway.apis.update
apigateway.gateways.create
apigateway.gateways.delete
apigateway.gateways.setIamPolicy
apigateway.gateways.update
apigateway.operations.cancel
apigateway.operations.delete
Peran khusus
Jika peran dasar atau yang telah ditetapkan tidak memenuhi kebutuhan spesifik Anda, API Gateway mendukung penggunaan peran khusus. Anda dapat menggunakan IAM untuk membuat peran khusus untuk API Gateway.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-03 UTC."],[[["\u003cp\u003eAPI Gateway uses Identity and Access Management (IAM) to control access to APIs, allowing you to grant access at both the project and service consumer levels.\u003c/p\u003e\n"],["\u003cp\u003eThe Service Consumer role permits users to view and enable an API within their own projects.\u003c/p\u003e\n"],["\u003cp\u003eThe API Gateway Viewer role provides read-only access to API gateways and their associated resources, while the API Gateway Admin role grants full access to manage these resources.\u003c/p\u003e\n"],["\u003cp\u003eCustom roles can be created via IAM for more granular control over API Gateway permissions, if the provided roles do not meet your specific needs.\u003c/p\u003e\n"]]],[],null,["# API Gateway API access overview\n===============================\n\nThis page describes the API access control options available to you in API Gateway.\n\nOverview\n--------\n\nAPI Gateway uses\n[Identity and Access Management (IAM)](/iam/docs)\nto control access to your API. You can grant access to your API at the project\nlevel and at the service consumer level. For example,\nyou can:\n\n- Grant access to your API users so they can enable your API in their own Google Cloud project.\n- Allow principals to view all API Gateway resources.\n- Allow principals to create, update, or delete API Gateway resources.\n\nRoles that control access to services and resources\n---------------------------------------------------\n\nYou can view and grant roles using the permissions panel on the **API Gateway** \\\u003e\n**APIs** or **Gateways** detail pages in the Google Cloud console. Roles can also be granted\nusing the API, or with the Google Cloud CLI.\n\n| **Note:** Although you can grant other roles at the service level, we recommend that you use the roles listed in the previous table to manage your API.\n\nAPI Gateway permissions and roles\n---------------------------------\n\nThe following table lists the project-level roles that grant access to API Gateway resources and their associated permissions:\n\n| **Note:** To view pages in the Google Cloud console, you must grant users the **API Gateway Viewer** role or a higher role at the project level.\n\nCustom roles\n------------\n\nIf basic or predefined roles do not meet your specific needs, API Gateway supports the use of custom roles. You can use IAM to create [custom roles](/iam/docs/creating-custom-roles) for API Gateway."]]