google-cloud-privilegedaccessmanager 0.4.0__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/MANIFEST.in +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0/google_cloud_privilegedaccessmanager.egg-info → google_cloud_privilegedaccessmanager-0.4.2}/PKG-INFO +33 -21
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/README.rst +25 -12
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager/__init__.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager/gapic_version.py +2 -2
- google_cloud_privilegedaccessmanager-0.4.2/google/cloud/privilegedaccessmanager_v1/__init__.py +101 -0
- google_cloud_privilegedaccessmanager-0.4.2/google/cloud/privilegedaccessmanager_v1/_compat.py +262 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/gapic_version.py +2 -2
- {google_cloud_privilegedaccessmanager-0.4.0/tests/unit → google_cloud_privilegedaccessmanager-0.4.2/google/cloud/privilegedaccessmanager_v1/services}/__init__.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/__init__.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/async_client.py +10 -13
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/client.py +25 -167
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/pagers.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/transports/__init__.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/transports/base.py +2 -4
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/transports/grpc.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/transports/grpc_asyncio.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/transports/rest.py +174 -179
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/services/privileged_access_manager/transports/rest_base.py +1 -546
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/types/__init__.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/types/privilegedaccessmanager.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2/google_cloud_privilegedaccessmanager.egg-info}/PKG-INFO +33 -21
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google_cloud_privilegedaccessmanager.egg-info/SOURCES.txt +2 -0
- google_cloud_privilegedaccessmanager-0.4.2/google_cloud_privilegedaccessmanager.egg-info/requires.txt +8 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/setup.py +12 -10
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/tests/__init__.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0/tests/unit/gapic → google_cloud_privilegedaccessmanager-0.4.2/tests/unit}/__init__.py +1 -1
- {google_cloud_privilegedaccessmanager-0.4.0/google/cloud/privilegedaccessmanager_v1/services → google_cloud_privilegedaccessmanager-0.4.2/tests/unit/gapic}/__init__.py +1 -1
- google_cloud_privilegedaccessmanager-0.4.2/tests/unit/gapic/privilegedaccessmanager_v1/__init__.py +15 -0
- google_cloud_privilegedaccessmanager-0.4.2/tests/unit/gapic/privilegedaccessmanager_v1/test_compat.py +429 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/tests/unit/gapic/privilegedaccessmanager_v1/test_privileged_access_manager.py +425 -928
- google_cloud_privilegedaccessmanager-0.4.0/google/cloud/privilegedaccessmanager_v1/__init__.py +0 -190
- google_cloud_privilegedaccessmanager-0.4.0/google_cloud_privilegedaccessmanager.egg-info/requires.txt +0 -11
- google_cloud_privilegedaccessmanager-0.4.0/tests/unit/gapic/privilegedaccessmanager_v1/__init__.py +0 -15
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/LICENSE +0 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager/py.typed +0 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/gapic_metadata.json +0 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google/cloud/privilegedaccessmanager_v1/py.typed +0 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google_cloud_privilegedaccessmanager.egg-info/dependency_links.txt +0 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google_cloud_privilegedaccessmanager.egg-info/not-zip-safe +0 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/google_cloud_privilegedaccessmanager.egg-info/top_level.txt +0 -0
- {google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/setup.cfg +0 -0
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-privilegedaccessmanager
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Google Cloud Privilegedaccessmanager API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-privilegedaccessmanager
|
|
6
6
|
Author: Google LLC
|
|
7
7
|
Author-email: googleapis-packages@google.com
|
|
8
|
-
License: Apache
|
|
8
|
+
License: Apache-2.0
|
|
9
9
|
Platform: Posix; MacOS X; Windows
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
21
21
|
Classifier: Operating System :: OS Independent
|
|
22
22
|
Classifier: Topic :: Internet
|
|
23
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
24
|
License-File: LICENSE
|
|
25
|
-
Requires-Dist: google-api-core[grpc]<3.0.0,>=2.
|
|
25
|
+
Requires-Dist: google-api-core[grpc]<3.0.0,>=2.28.0
|
|
26
26
|
Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
|
|
27
|
-
Requires-Dist: grpcio<2.0.0,>=1.
|
|
27
|
+
Requires-Dist: grpcio<2.0.0,>=1.59.0
|
|
28
28
|
Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
|
|
29
|
-
Requires-Dist: proto-plus<2.0.0,>=1.
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist: protobuf<8.0.0,>=4.25.8
|
|
29
|
+
Requires-Dist: proto-plus<2.0.0,>=1.26.1
|
|
30
|
+
Requires-Dist: protobuf<8.0.0,>=6.33.5
|
|
32
31
|
Dynamic: author
|
|
33
32
|
Dynamic: author-email
|
|
34
33
|
Dynamic: classifier
|
|
@@ -41,12 +40,24 @@ Dynamic: requires-dist
|
|
|
41
40
|
Dynamic: requires-python
|
|
42
41
|
Dynamic: summary
|
|
43
42
|
|
|
44
|
-
Python Client for Privileged Access Manager
|
|
45
|
-
|
|
43
|
+
Python Client for Privileged Access Manager
|
|
44
|
+
===========================================
|
|
46
45
|
|
|
47
46
|
|preview| |pypi| |versions|
|
|
48
47
|
|
|
49
|
-
`Privileged Access Manager
|
|
48
|
+
`Privileged Access Manager`_: Privileged Access Manager (PAM) helps you on your journey towards least
|
|
49
|
+
privilege and helps mitigate risks tied to privileged access misuse or
|
|
50
|
+
abuse. PAM allows you to shift from always-on standing privileges towards
|
|
51
|
+
on-demand access with just-in-time, time-bound, and approval-based access
|
|
52
|
+
elevations. PAM allows IAM administrators to create entitlements that can
|
|
53
|
+
grant just-in-time, temporary access to any resource scope. Requesters can
|
|
54
|
+
explore eligible entitlements and request the access needed for their
|
|
55
|
+
task. Approvers are notified when approvals await their
|
|
56
|
+
decision. Streamlined workflows facilitated by using PAM can support
|
|
57
|
+
various use cases, including emergency access for incident responders,
|
|
58
|
+
time-boxed access for developers for critical deployment or maintenance,
|
|
59
|
+
temporary access for operators for data ingestion and audits, JIT access
|
|
60
|
+
to service accounts for automated tasks, and more.
|
|
50
61
|
|
|
51
62
|
- `Client Library Documentation`_
|
|
52
63
|
- `Product Documentation`_
|
|
@@ -57,9 +68,9 @@ Python Client for Privileged Access Manager API
|
|
|
57
68
|
:target: https://pypi.org/project/google-cloud-privilegedaccessmanager/
|
|
58
69
|
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-privilegedaccessmanager.svg
|
|
59
70
|
:target: https://pypi.org/project/google-cloud-privilegedaccessmanager/
|
|
60
|
-
.. _Privileged Access Manager
|
|
71
|
+
.. _Privileged Access Manager: https://cloud.google.com/iam/
|
|
61
72
|
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/google-cloud-privilegedaccessmanager/latest/summary_overview
|
|
62
|
-
.. _Product Documentation: https://cloud.google.com/iam/
|
|
73
|
+
.. _Product Documentation: https://cloud.google.com/iam/
|
|
63
74
|
|
|
64
75
|
Quick Start
|
|
65
76
|
-----------
|
|
@@ -68,12 +79,12 @@ In order to use this library, you first need to go through the following steps:
|
|
|
68
79
|
|
|
69
80
|
1. `Select or create a Cloud Platform project.`_
|
|
70
81
|
2. `Enable billing for your project.`_
|
|
71
|
-
3. `Enable the Privileged Access Manager
|
|
82
|
+
3. `Enable the Privileged Access Manager.`_
|
|
72
83
|
4. `Set up Authentication.`_
|
|
73
84
|
|
|
74
85
|
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
|
|
75
86
|
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
|
|
76
|
-
.. _Enable the Privileged Access Manager
|
|
87
|
+
.. _Enable the Privileged Access Manager.: https://cloud.google.com/iam/
|
|
77
88
|
.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
|
|
78
89
|
|
|
79
90
|
Installation
|
|
@@ -104,14 +115,15 @@ Supported Python Versions
|
|
|
104
115
|
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
|
|
105
116
|
Python.
|
|
106
117
|
|
|
107
|
-
Python >= 3.
|
|
118
|
+
Python >= 3.10, including 3.14
|
|
108
119
|
|
|
109
120
|
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
|
|
110
121
|
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
|
|
111
122
|
|
|
112
123
|
Unsupported Python Versions
|
|
113
124
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
114
|
-
Python <= 3.
|
|
125
|
+
Python <= 3.9
|
|
126
|
+
|
|
115
127
|
|
|
116
128
|
If you are using an `end-of-life`_
|
|
117
129
|
version of Python, we recommend that you update as soon as possible to an actively supported version.
|
|
@@ -140,14 +152,14 @@ Windows
|
|
|
140
152
|
Next Steps
|
|
141
153
|
~~~~~~~~~~
|
|
142
154
|
|
|
143
|
-
- Read the `Client Library Documentation`_ for Privileged Access Manager
|
|
155
|
+
- Read the `Client Library Documentation`_ for Privileged Access Manager
|
|
144
156
|
to see other available methods on the client.
|
|
145
|
-
- Read the `Privileged Access Manager
|
|
157
|
+
- Read the `Privileged Access Manager Product documentation`_ to learn
|
|
146
158
|
more about the product and see How-to Guides.
|
|
147
159
|
- View this `README`_ to see the full list of Cloud
|
|
148
160
|
APIs that we cover.
|
|
149
161
|
|
|
150
|
-
.. _Privileged Access Manager
|
|
162
|
+
.. _Privileged Access Manager Product documentation: https://cloud.google.com/iam/
|
|
151
163
|
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
|
|
152
164
|
|
|
153
165
|
Logging
|
{google_cloud_privilegedaccessmanager-0.4.0 → google_cloud_privilegedaccessmanager-0.4.2}/README.rst
RENAMED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
Python Client for Privileged Access Manager
|
|
2
|
-
|
|
1
|
+
Python Client for Privileged Access Manager
|
|
2
|
+
===========================================
|
|
3
3
|
|
|
4
4
|
|preview| |pypi| |versions|
|
|
5
5
|
|
|
6
|
-
`Privileged Access Manager
|
|
6
|
+
`Privileged Access Manager`_: Privileged Access Manager (PAM) helps you on your journey towards least
|
|
7
|
+
privilege and helps mitigate risks tied to privileged access misuse or
|
|
8
|
+
abuse. PAM allows you to shift from always-on standing privileges towards
|
|
9
|
+
on-demand access with just-in-time, time-bound, and approval-based access
|
|
10
|
+
elevations. PAM allows IAM administrators to create entitlements that can
|
|
11
|
+
grant just-in-time, temporary access to any resource scope. Requesters can
|
|
12
|
+
explore eligible entitlements and request the access needed for their
|
|
13
|
+
task. Approvers are notified when approvals await their
|
|
14
|
+
decision. Streamlined workflows facilitated by using PAM can support
|
|
15
|
+
various use cases, including emergency access for incident responders,
|
|
16
|
+
time-boxed access for developers for critical deployment or maintenance,
|
|
17
|
+
temporary access for operators for data ingestion and audits, JIT access
|
|
18
|
+
to service accounts for automated tasks, and more.
|
|
7
19
|
|
|
8
20
|
- `Client Library Documentation`_
|
|
9
21
|
- `Product Documentation`_
|
|
@@ -14,9 +26,9 @@ Python Client for Privileged Access Manager API
|
|
|
14
26
|
:target: https://pypi.org/project/google-cloud-privilegedaccessmanager/
|
|
15
27
|
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-privilegedaccessmanager.svg
|
|
16
28
|
:target: https://pypi.org/project/google-cloud-privilegedaccessmanager/
|
|
17
|
-
.. _Privileged Access Manager
|
|
29
|
+
.. _Privileged Access Manager: https://cloud.google.com/iam/
|
|
18
30
|
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/google-cloud-privilegedaccessmanager/latest/summary_overview
|
|
19
|
-
.. _Product Documentation: https://cloud.google.com/iam/
|
|
31
|
+
.. _Product Documentation: https://cloud.google.com/iam/
|
|
20
32
|
|
|
21
33
|
Quick Start
|
|
22
34
|
-----------
|
|
@@ -25,12 +37,12 @@ In order to use this library, you first need to go through the following steps:
|
|
|
25
37
|
|
|
26
38
|
1. `Select or create a Cloud Platform project.`_
|
|
27
39
|
2. `Enable billing for your project.`_
|
|
28
|
-
3. `Enable the Privileged Access Manager
|
|
40
|
+
3. `Enable the Privileged Access Manager.`_
|
|
29
41
|
4. `Set up Authentication.`_
|
|
30
42
|
|
|
31
43
|
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
|
|
32
44
|
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
|
|
33
|
-
.. _Enable the Privileged Access Manager
|
|
45
|
+
.. _Enable the Privileged Access Manager.: https://cloud.google.com/iam/
|
|
34
46
|
.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
|
|
35
47
|
|
|
36
48
|
Installation
|
|
@@ -61,14 +73,15 @@ Supported Python Versions
|
|
|
61
73
|
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
|
|
62
74
|
Python.
|
|
63
75
|
|
|
64
|
-
Python >= 3.
|
|
76
|
+
Python >= 3.10, including 3.14
|
|
65
77
|
|
|
66
78
|
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
|
|
67
79
|
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
|
|
68
80
|
|
|
69
81
|
Unsupported Python Versions
|
|
70
82
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
71
|
-
Python <= 3.
|
|
83
|
+
Python <= 3.9
|
|
84
|
+
|
|
72
85
|
|
|
73
86
|
If you are using an `end-of-life`_
|
|
74
87
|
version of Python, we recommend that you update as soon as possible to an actively supported version.
|
|
@@ -97,14 +110,14 @@ Windows
|
|
|
97
110
|
Next Steps
|
|
98
111
|
~~~~~~~~~~
|
|
99
112
|
|
|
100
|
-
- Read the `Client Library Documentation`_ for Privileged Access Manager
|
|
113
|
+
- Read the `Client Library Documentation`_ for Privileged Access Manager
|
|
101
114
|
to see other available methods on the client.
|
|
102
|
-
- Read the `Privileged Access Manager
|
|
115
|
+
- Read the `Privileged Access Manager Product documentation`_ to learn
|
|
103
116
|
more about the product and see How-to Guides.
|
|
104
117
|
- View this `README`_ to see the full list of Cloud
|
|
105
118
|
APIs that we cover.
|
|
106
119
|
|
|
107
|
-
.. _Privileged Access Manager
|
|
120
|
+
.. _Privileged Access Manager Product documentation: https://cloud.google.com/iam/
|
|
108
121
|
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
|
|
109
122
|
|
|
110
123
|
Logging
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Copyright
|
|
2
|
+
# Copyright 2026 Google LLC
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
#
|
|
16
|
-
__version__ = "0.4.
|
|
16
|
+
__version__ = "0.4.2" # {x-release-please-version}
|
google_cloud_privilegedaccessmanager-0.4.2/google/cloud/privilegedaccessmanager_v1/__init__.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2026 Google LLC
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
import google.api_core as api_core
|
|
17
|
+
|
|
18
|
+
from google.cloud.privilegedaccessmanager_v1 import gapic_version as package_version
|
|
19
|
+
|
|
20
|
+
__version__ = package_version.__version__
|
|
21
|
+
|
|
22
|
+
# PEP 0810: Explicit Lazy Imports
|
|
23
|
+
# Python 3.15+ natively intercepts and defers these imports.
|
|
24
|
+
# Developers can disable this behavior and force eager imports.
|
|
25
|
+
# For more information, see:
|
|
26
|
+
# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
|
|
27
|
+
# Older Python versions safely ignore this variable.
|
|
28
|
+
__lazy_modules__ = {
|
|
29
|
+
"google.cloud.privilegedaccessmanager_v1.services.privileged_access_manager",
|
|
30
|
+
"google.cloud.privilegedaccessmanager_v1.types.privilegedaccessmanager",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
from .services.privileged_access_manager import (
|
|
35
|
+
PrivilegedAccessManagerAsyncClient,
|
|
36
|
+
PrivilegedAccessManagerClient,
|
|
37
|
+
)
|
|
38
|
+
from .types.privilegedaccessmanager import (
|
|
39
|
+
AccessControlEntry,
|
|
40
|
+
ApprovalWorkflow,
|
|
41
|
+
ApproveGrantRequest,
|
|
42
|
+
CheckOnboardingStatusRequest,
|
|
43
|
+
CheckOnboardingStatusResponse,
|
|
44
|
+
CreateEntitlementRequest,
|
|
45
|
+
CreateGrantRequest,
|
|
46
|
+
DeleteEntitlementRequest,
|
|
47
|
+
DenyGrantRequest,
|
|
48
|
+
Entitlement,
|
|
49
|
+
GetEntitlementRequest,
|
|
50
|
+
GetGrantRequest,
|
|
51
|
+
Grant,
|
|
52
|
+
Justification,
|
|
53
|
+
ListEntitlementsRequest,
|
|
54
|
+
ListEntitlementsResponse,
|
|
55
|
+
ListGrantsRequest,
|
|
56
|
+
ListGrantsResponse,
|
|
57
|
+
ManualApprovals,
|
|
58
|
+
OperationMetadata,
|
|
59
|
+
PrivilegedAccess,
|
|
60
|
+
RevokeGrantRequest,
|
|
61
|
+
SearchEntitlementsRequest,
|
|
62
|
+
SearchEntitlementsResponse,
|
|
63
|
+
SearchGrantsRequest,
|
|
64
|
+
SearchGrantsResponse,
|
|
65
|
+
UpdateEntitlementRequest,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
__all__ = (
|
|
69
|
+
"PrivilegedAccessManagerAsyncClient",
|
|
70
|
+
"AccessControlEntry",
|
|
71
|
+
"ApprovalWorkflow",
|
|
72
|
+
"ApproveGrantRequest",
|
|
73
|
+
"CheckOnboardingStatusRequest",
|
|
74
|
+
"CheckOnboardingStatusResponse",
|
|
75
|
+
"CreateEntitlementRequest",
|
|
76
|
+
"CreateGrantRequest",
|
|
77
|
+
"DeleteEntitlementRequest",
|
|
78
|
+
"DenyGrantRequest",
|
|
79
|
+
"Entitlement",
|
|
80
|
+
"GetEntitlementRequest",
|
|
81
|
+
"GetGrantRequest",
|
|
82
|
+
"Grant",
|
|
83
|
+
"Justification",
|
|
84
|
+
"ListEntitlementsRequest",
|
|
85
|
+
"ListEntitlementsResponse",
|
|
86
|
+
"ListGrantsRequest",
|
|
87
|
+
"ListGrantsResponse",
|
|
88
|
+
"ManualApprovals",
|
|
89
|
+
"OperationMetadata",
|
|
90
|
+
"PrivilegedAccess",
|
|
91
|
+
"PrivilegedAccessManagerClient",
|
|
92
|
+
"RevokeGrantRequest",
|
|
93
|
+
"SearchEntitlementsRequest",
|
|
94
|
+
"SearchEntitlementsResponse",
|
|
95
|
+
"SearchGrantsRequest",
|
|
96
|
+
"SearchGrantsResponse",
|
|
97
|
+
"UpdateEntitlementRequest",
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
api_core.check_python_version("google.cloud.privilegedaccessmanager_v1")
|
|
101
|
+
api_core.check_dependency_versions("google.cloud.privilegedaccessmanager_v1")
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2026 Google LLC
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
"""A compatibility module for older versions of google-api-core."""
|
|
17
|
+
|
|
18
|
+
import json
|
|
19
|
+
import os
|
|
20
|
+
from typing import Any, Dict, List, Optional, Tuple
|
|
21
|
+
from urllib.parse import urlparse, urlunparse
|
|
22
|
+
|
|
23
|
+
from google.api_core import path_template
|
|
24
|
+
from google.api_core.universe import EmptyUniverseError
|
|
25
|
+
from google.auth.exceptions import MutualTLSChannelError
|
|
26
|
+
from google.protobuf import json_format
|
|
27
|
+
|
|
28
|
+
try:
|
|
29
|
+
# note: `#type: ignore` is added because the return type for `should_use_client_cert`
|
|
30
|
+
# is different than that of the fallback implementation below. This will be removed once
|
|
31
|
+
# we bump the minimum supported version of google-auth.
|
|
32
|
+
from google.auth.transport.mtls import should_use_client_cert # type: ignore
|
|
33
|
+
except ImportError: # pragma: NO COVER
|
|
34
|
+
|
|
35
|
+
def should_use_client_cert():
|
|
36
|
+
"""Returns whether client certificate should be used for mTLS."""
|
|
37
|
+
use_client_cert = os.getenv(
|
|
38
|
+
"GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"
|
|
39
|
+
).lower()
|
|
40
|
+
if use_client_cert not in ("true", "false"):
|
|
41
|
+
raise ValueError(
|
|
42
|
+
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be"
|
|
43
|
+
" either `true` or `false`"
|
|
44
|
+
)
|
|
45
|
+
return use_client_cert == "true"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def read_environment_variables():
|
|
49
|
+
"""Returns the environment variables used by the client.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE,
|
|
53
|
+
GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables.
|
|
54
|
+
|
|
55
|
+
Raises:
|
|
56
|
+
ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not
|
|
57
|
+
any of ["true", "false"].
|
|
58
|
+
google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT
|
|
59
|
+
is not any of ["auto", "never", "always"].
|
|
60
|
+
"""
|
|
61
|
+
use_client_cert = should_use_client_cert()
|
|
62
|
+
use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower()
|
|
63
|
+
universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN")
|
|
64
|
+
if use_mtls_endpoint not in ("auto", "never", "always"):
|
|
65
|
+
raise MutualTLSChannelError(
|
|
66
|
+
"Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`,"
|
|
67
|
+
" `auto` or `always`"
|
|
68
|
+
)
|
|
69
|
+
return use_client_cert, use_mtls_endpoint, universe_domain_env
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
DEFAULT_UNIVERSE = "googleapis.com"
|
|
73
|
+
|
|
74
|
+
try:
|
|
75
|
+
from google.api_core.universe import get_default_mtls_endpoint
|
|
76
|
+
except ImportError: # pragma: NO COVER
|
|
77
|
+
|
|
78
|
+
def get_default_mtls_endpoint(api_endpoint: Optional[str]) -> Optional[str]:
|
|
79
|
+
"""Converts api endpoint to mTLS endpoint.
|
|
80
|
+
|
|
81
|
+
Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
|
|
82
|
+
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
|
|
83
|
+
Other URLs (including those that do not match these domain suffixes or
|
|
84
|
+
already contain '.mtls.') are passed through as-is.
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
api_endpoint (Optional[str]): the api endpoint to convert.
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Optional[str]: converted mTLS api endpoint.
|
|
91
|
+
"""
|
|
92
|
+
if not api_endpoint or ".mtls." in api_endpoint.lower():
|
|
93
|
+
return api_endpoint
|
|
94
|
+
|
|
95
|
+
has_scheme = "://" in api_endpoint
|
|
96
|
+
if not has_scheme:
|
|
97
|
+
parsed = urlparse("//" + api_endpoint)
|
|
98
|
+
else:
|
|
99
|
+
parsed = urlparse(api_endpoint)
|
|
100
|
+
|
|
101
|
+
host = parsed.hostname
|
|
102
|
+
if not host:
|
|
103
|
+
return api_endpoint
|
|
104
|
+
|
|
105
|
+
port = f":{parsed.port}" if parsed.port else ""
|
|
106
|
+
|
|
107
|
+
lowered_host = host.lower()
|
|
108
|
+
suffix_sandbox = ".sandbox.googleapis.com"
|
|
109
|
+
suffix_google = ".googleapis.com"
|
|
110
|
+
if lowered_host.endswith(suffix_sandbox):
|
|
111
|
+
new_host = host[: -len(suffix_sandbox)] + ".mtls.sandbox.googleapis.com"
|
|
112
|
+
elif lowered_host.endswith(suffix_google):
|
|
113
|
+
new_host = host[: -len(suffix_google)] + ".mtls.googleapis.com"
|
|
114
|
+
else:
|
|
115
|
+
return api_endpoint
|
|
116
|
+
|
|
117
|
+
netloc = new_host + port
|
|
118
|
+
new_parsed = parsed._replace(netloc=netloc)
|
|
119
|
+
|
|
120
|
+
if not has_scheme:
|
|
121
|
+
return urlunparse(new_parsed)[2:]
|
|
122
|
+
else:
|
|
123
|
+
return urlunparse(new_parsed)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
try:
|
|
127
|
+
from google.api_core.universe import get_api_endpoint
|
|
128
|
+
except ImportError: # pragma: NO COVER
|
|
129
|
+
|
|
130
|
+
def get_api_endpoint(
|
|
131
|
+
api_override: Optional[str],
|
|
132
|
+
universe_domain: str,
|
|
133
|
+
default_universe: str,
|
|
134
|
+
default_mtls_endpoint: Optional[str],
|
|
135
|
+
default_endpoint_template: str,
|
|
136
|
+
use_mtls: bool,
|
|
137
|
+
) -> str:
|
|
138
|
+
"""Return the API endpoint used by the client.
|
|
139
|
+
|
|
140
|
+
Args:
|
|
141
|
+
api_override (Optional[str]): The API endpoint override. If specified,
|
|
142
|
+
this is always returned.
|
|
143
|
+
universe_domain (str): The universe domain used by the client.
|
|
144
|
+
default_universe (str): The default universe domain.
|
|
145
|
+
default_mtls_endpoint (Optional[str]): The default mTLS endpoint.
|
|
146
|
+
default_endpoint_template (str): The default endpoint template containing
|
|
147
|
+
a placeholder `{UNIVERSE_DOMAIN}`.
|
|
148
|
+
use_mtls (bool): Whether to use the mTLS endpoint.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
str: The API endpoint to be used by the client.
|
|
152
|
+
|
|
153
|
+
Raises:
|
|
154
|
+
google.auth.exceptions.MutualTLSChannelError: If mTLS is requested but
|
|
155
|
+
not supported in the configured universe domain.
|
|
156
|
+
ValueError: If mTLS is requested but no mTLS endpoint is available.
|
|
157
|
+
"""
|
|
158
|
+
if api_override is not None:
|
|
159
|
+
return api_override
|
|
160
|
+
|
|
161
|
+
if use_mtls:
|
|
162
|
+
if universe_domain.lower() != default_universe.lower():
|
|
163
|
+
raise MutualTLSChannelError(
|
|
164
|
+
f"mTLS is not supported in any universe other than {default_universe}."
|
|
165
|
+
)
|
|
166
|
+
if not default_mtls_endpoint:
|
|
167
|
+
raise ValueError("mTLS endpoint is not available.")
|
|
168
|
+
return default_mtls_endpoint
|
|
169
|
+
else:
|
|
170
|
+
return default_endpoint_template.format(UNIVERSE_DOMAIN=universe_domain)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
try:
|
|
174
|
+
from google.api_core.universe import get_universe_domain
|
|
175
|
+
except ImportError: # pragma: NO COVER
|
|
176
|
+
|
|
177
|
+
def get_universe_domain(
|
|
178
|
+
*potential_universes: Optional[str],
|
|
179
|
+
default_universe: str,
|
|
180
|
+
) -> str:
|
|
181
|
+
"""Return the universe domain used by the client.
|
|
182
|
+
|
|
183
|
+
Args:
|
|
184
|
+
*potential_universes (Optional[str]): Potential universe domains in order of preference.
|
|
185
|
+
default_universe (str): The default universe domain.
|
|
186
|
+
|
|
187
|
+
Returns:
|
|
188
|
+
str: The universe domain to be used by the client.
|
|
189
|
+
|
|
190
|
+
Raises:
|
|
191
|
+
EmptyUniverseError: If the resolved universe domain is an empty string.
|
|
192
|
+
"""
|
|
193
|
+
resolved = next(
|
|
194
|
+
(x.strip() for x in potential_universes if x is not None),
|
|
195
|
+
default_universe,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
if not resolved:
|
|
199
|
+
raise EmptyUniverseError()
|
|
200
|
+
return resolved
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
try:
|
|
204
|
+
from google.api_core.rest_helpers import transcode_request # type: ignore
|
|
205
|
+
except ImportError: # pragma: NO COVER
|
|
206
|
+
|
|
207
|
+
def transcode_request(
|
|
208
|
+
http_options: List[Dict[str, str]],
|
|
209
|
+
request: Any,
|
|
210
|
+
required_fields_default_values: Optional[Dict[str, Any]] = None,
|
|
211
|
+
rest_numeric_enums: bool = False,
|
|
212
|
+
) -> Tuple[Dict[str, Any], Optional[str], Dict[str, Any]]:
|
|
213
|
+
"""Transcodes a request into HTTP method, URI, body, and query parameters.
|
|
214
|
+
|
|
215
|
+
Args:
|
|
216
|
+
http_options (List[Dict[str, str]]): List of HTTP transcoding rules.
|
|
217
|
+
request (Any): The protobuf or proto-plus request message.
|
|
218
|
+
required_fields_default_values (Optional[Dict[str, Any]]): Dictionary
|
|
219
|
+
of required fields default values to merge into query parameters if missing.
|
|
220
|
+
rest_numeric_enums (bool): Whether to encode enums as integers.
|
|
221
|
+
|
|
222
|
+
Returns:
|
|
223
|
+
Tuple[Dict[str, Any], Optional[str], Dict[str, Any]]: A tuple containing:
|
|
224
|
+
- The raw transcoded request dictionary (containing keys like 'uri', 'method').
|
|
225
|
+
- The serialized request body JSON string, or None if no body.
|
|
226
|
+
- The query parameters dictionary.
|
|
227
|
+
"""
|
|
228
|
+
if request is None:
|
|
229
|
+
raise TypeError("request cannot be None")
|
|
230
|
+
|
|
231
|
+
# Convert proto-plus message to its underlying protobuf message if needed
|
|
232
|
+
pb_request = getattr(request, "_pb", request)
|
|
233
|
+
|
|
234
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
235
|
+
|
|
236
|
+
body_json = None
|
|
237
|
+
if transcoded_request.get("body") is not None:
|
|
238
|
+
body_json = json_format.MessageToJson(
|
|
239
|
+
transcoded_request["body"],
|
|
240
|
+
use_integers_for_enums=rest_numeric_enums,
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
query_params_json = {}
|
|
244
|
+
if transcoded_request.get("query_params") is not None:
|
|
245
|
+
query_params_json = json.loads(
|
|
246
|
+
json_format.MessageToJson(
|
|
247
|
+
transcoded_request["query_params"],
|
|
248
|
+
use_integers_for_enums=rest_numeric_enums,
|
|
249
|
+
)
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
# If required_fields_default_values is provided, we merge default values for missing
|
|
253
|
+
# required fields into the query parameters.
|
|
254
|
+
if required_fields_default_values:
|
|
255
|
+
for k, v in required_fields_default_values.items():
|
|
256
|
+
if k not in query_params_json:
|
|
257
|
+
query_params_json[k] = v
|
|
258
|
+
|
|
259
|
+
if rest_numeric_enums:
|
|
260
|
+
query_params_json["$alt"] = "json;enum-encoding=int"
|
|
261
|
+
|
|
262
|
+
return transcoded_request, body_json, query_params_json
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Copyright
|
|
2
|
+
# Copyright 2026 Google LLC
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
#
|
|
16
|
-
__version__ = "0.4.
|
|
16
|
+
__version__ = "0.4.2" # {x-release-please-version}
|