blob: b27946659dcdf44c646eb722ce32557c0871795c [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{
103 "lifetime": "A String", # The desired lifetime duration of the access token in seconds.
104 # Must be set to a value less than or equal to 3600 (1 hour). If a value is
105 # not specified, the token's lifetime will be set to a default value of one
106 # hour.
107 "delegates": [ # The sequence of service accounts in a delegation chain. Each service
108 # account must be granted the `roles/iam.serviceAccountTokenCreator` role
109 # on its next service account in the chain. The last service account in the
110 # chain must be granted the `roles/iam.serviceAccountTokenCreator` role
111 # on the service account that is specified in the `name` field of the
112 # request.
113 #
114 # The delegates must have the following format:
115 # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
116 # character is required; replacing it with a project ID is invalid.
117 "A String",
118 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700119 "scope": [ # Required. Code to identify the scopes to be included in the OAuth 2.0 access token.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 # See https://developers.google.com/identity/protocols/googlescopes for more
121 # information.
122 # At least one value required.
123 "A String",
124 ],
125 }
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 {
136 "expireTime": "A String", # Token expiration time.
137 # The expiration time is always set.
138 "accessToken": "A String", # The OAuth 2.0 access token.
139 }</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{
155 "includeEmail": True or False, # Include the service account email in the token. If set to `true`, the
156 # token will contain `email` and `email_verified` claims.
Dan O'Mearadd494642020-05-01 07:42:23 -0700157 "audience": "A String", # Required. The audience for the token, such as the API or account that this token
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 # grants access to.
159 "delegates": [ # The sequence of service accounts in a delegation chain. Each service
160 # account must be granted the `roles/iam.serviceAccountTokenCreator` role
161 # on its next service account in the chain. The last service account in the
162 # chain must be granted the `roles/iam.serviceAccountTokenCreator` role
163 # on the service account that is specified in the `name` field of the
164 # request.
165 #
166 # The delegates must have the following format:
167 # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
168 # character is required; replacing it with a project ID is invalid.
169 "A String",
170 ],
171 }
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 {
182 "token": "A String", # The OpenId Connect ID token.
183 }</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 Kim715bd7f2019-06-14 16:50:42 -0700188 <pre>Signs a blob using a service account's system-managed private key.
189
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{
Dan O'Mearadd494642020-05-01 07:42:23 -0700199 "payload": "A String", # Required. The bytes to sign.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 "delegates": [ # The sequence of service accounts in a delegation chain. Each service
201 # account must be granted the `roles/iam.serviceAccountTokenCreator` role
202 # on its next service account in the chain. The last service account in the
203 # chain must be granted the `roles/iam.serviceAccountTokenCreator` role
204 # on the service account that is specified in the `name` field of the
205 # request.
206 #
207 # The delegates must have the following format:
208 # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
209 # character is required; replacing it with a project ID is invalid.
210 "A String",
211 ],
212 }
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 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700223 "signedBlob": "A String", # The signature for the blob. Does not include the original blob.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224 "keyId": "A String", # The ID of the key used to sign the blob.
225 }</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 Kim715bd7f2019-06-14 16:50:42 -0700230 <pre>Signs a JWT using a service account's system-managed private key.
231
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{
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 "payload": "A String", # Required. The JWT payload to sign. Must be a serialized JSON object that contains a
242 # JWT Claim Set. For example: `{"sub": "user@example.com", "iat": 313435}`
243 #
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 Kim715bd7f2019-06-14 16:50:42 -0700246 "delegates": [ # The sequence of service accounts in a delegation chain. Each service
247 # 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.
256 "A String",
257 ],
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 {
269 "keyId": "A String", # The ID of the key used to sign the JWT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700270 "signedJwt": "A String", # The signed JWT. Contains the automatically generated header; the
271 # 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>