Stay organized with collections
Save and categorize content based on your preferences.
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of permissions,
not a NOT_FOUND error. Note: This operation is designed to be used for
building permission-aware UIs and command-line tools, not for
authorization checking. This operation may "fail open" without
warning.
Arguments
Parameters
resource
string
REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Method: googleapis.pubsub.v1.projects.subscriptions.testIamPermissions\n\nReturns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of permissions,\nnot a `NOT_FOUND` error. Note: This operation is designed to be used for\nbuilding permission-aware UIs and command-line tools, not for\nauthorization checking. This operation may \"fail open\" without\nwarning.\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`TestIamPermissionsResponse`](/workflows/docs/reference/googleapis/pubsub/v1/Overview#TestIamPermissionsResponse).\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/testIamPermissions). \n\n### YAML\n\n```yaml\n- testIamPermissions:\n call: googleapis.pubsub.v1.projects.subscriptions.testIamPermissions\n args:\n resource: ...\n body:\n permissions: ...\n result: testIamPermissionsResult\n```\n\n### JSON\n\n```json\n[\n {\n \"testIamPermissions\": {\n \"call\": \"googleapis.pubsub.v1.projects.subscriptions.testIamPermissions\",\n \"args\": {\n \"resource\": \"...\",\n \"body\": {\n \"permissions\": \"...\"\n }\n },\n \"result\": \"testIamPermissionsResult\"\n }\n }\n]\n```"]]