revoke_resource_access¶
- ResourceAccessApi.revoke_resource_access(resource, role_id, resource_access_revoke_input, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Revoke resource access from users or tags
Revokes access from users or tags. Max 20 ResourceIds and 20 AccessTags. Cannot revoke your own access or the last owner. Single-resource revokes return “{Resource} access updated successfully”; otherwise the update runs in the background.
- Parameters:
resource (str) – Resource type (datasets, dashboards, domains, tags, etc.) (required)
role_id (str) – Amorphic role ID used for authorization (required)
resource_access_revoke_input (ResourceAccessRevokeInput) – (required)
content_type (str) – Request content type (application/json)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: DELETE /share/{resource}
Request¶
Request / response example
{
"ResourceIds": [
"11111111-1111-1111-1111-111111111111"
],
"AccessTags": [
{
"TagKey": "user",
"TagValue": "colleague@example.com"
}
]
}
Success (HTTP 200)¶
Access revoked or update triggered in background
Request / response example
{
"Message": "Jobs access updated successfully"
}
Errors¶
HTTP 400
Invalid input or not authorized
Request / response example
{
"Message": "User user@example.com attempted an action on: Invalid tags: team#finance"
}
HTTP 500
Something went wrong at backend