Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.65.1 (#252)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 441524537

Source-Link: googleapis/googleapis@2a27391

Source-Link: googleapis/googleapis-gen@ab6756a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9

feat: AuditConfig for IAM v1
fix(deps): require grpc-google-iam-v1 >=0.12.4
docs: fix type in docstring for map fields
  • Loading branch information
gcf-owl-bot[bot] authored Apr 14, 2022
1 parent b002426 commit 6d5aad4
Show file tree
Hide file tree
Showing 44 changed files with 4,900 additions and 823 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -222,7 +222,6 @@ async def list_queues(
r"""Lists queues.
Queues are returned in lexicographical order.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -461,7 +460,6 @@ async def create_queue(
queue.yaml <https://cloud.google.com/tasks/docs/queue-yaml>`__
before using this method.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -591,7 +589,6 @@ async def update_queue(
queue.yaml <https://cloud.google.com/tasks/docs/queue-yaml>`__
before using this method.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -722,7 +719,6 @@ async def delete_queue(
queue.yaml <https://cloud.google.com/tasks/docs/queue-yaml>`__
before using this method.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -821,7 +817,6 @@ async def purge_queue(
effect. Tasks might be dispatched before the purge takes
effect. A purge is irreversible.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -928,7 +923,6 @@ async def pause_queue(
paused if its [state][google.cloud.tasks.v2.Queue.state] is
[PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -1042,7 +1036,6 @@ async def resume_queue(
Scaling
Risks <https://cloud.google.com/tasks/docs/manage-cloud-task-scaling>`__.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -1150,17 +1143,17 @@ async def get_iam_policy(
- ``cloudtasks.queues.getIamPolicy``
.. code-block:: python
from google.cloud import tasks_v2
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_get_iam_policy():
# Create a client
client = tasks_v2.CloudTasksClient()
# Initialize request argument(s)
request = tasks_v2.GetIamPolicyRequest(
request = iam_policy_pb2.GetIamPolicyRequest(
resource="resource_value",
)
Expand Down Expand Up @@ -1191,21 +1184,26 @@ def sample_get_iam_policy():
Returns:
google.iam.v1.policy_pb2.Policy:
Defines an Identity and Access Management (IAM) policy. It is used to
specify access control policies for Cloud Platform
resources.
An Identity and Access Management (IAM) policy, which specifies access
controls for Google Cloud resources.
A Policy is a collection of bindings. A binding binds
one or more members to a single role. Members can be
user accounts, service accounts, Google groups, and
domains (such as G Suite). A role is a named list of
permissions (defined by IAM or configured by users).
A binding can optionally specify a condition, which
is a logic expression that further constrains the
role binding based on attributes about the request
and/or target resource.
**JSON Example**
one or more members, or principals, to a single role.
Principals can be user accounts, service accounts,
Google groups, and domains (such as G Suite). A role
is a named list of permissions; each role can be an
IAM predefined role or a user-created custom role.
For some types of Google Cloud resources, a binding
can also specify a condition, which is a logical
expression that allows access to a resource only if
the expression evaluates to true. A condition can add
constraints based on attributes of the request, the
resource, or both. To learn which resources support
conditions in their IAM policies, see the [IAM
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
**JSON example:**
{
"bindings": [
Expand All @@ -1220,17 +1218,17 @@ def sample_get_iam_policy():
}, { "role":
"roles/resourcemanager.organizationViewer",
"members": ["user:eve@example.com"],
"members": [ "user:eve@example.com" ],
"condition": { "title": "expirable access",
"description": "Does not grant access after
Sep 2020", "expression": "request.time <
timestamp('2020-10-01T00:00:00.000Z')", } }
]
], "etag": "BwWWja0YfJA=", "version": 3
}
**YAML Example**
**YAML example:**
bindings: - members: - user:\ mike@example.com -
group:\ admins@example.com - domain:google.com -
Expand All @@ -1241,11 +1239,12 @@ def sample_get_iam_policy():
condition: title: expirable access description:
Does not grant access after Sep 2020 expression:
request.time <
timestamp('2020-10-01T00:00:00.000Z')
timestamp('2020-10-01T00:00:00.000Z') etag:
BwWWja0YfJA= version: 3
For a description of IAM and its features, see the
[IAM developer's
guide](\ https://cloud.google.com/iam/docs).
[IAM
documentation](\ https://cloud.google.com/iam/docs/).
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -1325,17 +1324,17 @@ async def set_iam_policy(
- ``cloudtasks.queues.setIamPolicy``
.. code-block:: python
from google.cloud import tasks_v2
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_set_iam_policy():
# Create a client
client = tasks_v2.CloudTasksClient()
# Initialize request argument(s)
request = tasks_v2.SetIamPolicyRequest(
request = iam_policy_pb2.SetIamPolicyRequest(
resource="resource_value",
)
Expand Down Expand Up @@ -1366,21 +1365,26 @@ def sample_set_iam_policy():
Returns:
google.iam.v1.policy_pb2.Policy:
Defines an Identity and Access Management (IAM) policy. It is used to
specify access control policies for Cloud Platform
resources.
An Identity and Access Management (IAM) policy, which specifies access
controls for Google Cloud resources.
A Policy is a collection of bindings. A binding binds
one or more members to a single role. Members can be
user accounts, service accounts, Google groups, and
domains (such as G Suite). A role is a named list of
permissions (defined by IAM or configured by users).
A binding can optionally specify a condition, which
is a logic expression that further constrains the
role binding based on attributes about the request
and/or target resource.
**JSON Example**
one or more members, or principals, to a single role.
Principals can be user accounts, service accounts,
Google groups, and domains (such as G Suite). A role
is a named list of permissions; each role can be an
IAM predefined role or a user-created custom role.
For some types of Google Cloud resources, a binding
can also specify a condition, which is a logical
expression that allows access to a resource only if
the expression evaluates to true. A condition can add
constraints based on attributes of the request, the
resource, or both. To learn which resources support
conditions in their IAM policies, see the [IAM
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
**JSON example:**
{
"bindings": [
Expand All @@ -1395,17 +1399,17 @@ def sample_set_iam_policy():
}, { "role":
"roles/resourcemanager.organizationViewer",
"members": ["user:eve@example.com"],
"members": [ "user:eve@example.com" ],
"condition": { "title": "expirable access",
"description": "Does not grant access after
Sep 2020", "expression": "request.time <
timestamp('2020-10-01T00:00:00.000Z')", } }
]
], "etag": "BwWWja0YfJA=", "version": 3
}
**YAML Example**
**YAML example:**
bindings: - members: - user:\ mike@example.com -
group:\ admins@example.com - domain:google.com -
Expand All @@ -1416,11 +1420,12 @@ def sample_set_iam_policy():
condition: title: expirable access description:
Does not grant access after Sep 2020 expression:
request.time <
timestamp('2020-10-01T00:00:00.000Z')
timestamp('2020-10-01T00:00:00.000Z') etag:
BwWWja0YfJA= version: 3
For a description of IAM and its features, see the
[IAM developer's
guide](\ https://cloud.google.com/iam/docs).
[IAM
documentation](\ https://cloud.google.com/iam/docs/).
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -1487,17 +1492,17 @@ async def test_iam_permissions(
authorization checking. This operation may "fail open" without
warning.
.. code-block:: python
from google.cloud import tasks_v2
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_test_iam_permissions():
# Create a client
client = tasks_v2.CloudTasksClient()
# Initialize request argument(s)
request = tasks_v2.TestIamPermissionsRequest(
request = iam_policy_pb2.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value_1', 'permissions_value_2'],
)
Expand Down Expand Up @@ -1615,7 +1620,6 @@ async def list_tasks(
The tasks may be returned in any order. The ordering may change
at any time.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -1845,7 +1849,6 @@ async def create_task(
- The maximum task size is 100KB.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -1992,7 +1995,6 @@ async def delete_task(
A task cannot be deleted if it has executed successfully
or permanently failed.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down Expand Up @@ -2113,7 +2115,6 @@ async def run_task(
[NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
task that has already succeeded or permanently failed.
.. code-block:: python
from google.cloud import tasks_v2
Expand Down
Loading

0 comments on commit 6d5aad4

Please sign in to comment.