Debian Codegraph @

docs/dyn/iamcredentials_v1.projects.serviceAccounts.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="iamcredentials_v1.html">IAM Service Account Credentials API</a> . <a href="iamcredentials_v1.projects.html">projects</a> . <a href="iamcredentials_v1.projects.serviceAccounts.html">serviceAccounts</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#generateAccessToken">generateAccessToken(name, body=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Generates an OAuth 2.0 access token for a service account.</p>
83 <p class="toc_element">
84 <code><a href="#generateIdToken">generateIdToken(name, body=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Generates an OpenID Connect ID token for a service account.</p>
86 <p class="toc_element">
87 <code><a href="#getAllowedLocations">getAllowedLocations(name, x__xgafv=None)</a></code></p>
88 <p class="firstline">Returns the trust boundary info for a given service account.</p>
89 <p class="toc_element">
90 <code><a href="#signBlob">signBlob(name, body=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Signs a blob using a service account's system-managed private key.</p>
92 <p class="toc_element">
93 <code><a href="#signJwt">signJwt(name, body=None, x__xgafv=None)</a></code></p>
94 <p class="firstline">Signs a JWT using a service account's system-managed private key.</p>
95 <h3>Method Details</h3>
96 <div class="method">
97 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99 </div>
100
101 <div class="method">
102 <code class="details" id="generateAccessToken">generateAccessToken(name, body=None, x__xgafv=None)</code>
103 <pre>Generates an OAuth 2.0 access token for a service account.
104
105 Args:
106 name: string, Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. (required)
107 body: object, The request body.
108 The object takes the form of:
109
110 {
111 &quot;delegates&quot;: [ # The sequence of service accounts in a delegation chain. This field is required for [delegated requests](https://cloud.google.com/iam/help/credentials/delegated-request). For [direct requests](https://cloud.google.com/iam/help/credentials/direct-request), which are more common, do not specify this field. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.
112 &quot;A String&quot;,
113 ],
114 &quot;lifetime&quot;: &quot;A String&quot;, # The desired lifetime duration of the access token in seconds. By default, the maximum allowed value is 1 hour. To set a lifetime of up to 12 hours, you can add the service account as an allowed value in an Organization Policy that enforces the `constraints/iam.allowServiceAccountCredentialLifetimeExtension` constraint. See detailed instructions at https://cloud.google.com/iam/help/credentials/lifetime If a value is not specified, the token&#x27;s lifetime will be set to a default value of 1 hour.
115 &quot;scope&quot;: [ # Required. Code to identify the scopes to be included in the OAuth 2.0 access token. See https://developers.google.com/identity/protocols/googlescopes for more information. At least one value required.
116 &quot;A String&quot;,
117 ],
118 }
119
120 x__xgafv: string, V1 error format.
121 Allowed values
122 1 - v1 error format
123 2 - v2 error format
124
125 Returns:
126 An object of the form:
127
128 {
129 &quot;accessToken&quot;: &quot;A String&quot;, # The OAuth 2.0 access token.
130 &quot;expireTime&quot;: &quot;A String&quot;, # Token expiration time. The expiration time is always set.
131 }</pre>
132 </div>
133
134 <div class="method">
135 <code class="details" id="generateIdToken">generateIdToken(name, body=None, x__xgafv=None)</code>
136 <pre>Generates an OpenID Connect ID token for a service account.
137
138 Args:
139 name: string, Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. (required)
140 body: object, The request body.
141 The object takes the form of:
142
143 {
144 &quot;audience&quot;: &quot;A String&quot;, # Required. The audience for the token, such as the API or account that this token grants access to.
145 &quot;delegates&quot;: [ # The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.
146 &quot;A String&quot;,
147 ],
148 &quot;includeEmail&quot;: True or False, # Include the service account email in the token. If set to `true`, the token will contain `email` and `email_verified` claims.
149 &quot;organizationNumberIncluded&quot;: True or False, # Include the organization number of the service account in the token. If set to `true`, the token will contain a `google.organization_number` claim. The value of the claim will be `null` if the service account isn&#x27;t associated with an organization.
150 }
151
152 x__xgafv: string, V1 error format.
153 Allowed values
154 1 - v1 error format
155 2 - v2 error format
156
157 Returns:
158 An object of the form:
159
160 {
161 &quot;token&quot;: &quot;A String&quot;, # The OpenId Connect ID token. The token is a JSON Web Token (JWT) that contains a payload with claims. See the [JSON Web Token spec](https://tools.ietf.org/html/rfc7519) for more information. Here is an example of a decoded JWT payload: ``` { &quot;iss&quot;: &quot;https://accounts.google.com&quot;, &quot;iat&quot;: 1496953245, &quot;exp&quot;: 1496953245, &quot;aud&quot;: &quot;https://www.example.com&quot;, &quot;sub&quot;: &quot;107517467455664443765&quot;, &quot;azp&quot;: &quot;107517467455664443765&quot;, &quot;email&quot;: &quot;[email protected]&quot;, &quot;email_verified&quot;: true, &quot;google&quot;: { &quot;organization_number&quot;: 123456 } } ```
162 }</pre>
163 </div>
164
165 <div class="method">
166 <code class="details" id="getAllowedLocations">getAllowedLocations(name, x__xgafv=None)</code>
167 <pre>Returns the trust boundary info for a given service account.
168
169 Args:
170 name: string, Required. Resource name of service account. Format: `projects/-/serviceAccounts/{service_account_email}` (required)
171 x__xgafv: string, V1 error format.
172 Allowed values
173 1 - v1 error format
174 2 - v2 error format
175
176 Returns:
177 An object of the form:
178
179 { # Represents a list of allowed locations for given service account.
180 &quot;encodedLocations&quot;: &quot;A String&quot;, # Output only. The hex encoded bitmap of the trust boundary locations
181 &quot;locations&quot;: [ # Output only. The human readable trust boundary locations. For example, [&quot;us-central1&quot;, &quot;europe-west1&quot;]
182 &quot;A String&quot;,
183 ],
184 }</pre>
185 </div>
186
187 <div class="method">
188 <code class="details" id="signBlob">signBlob(name, body=None, x__xgafv=None)</code>
189 <pre>Signs a blob using a service account&#x27;s system-managed private key.
190
191 Args:
192 name: string, Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. (required)
193 body: object, The request body.
194 The object takes the form of:
195
196 {
197 &quot;delegates&quot;: [ # The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.
198 &quot;A String&quot;,
199 ],
200 &quot;payload&quot;: &quot;A String&quot;, # Required. The bytes to sign.
201 }
202
203 x__xgafv: string, V1 error format.
204 Allowed values
205 1 - v1 error format
206 2 - v2 error format
207
208 Returns:
209 An object of the form:
210
211 {
212 &quot;keyId&quot;: &quot;A String&quot;, # The ID of the key used to sign the blob. The key used for signing will remain valid for at least 12 hours after the blob is signed. To verify the signature, you can retrieve the public key in several formats from the following endpoints: - RSA public key wrapped in an X.509 v3 certificate: `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT_EMAIL}` - Raw key in JSON format: `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_EMAIL}` - JSON Web Key (JWK): `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_EMAIL}`
213 &quot;signedBlob&quot;: &quot;A String&quot;, # The signature for the blob. Does not include the original blob. After the key pair referenced by the `key_id` response field expires, Google no longer exposes the public key that can be used to verify the blob. As a result, the receiver can no longer verify the signature.
214 }</pre>
215 </div>
216
217 <div class="method">
218 <code class="details" id="signJwt">signJwt(name, body=None, x__xgafv=None)</code>
219 <pre>Signs a JWT using a service account&#x27;s system-managed private key.
220
221 Args:
222 name: string, Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. (required)
223 body: object, The request body.
224 The object takes the form of:
225
226 {
227 &quot;delegates&quot;: [ # The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.
228 &quot;A String&quot;,
229 ],
230 &quot;payload&quot;: &quot;A String&quot;, # Required. The JWT payload to sign. Must be a serialized JSON object that contains a JWT Claims Set. For example: `{&quot;sub&quot;: &quot;[email protected]&quot;, &quot;iat&quot;: 313435}` If the JWT Claims Set contains an expiration time (`exp`) claim, it must be an integer timestamp that is not in the past and no more than 12 hours in the future.
231 }
232
233 x__xgafv: string, V1 error format.
234 Allowed values
235 1 - v1 error format
236 2 - v2 error format
237
238 Returns:
239 An object of the form:
240
241 {
242 &quot;keyId&quot;: &quot;A String&quot;, # The ID of the key used to sign the JWT. The key used for signing will remain valid for at least 12 hours after the JWT is signed. To verify the signature, you can retrieve the public key in several formats from the following endpoints: - RSA public key wrapped in an X.509 v3 certificate: `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT_EMAIL}` - Raw key in JSON format: `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_EMAIL}` - JSON Web Key (JWK): `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_EMAIL}`
243 &quot;signedJwt&quot;: &quot;A String&quot;, # The signed JWT. Contains the automatically generated header; the client-supplied payload; and the signature, which is generated using the key referenced by the `kid` field in the header. After the key pair referenced by the `key_id` response field expires, Google no longer exposes the public key that can be used to verify the JWT. As a result, the receiver can no longer verify the signature.
244 }</pre>
245 </div>
246
247 </body></html>