Skip to content
This repository was archived by the owner on Oct 16, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bb11648
feat: Create the public IAM Deny v2 API
gcf-owl-bot[bot] Aug 28, 2022
62ec950
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Aug 28, 2022
57ab5db
regenerate files using cl/470713093
parthea Aug 29, 2022
b1b07bf
workaround docstring formatting issue
parthea Aug 29, 2022
23a2368
add pytest to samples CI
parthea Aug 29, 2022
de85628
lint
parthea Aug 29, 2022
555cbff
fix import statement in samples/snippets
parthea Aug 29, 2022
2d06c10
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Aug 29, 2022
d80e1fd
docs(samples): migrate samples from iam_v2beta to iam_v2
parthea Aug 29, 2022
3b3d567
update required checks to include samples
parthea Aug 29, 2022
5cadeaa
use GOOGLE_CLOUD_PROJECT
parthea Aug 29, 2022
48e586b
fix imports in samples/snippets
parthea Aug 29, 2022
e3c334f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Aug 29, 2022
8bda3fb
add pytest
parthea Aug 29, 2022
53a136d
chore(python): prepare for release of the iam/v2 python client
gcf-owl-bot[bot] Aug 31, 2022
6196002
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Aug 31, 2022
9cc4d01
feat: Bump gapic-generator-python version to 1.3.0
gcf-owl-bot[bot] Sep 7, 2022
4914862
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Sep 7, 2022
a1b4367
chore: use gapic-generator-python 1.3.1
gcf-owl-bot[bot] Sep 7, 2022
0d77f46
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Sep 7, 2022
0a8b315
fix: integrate gapic-generator-python-1.4.1 and enable more py_test …
gcf-owl-bot[bot] Sep 13, 2022
b2b8234
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Sep 13, 2022
c6665c1
Merge branch 'main' into owl-bot-copy
Sita04 Sep 21, 2022
6788697
updated test to delete stale policies and avoid quota error
Sita04 Sep 21, 2022
062a411
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Sep 21, 2022
0d09a87
feat!: remove ListApplicablePolicies
gcf-owl-bot[bot] Sep 22, 2022
d0ff942
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Sep 22, 2022
38ab309
samples: wait for the operation to complete
Sita04 Sep 27, 2022
1cba645
samples: minor refactoring
Sita04 Sep 28, 2022
ff98fa5
Merge branch 'main' into owl-bot-copy
parthea Oct 4, 2022
fe7a85a
Merge branch 'main' into owl-bot-copy
parthea Oct 17, 2022
8615188
use project `python-docs-samples-tests`
parthea Oct 22, 2022
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
36 changes: 36 additions & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings
# Rules for main branch protection
branchProtectionRules:
# Identifies the protection rule pattern. Name of the branch to be protected.
# Defaults to `main`
- pattern: main
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: true
requiredStatusCheckContexts:
- 'cla/google'
- 'OwlBot Post Processor'
- 'docs'
- 'docfx'
- 'lint'
- 'unit (3.6)'
- 'unit (3.7)'
- 'unit (3.8)'
- 'unit (3.9)'
- 'unit (3.10)'
- 'cover'
- 'Samples - Lint'
- 'Samples - Python 3.7'
- 'Samples - Python 3.8'
- 'Samples - Python 3.9'
- 'Samples - Python 3.10'
permissionRules:
- team: actools-python
permission: admin
- team: actools
permission: admin
- team: yoshi-python
permission: push
- team: python-samples-owners
permission: push
- team: python-samples-reviewers
permission: push
10 changes: 10 additions & 0 deletions docs/iam_v2/policies.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Policies
--------------------------

.. automodule:: google.cloud.iam_v2.services.policies
:members:
:inherited-members:

.. automodule:: google.cloud.iam_v2.services.policies.pagers
:members:
:inherited-members:
6 changes: 6 additions & 0 deletions docs/iam_v2/services.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Services for Google Cloud Iam v2 API
====================================
.. toctree::
:maxdepth: 2

policies
7 changes: 7 additions & 0 deletions docs/iam_v2/types.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Types for Google Cloud Iam v2 API
=================================

.. automodule:: google.cloud.iam_v2.types
:members:
:undoc-members:
:show-inheritance:
10 changes: 7 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

.. include:: multiprocessing.rst

This package includes clients for multiple versions of Cloud Identity and Access Management.
By default, you will get version ``iam_credentials_v1``.

API Reference
-------------
.. toctree::
:maxdepth: 2

