Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.65.1 (#173)
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

fix(deps): require grpc-google-iam-v1 >=0.12.4
docs: fix type in docstring for map fields
feat: AuditConfig for IAM v1
  • Loading branch information
gcf-owl-bot[bot] authored Apr 14, 2022
1 parent ef5047b commit 3f74980
Show file tree
Hide file tree
Showing 20 changed files with 1,272 additions and 267 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 @@ -213,7 +213,6 @@ async def get_billing_account(
authenticated user must be a `viewer of the billing
account <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
.. code-block:: python
from google.cloud import billing_v1
Expand Down Expand Up @@ -322,7 +321,6 @@ async def list_billing_accounts(
has permission to
`view <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
.. code-block:: python
from google.cloud import billing_v1
Expand Down Expand Up @@ -418,7 +416,6 @@ async def update_billing_account(
`administrator <https://cloud.google.com/billing/docs/how-to/billing-access>`__
of the billing account.
.. code-block:: python
from google.cloud import billing_v1
Expand Down Expand Up @@ -544,7 +541,6 @@ async def create_billing_account(
This method will return an error if the master account has not
been provisioned as a reseller account.
.. code-block:: python
from google.cloud import billing_v1
Expand Down Expand Up @@ -642,7 +638,6 @@ async def list_project_billing_info(
often given to billing account
`viewers <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
.. code-block:: python
from google.cloud import billing_v1
Expand Down Expand Up @@ -763,7 +758,6 @@ async def get_project_billing_info(
authenticated user must have `permission to view the
project <https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo>`__.
.. code-block:: python
from google.cloud import billing_v1
Expand Down Expand Up @@ -909,7 +903,6 @@ async def update_project_billing_info(
always call this method with the name of an *open* billing
account.
.. code-block:: python
from google.cloud import billing_v1
Expand Down Expand Up @@ -1032,17 +1025,17 @@ async def get_iam_policy(
the account, which is often given to billing account
`viewers <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
.. code-block:: python
from google.cloud import billing_v1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_get_iam_policy():
# Create a client
client = billing_v1.CloudBillingClient()
# Initialize request argument(s)
request = billing_v1.GetIamPolicyRequest(
request = iam_policy_pb2.GetIamPolicyRequest(
resource="resource_value",
)
Expand Down Expand Up @@ -1073,21 +1066,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 @@ -1102,17 +1100,17 @@ def sample_get_iam_policy():
}, { "role":
"roles/resourcemanager.organizationViewer",
"members": ["user:[email protected]"],
"members": [ "user:[email protected]" ],
"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:\ [email protected] -
group:\ [email protected] - domain:google.com -
Expand All @@ -1123,11 +1121,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 @@ -1199,17 +1198,17 @@ async def set_iam_policy(
which is often given to billing account
`administrators <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
.. code-block:: python
from google.cloud import billing_v1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_set_iam_policy():
# Create a client
client = billing_v1.CloudBillingClient()
# Initialize request argument(s)
request = billing_v1.SetIamPolicyRequest(
request = iam_policy_pb2.SetIamPolicyRequest(
resource="resource_value",
)
Expand Down Expand Up @@ -1240,21 +1239,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 @@ -1269,17 +1273,17 @@ def sample_set_iam_policy():
}, { "role":
"roles/resourcemanager.organizationViewer",
"members": ["user:[email protected]"],
"members": [ "user:[email protected]" ],
"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:\ [email protected] -
group:\ [email protected] - domain:google.com -
Expand All @@ -1290,11 +1294,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 @@ -1367,17 +1372,17 @@ async def test_iam_permissions(
permissions that the caller is allowed for that
resource.
.. code-block:: python
from google.cloud import billing_v1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_test_iam_permissions():
# Create a client
client = billing_v1.CloudBillingClient()
# Initialize request argument(s)
request = billing_v1.TestIamPermissionsRequest(
request = iam_policy_pb2.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value_1', 'permissions_value_2'],
)
Expand Down
Loading

0 comments on commit 3f74980

Please sign in to comment.