Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data RBAC requires scope_info eq None. #177

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lists/v1alpha/patch_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@ def patch_list(
parent = f"projects/{proj_id}/locations/{proj_region}/instances/{proj_instance}"
url = f"{base_url_with_region}/v1alpha/{parent}/referenceLists/{name}"
body = {
"name": name,
"entries": [{"value": line.strip()} for line in content_lines]
"entries": [{"value": line.strip()} for line in content_lines],
"scope_info": None, # assumes Data RBAC is disabled
}
if description:
body["description"] = description
if syntax_type:
body["syntax_type"] = syntax_type
params = {"updateMask": ",".join(body.keys())}
body["name"] = name

# omit the updateMask query string param:
# "When no field mask is supplied, all non-empty fields will be updated."
response = http_session.request("PATCH", url, json=body)
response = http_session.request("PATCH", url, params=params, json=body)
if response.status_code >= 400:
print(response.text)
response.raise_for_status()
Expand Down
Loading