Add 'Subscription.test_iam_permissions' API wrapper.#1646
Add 'Subscription.test_iam_permissions' API wrapper.#1646tseaver merged 3 commits intogoogleapis:masterfrom tseaver:pubsub-subscription-test_iam_permissions
Conversation
|
#1648 would cover the |
docs/pubsub-usage.rst
Outdated
| >>> topic = client.topic('topic_name') | ||
| >>> subscription = topic.subscription('subscription_name') | ||
| >>> subscription.test_iam_permissions( | ||
| ... ['roles/reader', 'roles/writer', 'roles/owner']) # API request |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| >>> subscription = topic.subscription('subscription_name') | ||
| >>> allowed = subscription.test_iam_permissions( | ||
| ... [READER_ROLE, WRITER_ROLE, OWNER_ROLE]) # API request | ||
| >>> allowed == [READER_ROLE, WRITER_ROLE] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@dhermes any further issues? |
|
LGTM |
* fix: fix code coverage * update goldens * update comment * renable code formatting
Uses #1645 as a base.Closes #1073.