Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
HTTP request
POST https://cloudbilling.googleapis.com/v1/{resource=billingAccounts/*}:testIamPermissions
REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.
Request body
The request body contains data with the following structure:
JSON representation
{"permissions": [string]}
Fields
permissions[]
string
The set of permissions to check for the resource. Permissions with wildcards (such as * or storage.*) are not allowed. For more information see IAM Overview.
Response body
Response message for billingAccounts.testIamPermissions method.
If successful, the response body contains data with the following structure:
JSON representation
{"permissions": [string]}
Fields
permissions[]
string
A subset of TestPermissionsRequest.permissions that the caller is allowed.
[[["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 2024-05-15 UTC."],[[["This webpage details how to test access control policies for billing accounts using the `testIamPermissions` method."],["The HTTP request is a POST method to a specific URL that includes a `resource` path parameter indicating the billing account."],["The request body requires a JSON structure listing the `permissions` to be checked, while the response body returns a JSON structure listing the subset of `permissions` the caller is allowed."],["The API method requires one of the listed OAuth scopes for authorization, ensuring the caller has proper access rights."],["The resource being tested must follow the Google Cloud resource naming convention, as it's required to be able to test the access control policy."]]],[]]