blob: 430c48a8c28cc67c0b46ada6190b624950fbaedd [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#generateAccessToken">generateAccessToken(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Generates an OAuth 2.0 access token for a service account.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#generateIdToken">generateIdToken(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Generates an OpenID Connect ID token for a service account.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#signBlob">signBlob(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Signs a blob using a service account's system-managed private key.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#signJwt">signJwt(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Signs a JWT using a service account's system-managed private key.</p>
89<h3>Method Details</h3>
90<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070091 <code class="details" id="generateAccessToken">generateAccessToken(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092 <pre>Generates an OAuth 2.0 access token for a service account.
93
94Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070095 name: string, Required. The resource name of the service account for which the credentials
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096are requested, in the following format:
97`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
98character is required; replacing it with a project ID is invalid. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -070099 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100 The object takes the form of:
101
102{
Bu Sun Kim65020912020-05-20 12:08:20 -0700103 &quot;scope&quot;: [ # Required. Code to identify the scopes to be included in the OAuth 2.0 access token.
104 # See https://developers.google.com/identity/protocols/googlescopes for more
105 # information.
106 # At least one value required.
107 &quot;A String&quot;,
108 ],
109 &quot;delegates&quot;: [ # The sequence of service accounts in a delegation chain. Each service
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 # account must be granted the `roles/iam.serviceAccountTokenCreator` role
111 # on its next service account in the chain. The last service account in the
112 # chain must be granted the `roles/iam.serviceAccountTokenCreator` role
113 # on the service account that is specified in the `name` field of the
114 # request.
115 #
116 # The delegates must have the following format:
117 # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
118 # character is required; replacing it with a project ID is invalid.
Bu Sun Kim65020912020-05-20 12:08:20 -0700119 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;lifetime&quot;: &quot;A String&quot;, # The desired lifetime duration of the access token in seconds.
122 # Must be set to a value less than or equal to 3600 (1 hour). If a value is
123 # not specified, the token&#x27;s lifetime will be set to a default value of one
124 # hour.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125 }
126
127 x__xgafv: string, V1 error format.
128 Allowed values
129 1 - v1 error format
130 2 - v2 error format
131
132Returns:
133 An object of the form:
134
135 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;expireTime&quot;: &quot;A String&quot;, # Token expiration time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700137 # The expiration time is always set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 &quot;accessToken&quot;: &quot;A String&quot;, # The OAuth 2.0 access token.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 }</pre>
140</div>
141
142<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 <code class="details" id="generateIdToken">generateIdToken(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 <pre>Generates an OpenID Connect ID token for a service account.
145
146Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 name: string, Required. The resource name of the service account for which the credentials
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148are requested, in the following format:
149`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
150character is required; replacing it with a project ID is invalid. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700151 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152 The object takes the form of:
153
154{
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 &quot;delegates&quot;: [ # The sequence of service accounts in a delegation chain. Each service
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700156 # account must be granted the `roles/iam.serviceAccountTokenCreator` role
157 # on its next service account in the chain. The last service account in the
158 # chain must be granted the `roles/iam.serviceAccountTokenCreator` role
159 # on the service account that is specified in the `name` field of the
160 # request.
161 #
162 # The delegates must have the following format:
163 # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
164 # character is required; replacing it with a project ID is invalid.
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700166 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 &quot;audience&quot;: &quot;A String&quot;, # Required. The audience for the token, such as the API or account that this token
168 # grants access to.
169 &quot;includeEmail&quot;: True or False, # Include the service account email in the token. If set to `true`, the
170 # token will contain `email` and `email_verified` claims.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700171 }
172
173 x__xgafv: string, V1 error format.
174 Allowed values
175 1 - v1 error format
176 2 - v2 error format
177
178Returns:
179 An object of the form:
180
181 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 &quot;token&quot;: &quot;A String&quot;, # The OpenId Connect ID token.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700183 }</pre>
184</div>
185
186<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700187 <code class="details" id="signBlob">signBlob(name, body=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 <pre>Signs a blob using a service account&#x27;s system-managed private key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189
190Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 name: string, Required. The resource name of the service account for which the credentials
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192are requested, in the following format:
193`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
194character is required; replacing it with a project ID is invalid. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700196 The object takes the form of:
197
198{
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 &quot;delegates&quot;: [ # The sequence of service accounts in a delegation chain. Each service
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 # account must be granted the `roles/iam.serviceAccountTokenCreator` role
201 # on its next service account in the chain. The last service account in the
202 # chain must be granted the `roles/iam.serviceAccountTokenCreator` role
203 # on the service account that is specified in the `name` field of the
204 # request.
205 #
206 # The delegates must have the following format:
207 # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
208 # character is required; replacing it with a project ID is invalid.
Bu Sun Kim65020912020-05-20 12:08:20 -0700209 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 &quot;payload&quot;: &quot;A String&quot;, # Required. The bytes to sign.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 }
213
214 x__xgafv: string, V1 error format.
215 Allowed values
216 1 - v1 error format
217 2 - v2 error format
218
219Returns:
220 An object of the form:
221
222 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700223 &quot;keyId&quot;: &quot;A String&quot;, # The ID of the key used to sign the blob.
224 &quot;signedBlob&quot;: &quot;A String&quot;, # The signature for the blob. Does not include the original blob.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 }</pre>
226</div>
227
228<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700229 <code class="details" id="signJwt">signJwt(name, body=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 <pre>Signs a JWT using a service account&#x27;s system-managed private key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231
232Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 name: string, Required. The resource name of the service account for which the credentials
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234are requested, in the following format:
235`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
236character is required; replacing it with a project ID is invalid. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700237 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700238 The object takes the form of:
239
240{
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 &quot;payload&quot;: &quot;A String&quot;, # Required. The JWT payload to sign. Must be a serialized JSON object that contains a
242 # JWT Claim Set. For example: `{&quot;sub&quot;: &quot;user@example.com&quot;, &quot;iat&quot;: 313435}`
Dan O'Mearadd494642020-05-01 07:42:23 -0700243 #
244 # If the claim set contains an `exp` claim, it must be an integer timestamp
245 # that is not in the past and at most 12 hours in the future.
Bu Sun Kim65020912020-05-20 12:08:20 -0700246 &quot;delegates&quot;: [ # The sequence of service accounts in a delegation chain. Each service
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 # account must be granted the `roles/iam.serviceAccountTokenCreator` role
248 # on its next service account in the chain. The last service account in the
249 # chain must be granted the `roles/iam.serviceAccountTokenCreator` role
250 # on the service account that is specified in the `name` field of the
251 # request.
252 #
253 # The delegates must have the following format:
254 # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
255 # character is required; replacing it with a project ID is invalid.
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257 ],
258 }
259
260 x__xgafv: string, V1 error format.
261 Allowed values
262 1 - v1 error format
263 2 - v2 error format
264
265Returns:
266 An object of the form:
267
268 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 &quot;keyId&quot;: &quot;A String&quot;, # The ID of the key used to sign the JWT.
270 &quot;signedJwt&quot;: &quot;A String&quot;, # The signed JWT. Contains the automatically generated header; the
Dan O'Mearadd494642020-05-01 07:42:23 -0700271 # client-supplied payload; and the signature, which is generated using the
272 # key referenced by the `kid` field in the header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 }</pre>
274</div>
275
276</body></html>