Appending a role binding does not work as per the docs #12681
Labels
type: docs
Improvement to the documentation for an API.
type: question
Request for information or clarification. Not an issue.
Summary
As per documented in https://cloud.google.com/iam/docs/write-policy-client-libraries, adding a new role binding is shown to be accomplished by the following
binding = {"role": "foo", "members": ["bar"]}
policy["bindings"].append(binding)
Expected behaviour
Successfully adding the binding
Observed behaviour
Background info
python-version: 3.11.9
Pip freeze:
Arpeggio==2.0.2
asttokens==2.4.1
attrs==23.2.0
black==24.4.2
cachetools==5.3.3
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
cryptography==42.0.7
decorator==5.1.1
Deprecated==1.2.14
dill==0.3.8
executing==2.0.1
gitdb==4.0.11
GitPython==3.1.41
google-api-core==2.19.0
google-auth==2.29.0
google-cloud-core==2.4.1
google-cloud-firestore==2.15.0
google-cloud-resource-manager==1.12.3
googleapis-common-protos==1.63.0
grpc-google-iam-v1==0.13.0
grpcio==1.60.1
grpcio-status==1.60.1
idna==3.7
iniconfig==2.0.0
ipython==8.24.0
isort==5.13.2
jedi==0.19.1
Jinja2==3.1.3
MarkupSafe==2.1.5
matplotlib-inline==0.1.7
mypy-extensions==1.0.0
packaging==24.0
parso==0.8.4
parver==0.5
pathspec==0.12.1
pexpect==4.9.0
platformdirs==4.2.1
pluggy==1.5.0
prompt-toolkit==3.0.43
proto-plus==1.23.0
protobuf==4.25.3
ptyprocess==0.7.0
pulumi==3.114.0
pulumi_gcp==7.20.0
pure-eval==0.2.2
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
PyGithub==2.2.0
Pygments==2.18.0
PyJWT==2.8.0
PyNaCl==1.5.0
pytest==8.2.0
pytest-order==1.2.1
PyYAML==6.0.1
requests==2.31.0
rsa==4.9
semver==2.13.0
six==1.16.0
smmap==5.0.1
stack-data==0.6.3
toml==0.10.2
traitlets==5.14.3
typing_extensions==4.11.0
urllib3==2.2.1
wcwidth==0.2.13
wrapt==1.16.0
The text was updated successfully, but these errors were encountered: