- NAME
-
- gcloud spanner instances add-iam-policy-binding - add IAM policy binding to a Cloud Spanner instance
- SYNOPSIS
-
-
gcloud spanner instances add-iam-policy-binding[ INSTANCE]--member=MEMBER--role=ROLE[ GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
- Add an IAM policy binding to a Cloud Spanner instance.
- POSITIONAL ARGUMENTS
-
-
Instance resource - The Cloud Spanner instance to which to add the IAM policy
binding. This represents a Cloud resource. (NOTE) Some attributes are not given
arguments in this group but can be set in other ways. To set the [project]
attribute: provide the argument [instance] on the command line with a fully
specified name; set the property [spanner/instance] with a fully specified name;
set the property [core/project]; provide the argument [--project] on the command
line.
- [
INSTANCE] - ID of the instance or fully qualified identifier for the instance.
- [
-
Instance resource - The Cloud Spanner instance to which to add the IAM policy
binding. This represents a Cloud resource. (NOTE) Some attributes are not given
arguments in this group but can be set in other ways. To set the [project]
attribute: provide the argument [instance] on the command line with a fully
specified name; set the property [spanner/instance] with a fully specified name;
set the property [core/project]; provide the argument [--project] on the command
line.
- REQUIRED FLAGS
-
--member=MEMBER-
The member to add the binding for. Should be of the form
user|group|serviceAccount:emailordomain:domain.Examples:
user:test-user@gmail.com,group:admins@example.com,serviceAccount:test123@example.domain.com, ordomain:example.domain.com.Can also be one of the following special values:
-
allUsers- Special identifier that represents anyone who is on the internet, with or without a Google account. -
allAuthenticatedUsers- Special identifier that represents anyone who is authenticated with a Google account or a service account.
-
--role=ROLE- Define the role of the member.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands: --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account,
--log-http, --project, --quiet, --trace-token, --user-output-enabled,
--verbosity. Run
$ gcloud helpfor details. - API REFERENCE
-
This command uses the
spanner/v1API. The full documentation for this API can be found at: https://cloud.google.com/spanner/ - EXAMPLES
-
To add an IAM policy binding for the role of 'roles/editor' for the user
'test-user@gmail.com' with instance 'my-instance', run:
$ gcloud spanner instances add-iam-policy-binding my-instance \ --member='user:test-user@gmail.com' --role='roles/editor'
See https://cloud.google.com/iam/docs/managing-policies for details of policy role and member types.
- NOTES
-
These variants are also available:
$ gcloud alpha spanner instances add-iam-policy-binding $ gcloud beta spanner instances add-iam-policy-binding
- Cloud SDK
- Product Overview
- Documentation
- gcloud CLI Overview
- Quickstarts
- All Quickstarts
- For Linux
- For Debian and Ubuntu
- For Red Hat and CentOS
- For macOS
- For Windows
- How-to Guides
- All How-to Guides
- Installing the SDK
- Setting up the SDK
- Managing SDK Components
- Scripting gcloud CLI Commands
- Enabling accessibility features
- Using gcloud Interactive Shell
- APIs & Reference
- gcloud Reference
- Overview
- gcloud access-context-manager
- gcloud ai-platform
- gcloud alpha
- Overview
- access-context-manager
- ai-platform
- app
- asset
- auth
- bigtable
- billing
- bq
- builds
- cloud-shell
- composer
- compute
- Overview
- accelerator-types
- addresses
- backend-buckets
- backend-services
- commitments
- config-ssh
- connect-to-serial-port
- copy-files
- disk-types
- disks
- external-vpn-gateways
- firewall-rules
- forwarding-rules
- health-checks
- http-health-checks
- https-health-checks
- images
- instance-groups
- Overview
- describe
- get-named-ports
- list
- list-instances
- managed
- Overview
- abandon-instances
- create
- create-instance
- delete
- delete-instances
- describe
- export-autoscaling
- get-named-ports
- instance-configs
- list
- list-instances
- recreate-instances
- resize
- rolling-action
- set-autohealing
- set-autoscaling
- set-instance-template
- set-named-ports
- set-target-pools
- stop-autoscaling
- update
- update-autoscaling
- update-instances
- wait-until
- wait-until-stable
- set-named-ports
- unmanaged
- instance-templates
- instances
- Overview
- add-access-config
- add-iam-policy-binding
- add-labels
- add-metadata
- add-resource-policies
- add-tags
- attach-disk
- create
- create-with-container
- delete
- delete-access-config
- describe
- detach-disk
- get-guest-attributes
- get-iam-policy
- get-serial-port-output
- get-shielded-identity
- import
- list
- move
- network-interfaces
- os-inventory
- remove-iam-policy-binding
- remove-labels
- remove-metadata
- remove-resource-policies
- remove-tags
- reset
- resume
- set-disk-auto-delete
- set-iam-policy
- set-machine-type
- set-min-cpu-platform
- set-scheduling
- set-scopes
- simulate-maintenance-event
- start
- stop
- suspend
- tail-serial-port-output
- update
- update-access-config
- update-container
- interconnects
- machine-images
- machine-types
- network-endpoint-groups
- networks
- operations
- os-config
- os-login
- project-info
- regions
- reservations
- reset-windows-password
- resource-policies
- routers
- routes
- scp
- security-policies
- shared-vpc
- Overview
- associated-projects
- disable
- enable
- get-host-project
- list-associated-resources
- organizations
- sign-url
- snapshots
- sole-tenancy
- ssh
- ssl-certificates
- ssl-policies
- start-iap-tunnel
- target-http-proxies
- target-https-proxies
- target-instances
- target-pools
- target-ssl-proxies
- target-tcp-proxies
- target-vpn-gateways
- tpus
- url-maps
- vpn-gateways
- vpn-tunnels
- zones
- config
- container
- Overview
- binauthz
- Overview
- attestations
- attestors
- create-signature-payload
- policy
- clusters
- get-server-config
- hub
- images
- memberships
- node-pools
- operations
- subnets
- data-catalog
- dataflow
- dataproc
- Overview
- autoscaling-policies
- clusters
- jobs
- operations
- workflow-templates
- datastore
- deployment-manager
- dialogflow
- dlp
- domains
- emulators
- endpoints
- filestore
- firebase
- firestore
- functions
- genomics
- healthcare
- Overview
- annotation-stores
- datasets
- dicom-stores
- fhir-stores
- hl7v2-stores
- operations
- help
- iam
- Overview
- list-grantable-roles
- list-testable-permissions
- policies
- roles
- service-accounts
- iap
- init
- interactive
- iot
- Overview
- devices
- registries
- kms
- Overview
- asymmetric-decrypt
- asymmetric-sign
- decrypt
- encrypt
- keyrings
- keys
- locations
- logging
- ml
- ml-engine
- monitoring
- organizations
- projects
- pubsub
- Overview
- snapshots
- subscriptions
- topics
- redis
- remote-build-execution
- resource-manager
- resources
- run
- scc
- scheduler
- search-help
- services
- source
- spanner
- Overview
- databases
- instance-configs
- instances
- operations
- rows
- sql
- survey
- tasks
- web-security-scanner
- gcloud app
- gcloud asset
- gcloud auth
- gcloud beta
- Overview
- access-context-manager
- ai-platform
- app
- Overview
- browse
- create
- deploy
- describe
- domain-mappings
- firewall-rules
- gen-config
- instances
- logs
- migrate-config
- open-console
- operations
- regions
- repair
- services
- ssl-certificates
- update
- versions
- asset
- auth
- bigtable
- billing
- builds
- composer
- compute
- Overview
- accelerator-types
- addresses
- backend-buckets
- backend-services
- commitments
- config-ssh
- connect-to-serial-port
- copy-files
- disk-types
- disks
- external-vpn-gateways
- firewall-rules
- forwarding-rules
- health-checks
- http-health-checks
- https-health-checks
- images
- instance-groups
- Overview
- describe
- get-named-ports
- list
- list-instances
- managed
- set-named-ports
- unmanaged
- instance-templates
- instances
- Overview
- add-access-config
- add-iam-policy-binding
- add-labels
- add-metadata
- add-tags
- attach-disk
- create
- create-with-container
- delete
- delete-access-config
- describe
- detach-disk
- get-guest-attributes
- get-iam-policy
- get-serial-port-output
- get-shielded-identity
- list
- move
- network-interfaces
- os-inventory
- remove-iam-policy-binding
- remove-labels
- remove-metadata
- remove-tags
- reset
- set-disk-auto-delete
- set-iam-policy
- set-machine-type
- set-scheduling
- set-scopes
- simulate-maintenance-event
- start
- stop
- tail-serial-port-output
- update
- update-access-config
- update-container
- interconnects
- machine-types
- network-endpoint-groups
- networks
- operations
- os-login
- project-info
- regions
- reservations
- reset-windows-password
- resource-policies
- routers
- routes
- scp
- security-policies
- shared-vpc
- Overview
- associated-projects
- disable
- enable
- get-host-project
- list-associated-resources
- organizations
- sign-url
- snapshots
- sole-tenancy
- ssh
- ssl-certificates
- ssl-policies
- start-iap-tunnel
- target-http-proxies
- target-https-proxies
- target-instances
- target-pools
- target-ssl-proxies
- target-tcp-proxies
- target-vpn-gateways
- tpus
- url-maps
- vpn-gateways
- vpn-tunnels
- zones
- config
- container
- Overview
- binauthz
- Overview
- attestations
- attestors
- create-signature-payload
- policy
- clusters
- get-server-config
- images
- node-pools
- operations
- subnets
- data-catalog
- dataflow
- dataproc
- Overview
- autoscaling-policies
- clusters
- jobs
- operations
- workflow-templates
- datastore
- debug
- deployment-manager
- dns
- Overview
- dns-keys
- managed-zones
- operations
- policies
- project-info
- record-sets
- domains
- emulators
- endpoints
- error-reporting
- filestore
- firebase
- firestore
- functions
- help
- iam
- init
- interactive
- iot
- Overview
- devices
- registries
- kms
- logging
- ml
- ml-engine
- organizations
- projects
- pubsub
- Overview
- snapshots
- subscriptions
- topics
- redis
- resource-manager
- run
- runtime-config
- scheduler
- services
- source
- spanner
- Overview
- databases
- instance-configs
- instances
- operations
- rows
- sql
- tasks
- gcloud bigtable
- gcloud builds
- gcloud components
- gcloud composer
- gcloud compute
- Overview
- accelerator-types
- addresses
- backend-buckets
- backend-services
- commitments
- config-ssh
- connect-to-serial-port
- copy-files
- disk-types
- disks
- firewall-rules
- forwarding-rules
- health-checks
- http-health-checks
- https-health-checks
- images
- instance-groups
- Overview
- describe
- get-named-ports
- list
- list-instances
- managed
- set-named-ports
- unmanaged
- instance-templates
- instances
- Overview
- add-access-config
- add-iam-policy-binding
- add-labels
- add-metadata
- add-tags
- attach-disk
- create
- create-with-container
- delete
- delete-access-config
- describe
- detach-disk
- get-iam-policy
- get-serial-port-output
- get-shielded-identity
- list
- move
- network-interfaces
- remove-iam-policy-binding
- remove-labels
- remove-metadata
- remove-tags
- reset
- set-disk-auto-delete
- set-iam-policy
- set-machine-type
- set-scheduling
- set-service-account
- simulate-maintenance-event
- start
- stop
- tail-serial-port-output
- update
- update-access-config
- update-container
- interconnects
- machine-types
- network-endpoint-groups
- networks
- operations
- os-login
- project-info
- regions
- reset-windows-password
- routers
- routes
- scp
- security-policies
- shared-vpc
- Overview
- associated-projects
- disable
- enable
- get-host-project
- list-associated-resources
- organizations
- sign-url
- snapshots
- sole-tenancy
- ssh
- ssl-certificates
- ssl-policies
- target-http-proxies
- target-https-proxies
- target-instances
- target-pools
- target-ssl-proxies
- target-tcp-proxies
- target-vpn-gateways
- tpus
- url-maps
- vpn-tunnels
- zones
- gcloud config
- gcloud container
- gcloud dataflow
- gcloud dataproc
- Overview
- clusters
- jobs
- operations
- workflow-templates
- gcloud datastore
- gcloud debug
- gcloud deployment-manager
- gcloud dns
- gcloud docker
- gcloud domains
- gcloud endpoints
- gcloud feedback
- gcloud filestore
- gcloud firebase
- gcloud functions
- gcloud help
- gcloud iam
- gcloud info
- gcloud init
- gcloud iot
- Overview
- devices
- registries
- gcloud kms
- gcloud logging
- gcloud ml
- Overview
- language
- speech
- video
- vision
- gcloud ml-engine
- gcloud organizations
- gcloud projects
- gcloud pubsub
- gcloud redis
- gcloud resource-manager
- gcloud scheduler
- gcloud services
- gcloud source
- gcloud spanner
- Overview
- databases
- instance-configs
- instances
- operations
- rows
- gcloud sql
- gcloud tasks
- gcloud topic
- gcloud version
- Google Cloud Client Libraries
- Resources
- All Resources
- Release Notes
- Usage Statistics
- Support
- Getting Support