iam_v2/services
iam_v2/types

API Reference
-------------
Expand All @@ -22,7 +27,6 @@ API Reference
iam_v2beta/services
iam_v2beta/types


Migration Guide
---------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ async def generate_access_token(

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import iam_credentials_v1

async def sample_generate_access_token():
Expand All @@ -243,7 +250,7 @@ async def sample_generate_access_token():
# Initialize request argument(s)
request = iam_credentials_v1.GenerateAccessTokenRequest(
name="name_value",
scope=['scope_value_1', 'scope_value_2'],
scope=['scope_value1', 'scope_value2'],
)

# Make the request
Expand Down Expand Up @@ -391,6 +398,13 @@ async def generate_id_token(

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import iam_credentials_v1

async def sample_generate_id_token():
Expand Down Expand Up @@ -541,6 +555,13 @@ async def sign_blob(

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import iam_credentials_v1

async def sample_sign_blob():
Expand Down Expand Up @@ -678,6 +699,13 @@ async def sign_jwt(

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import iam_credentials_v1

async def sample_sign_jwt():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,13 @@ def generate_access_token(

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import iam_credentials_v1

def sample_generate_access_token():
Expand All @@ -464,7 +471,7 @@ def sample_generate_access_token():
# Initialize request argument(s)
request = iam_credentials_v1.GenerateAccessTokenRequest(
name="name_value",
scope=['scope_value_1', 'scope_value_2'],
scope=['scope_value1', 'scope_value2'],
)

# Make the request
Expand Down Expand Up @@ -602,6 +609,13 @@ def generate_id_token(

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import iam_credentials_v1

def sample_generate_id_token():
Expand Down Expand Up @@ -742,6 +756,13 @@ def sign_blob(

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import iam_credentials_v1

def sample_sign_blob():
Expand Down Expand Up @@ -869,6 +890,13 @@ def sign_jwt(

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import iam_credentials_v1

def sample_sign_jwt():
Expand Down
44 changes: 44 additions & 0 deletions google/cloud/iam_v2/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from .services.policies import PoliciesAsyncClient, PoliciesClient
from .types.deny import DenyRule
from .types.policy import (
CreatePolicyRequest,
DeletePolicyRequest,
GetPolicyRequest,
ListPoliciesRequest,
ListPoliciesResponse,
Policy,
PolicyOperationMetadata,
PolicyRule,
UpdatePolicyRequest,
)

__all__ = (
"PoliciesAsyncClient",
"CreatePolicyRequest",
"DeletePolicyRequest",
"DenyRule",
"GetPolicyRequest",
"ListPoliciesRequest",
"ListPoliciesResponse",
"PoliciesClient",
"Policy",
"PolicyOperationMetadata",
"PolicyRule",
"UpdatePolicyRequest",
)
73 changes: 73 additions & 0 deletions google/cloud/iam_v2/gapic_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
"language": "python",
"libraryPackage": "google.cloud.iam_v2",
"protoPackage": "google.iam.v2",
"schema": "1.0",
"services": {
"Policies": {
"clients": {
"grpc": {
"libraryClient": "PoliciesClient",
"rpcs": {
"CreatePolicy": {
"methods": [
"create_policy"
]
},
"DeletePolicy": {
"methods": [
"delete_policy"
]
},
"GetPolicy": {
"methods": [
"get_policy"
]
},
"ListPolicies": {
"methods": [
"list_policies"
]
},
"UpdatePolicy": {
"methods": [
"update_policy"
]
}
}
},
"grpc-async": {
"libraryClient": "PoliciesAsyncClient",
"rpcs": {
"CreatePolicy": {
"methods": [
"create_policy"
]
},
"DeletePolicy": {
"methods": [
"delete_policy"
]
},
"GetPolicy": {
"methods": [
"get_policy"
]
},
"ListPolicies": {
"methods": [
"list_policies"
]
},
"UpdatePolicy": {
"methods": [
"update_policy"
]
}
}
}
}
}
}
}
2 changes: 2 additions & 0 deletions google/cloud/iam_v2/py.typed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-iam package uses inline types.
15 changes: 15 additions & 0 deletions google/cloud/iam_v2/services/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
22 changes: 22 additions & 0 deletions google/cloud/iam_v2/services/policies/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .async_client import PoliciesAsyncClient
from .client import PoliciesClient

__all__ = (
"PoliciesClient",
"PoliciesAsyncClient",
)
Loading