gcloud ai-platform models add-iam-policy-binding

NAME
gcloud ai-platform models add-iam-policy-binding - add IAM policy binding for a model
SYNOPSIS
gcloud ai-platform models add-iam-policy-binding MODEL --member=MEMBER --role=ROLE [--region=REGION] [GCLOUD_WIDE_FLAG]
DESCRIPTION
Add IAM policy binding to a model.
POSITIONAL ARGUMENTS
MODEL
Name of the model.
REQUIRED FLAGS
--member=MEMBER
The member to add the binding for. Should be of the form user|group|serviceAccount:email or domain:domain.

Examples: user:test-user@gmail.com, group:admins@example.com, serviceAccount:test123@example.domain.com, or domain: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.
OPTIONAL FLAGS
--region=REGION
Google Cloud region of the regional endpoint to use for this command. If unspecified, the command uses the global endpoint of the AI Platform Training and Prediction API.

Learn more about regional endpoints and see a list of available regions: https://cloud.google.com/ai-platform/prediction/docs/regional-endpoints

REGION must be one of: asia-east1, europe-west4, us-central1.

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 help for details.

EXAMPLES
To add an IAM policy binding for the role of 'roles/ml.admin' for the user 'test-user@gmail.com' on a model with identifier 'my_model', run:
gcloud ai-platform models add-iam-policy-binding my_model --member='user:test-user@gmail.com' --role='roles/ml.admin'

To add an IAM policy binding for the role of 'roles/ml.admin' to the service account 'test-proj1@example.domain.com', run:

gcloud ai-platform models add-iam-policy-binding my_model --member='serviceAccount:test-proj1@example.domain.com' --role='roles/ml.admin'

To add an IAM policy binding for the role of 'roles/ml.admin' for all authenticated users on a model with identifier 'my_model', run:

gcloud ai-platform models add-iam-policy-binding my_model --member='allAuthenticatedUsers' --role='roles/ml.admin'

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 ai-platform models add-iam-policy-binding
gcloud beta ai-platform models add-iam-policy-binding