このページでは、バケット IP フィルタリング ルールのリストを表示する方法について説明します。バケット IP フィルタリング ルールのリストを表示する(list bucket IP filtering rules)オペレーションを使用すると、バケットで IP フィルタリングが有効になっているかどうかを確認できます。許可されている特定のネットワーク ソースに関する情報を表示する必要がある場合は、バケット IP フィルタリング ルールを取得するオペレーションを使用します。
必要なロール
バケット IP フィルタリング ルールのリストを表示するために必要な権限を取得するには、バケットに対するストレージ管理者(roles/storage.admin)ロールを付与するよう管理者に依頼してください。このロールには、バケット IP フィルタリング ルールのリストを表示するために必要な storage.buckets.list 権限が含まれています。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-05 UTC。"],[],[],null,["# List bucket IP filtering rules\n\nThis page describes how to list the [bucket IP filtering](/storage/docs/ip-filtering-overview) rules. With the list bucket IP filtering rules operation, you can check if IP filtering is enabled or disabled on a bucket. If you need to view information about the specific network sources that are allowed, use the [Get bucket IP filtering rules](/storage/docs/get-ip-filter) operation.\n\nRequired roles\n--------------\n\nTo get the required permissions for listing the bucket IP filtering rules, ask your administrator to grant you the Storage Admin (`roles/storage.admin`)\nrole on the bucket. This role contains the `storage.buckets.list` permission required to list bucket IP filtering rules.\n\nYou can also get this permission with [custom roles](/iam/docs/creating-custom-roles). You might be able to get this permission with other predefined roles as well. To see which roles are associated with which permissions,\nrefer to [IAM roles for Cloud Storage](/iam/docs/understanding-roles).\n\nFor instructions on granting roles for projects, see [Manage access to\nprojects](/iam/docs/granting-changing-revoking-access).\n\nList bucket IP filtering rules\n------------------------------\n\n### gcloud\n\n1. Verify that you have the Google Cloud CLI version 526.0.0 or later installed:\n\n gcloud version | head -n1\n\n2. If you have an earlier gcloud CLI version installed, update the version:\n\n gcloud components update --version=526.0.0\n\n3. To list the bucket IP filtering rules, run the command [`gcloud\n alpha storage buckets describe`](/sdk/gcloud/reference/alpha/storage/buckets/describe) in your development\n environment:\n\n ```\n gcloud alpha storage buckets describe gs://BUCKET_NAME --format=\"default(ip_filter_config)\"\n ```\n\n Where:\n\n \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e is the name of your bucket. For example, `my-bucket`.\n\n### REST APIs\n\n### JSON API\n\n1. Have gcloud CLI [installed and initialized](/sdk/docs/install), which lets\n you generate an access token for the `Authorization` header.\n\n\n2.\n\n Use [`cURL`](http://curl.haxx.se/) to call the [JSON API](/storage/docs/json_api) with a [`List` bucket](/storage/docs/json_api/v1/buckets/list) request: \n\n ```\n curl -X GET \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n \"https://storage.googleapis.com/storage/v1/b?PROJECT_ID\"\n ```\n\n Where:\n\n \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the ID or number of the project containing the buckets you want to list. For example, `my-project`.\n\n The response looks like the following example: \n\n ```json\n {\n \"kind\": \"storage#buckets\",\n \"items\":\n {\n \"kind\": \"storage#bucket\",\n \"selfLink\": \"https://www.googleapis.com/storage/v1/b/my-bucket1\",\n \"id\": \"my-bucket1\",\n \"name\": \"my-bucket1\",\n \"projectNumber\": \"123456789012\",\n ...\n },\n \"ipFilter\": {\n \"mode\": \"Disabled\"\n }\n {\n \"kind\": \"storage#bucket\",\n \"selfLink\": \"https://www.googleapis.com/storage/v1/b/my-bucket2\",\n \"id\": \"my-bucket2\",\n \"name\": \"my-bucket2\",\n \"projectNumber\": \"123456789013\",\n ...\n },\n \"ipFilter\": {\n \"mode\": \"Enabled\"\n }\n },\n ```\n\nWhat's next\n-----------\n\n- [Create or update IP filtering rules on an existing bucket](/storage/docs/update-ip-filter).\n- [Get bucket IP filtering rules](/storage/docs/get-ip-filter).\n- [Disable bucket IP filtering rules](/storage/docs/disable-ip-filtering).\n\nTry it for yourself\n-------------------\n\n\nIf you're new to Google Cloud, create an account to evaluate how\nCloud Storage performs in real-world\nscenarios. New customers also get $300 in free credits to run, test, and\ndeploy workloads.\n[Try Cloud Storage free](https://console.cloud.google.com/freetrial)"]]