This page describes how to get the IP filtering rules on a bucket. For information about bucket IP filtering, see Bucket IP filtering .
Required roles
To get the required permissions for getting the IP filtering rules on a bucket, ask your administrator to grant you the Storage Admin ( roles/storage.admin 
)
role on the bucket. This role contains the permissions required to get bucket IP filtering rules.
To see the exact permissions that are required, expand the Required permissionssection:
Required permissions
-  storage.buckets.get
-  storage.buckets.getIpFilter
You can also get these permissions with custom roles . You might be able to get these permissions with other predefined roles as well. To see which roles are associated with which permissions, refer to IAM roles for Cloud Storage .
For instructions on granting roles for projects, see Manage access to projects .
Get bucket IP filtering rules
gcloud
-  Verify that you have the Google Cloud CLI version 526.0.0 or later installed: gcloud version | head -n1
-  If you have an earlier gcloud CLI version installed, update the version: gcloud components update --version=526.0.0
-  To get the IP filtering rules on a bucket, run the command gcloud alpha storage buckets describein your development environment:gcloud alpha storage buckets describe gs:// BUCKET_NAME --format="default(ip_filter_config)" Where: BUCKET_NAMEis the name of your bucket. For example,my-bucket.
REST APIs
JSON API
-  Have gcloud CLI installed and initialized , which lets you generate an access token for the Authorizationheader.
-  Use cURLto call the JSON API with aGETbucket request:curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://storage.googleapis.com/storage/v1/b/ BUCKET_NAME " Where: BUCKET_NAMEis the name of your bucket. For example,my-bucket.
What's next
- Create or update IP filtering rules on an existing bucket .
- List bucket IP filtering rules .
- Disable bucket IP filtering rules .
Try it for yourself
If you're new to Google Cloud, create an account to evaluate how Cloud Storage performs in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
Try Cloud Storage free
