Skip to content

Commit

Permalink
indent docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwlui committed Jan 9, 2020
1 parent da80589 commit db3f1c2
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions api_core/google/api_core/iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,26 +186,26 @@ def bindings(self):
Example:
.. code-block:: python
USER = "user:phred@example.com"
ADMIN_GROUP = "group:admins@groups.example.com"
SERVICE_ACCOUNT = "serviceAccount:account-1234@accounts.example.com"
condition = {
"title": "request_time",
"description": "Requests made before 2021-01-01T00:00:00Z", # Optional
"expression": "request.time < timestamp(\"2021-01-01T00:00:00Z\")"
}
# Set policy's version to 3 before setting bindings containing conditions.
policy.version = 3
policy.bindings = [
{
"role": "roles/viewer",
"members": {USER, ADMIN_GROUP, SERVICE_ACCOUNT},
"condition": CONDITION
},
...
]
USER = "user:phred@example.com"
ADMIN_GROUP = "group:admins@groups.example.com"
SERVICE_ACCOUNT = "serviceAccount:account-1234@accounts.example.com"
condition = {
"title": "request_time",
"description": "Requests made before 2021-01-01T00:00:00Z", # Optional
"expression": "request.time < timestamp(\"2021-01-01T00:00:00Z\")"
}
# Set policy's version to 3 before setting bindings containing conditions.
policy.version = 3
policy.bindings = [
{
"role": "roles/viewer",
"members": {USER, ADMIN_GROUP, SERVICE_ACCOUNT},
"condition": CONDITION
},
...
]
"""
return self._bindings

Expand Down

0 comments on commit db3f1c2

Please sign in to comment.