Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 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 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="iam_v1.html">Identity and Access Management (IAM) API</a> . <a href="iam_v1.projects.html">projects</a> . <a href="iam_v1.projects.serviceAccounts.html">serviceAccounts</a> . <a href="iam_v1.projects.serviceAccounts.keys.html">keys</a></h1> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#create">create(name, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 79 | <p class="firstline">Creates a ServiceAccountKey.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 80 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 81 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 82 | <p class="firstline">Deletes a ServiceAccountKey.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 83 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 84 | <code><a href="#get">get(name, publicKeyType=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 85 | <p class="firstline">Gets a ServiceAccountKey.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 86 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 87 | <code><a href="#list">list(name, keyTypes=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 88 | <p class="firstline">Lists every ServiceAccountKey for a service account.</p> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 89 | <p class="toc_element"> |
| 90 | <code><a href="#upload">upload(name, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 91 | <p class="firstline">Creates a ServiceAccountKey, using a public key that you provide.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 94 | <code class="details" id="create">create(name, body=None, x__xgafv=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 95 | <pre>Creates a ServiceAccountKey. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 96 | |
| 97 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 98 | name: string, Required. The resource name of the service account in the following format: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 99 | `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. |
| 100 | Using `-` as a wildcard for the `PROJECT_ID` will infer the project from |
| 101 | the account. The `ACCOUNT` value can be the `email` address or the |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 102 | `unique_id` of the service account. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 103 | body: object, The request body. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 104 | The object takes the form of: |
| 105 | |
| 106 | { # The service account key create request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 107 | "keyAlgorithm": "A String", # Which type of key and algorithm to use for the key. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | # The default is currently a 2K RSA key. However this may change in the |
| 109 | # future. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 110 | "privateKeyType": "A String", # The output format of the private key. The default value is |
| 111 | # `TYPE_GOOGLE_CREDENTIALS_FILE`, which is the Google Credentials File |
| 112 | # format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 116 | Allowed values |
| 117 | 1 - v1 error format |
| 118 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 119 | |
| 120 | Returns: |
| 121 | An object of the form: |
| 122 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 123 | { # Represents a service account key. |
| 124 | # |
| 125 | # A service account has two sets of key-pairs: user-managed, and |
| 126 | # system-managed. |
| 127 | # |
| 128 | # User-managed key-pairs can be created and deleted by users. Users are |
| 129 | # responsible for rotating these keys periodically to ensure security of |
| 130 | # their service accounts. Users retain the private key of these key-pairs, |
| 131 | # and Google retains ONLY the public key. |
| 132 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 133 | # System-managed keys are automatically rotated by Google, and are used for |
| 134 | # signing for a maximum of two weeks. The rotation process is probabilistic, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 135 | # and usage of the new key will gradually ramp up and down over the key's |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 136 | # lifetime. We recommend caching the public key set for a service account for |
| 137 | # no more than 24 hours to ensure you have access to the latest keys. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 138 | # |
| 139 | # Public keys for all service accounts are also published at the OAuth2 |
| 140 | # Service Account API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 141 | "privateKeyType": "A String", # The output format for the private key. |
| 142 | # Only provided in `CreateServiceAccountKey` responses, not |
| 143 | # in `GetServiceAccountKey` or `ListServiceAccountKey` responses. |
| 144 | # |
| 145 | # Google never exposes system-managed private keys, and never retains |
| 146 | # user-managed private keys. |
| 147 | "validAfterTime": "A String", # The key can be used after this timestamp. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 148 | "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses. |
| 149 | "name": "A String", # The resource name of the service account key in the following format |
| 150 | # `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 151 | "keyOrigin": "A String", # The key origin. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 152 | "validBeforeTime": "A String", # The key can be used before this timestamp. |
| 153 | # For system-managed key pairs, this timestamp is the end time for the |
| 154 | # private key signing operation. The public key could still be used |
| 155 | # for verification for a few hours after this time. |
| 156 | "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key. |
| 157 | "keyType": "A String", # The key type. |
| 158 | "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey` |
| 159 | # responses. Make sure to keep the private key data secure because it |
| 160 | # allows for the assertion of the service account identity. |
| 161 | # When base64 decoded, the private key data can be used to authenticate with |
| 162 | # Google API client libraries and with |
| 163 | # <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud |
| 164 | # auth activate-service-account</a>. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 165 | }</pre> |
| 166 | </div> |
| 167 | |
| 168 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 169 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 170 | <pre>Deletes a ServiceAccountKey. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 171 | |
| 172 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 173 | name: string, Required. The resource name of the service account key in the following format: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 174 | `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
| 175 | Using `-` as a wildcard for the `PROJECT_ID` will infer the project from |
| 176 | the account. The `ACCOUNT` value can be the `email` address or the |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 177 | `unique_id` of the service account. (required) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 178 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 179 | Allowed values |
| 180 | 1 - v1 error format |
| 181 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 182 | |
| 183 | Returns: |
| 184 | An object of the form: |
| 185 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 186 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 187 | # empty messages in your APIs. A typical example is to use it as the request |
| 188 | # or the response type of an API method. For instance: |
| 189 | # |
| 190 | # service Foo { |
| 191 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 192 | # } |
| 193 | # |
| 194 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 195 | }</pre> |
| 196 | </div> |
| 197 | |
| 198 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 199 | <code class="details" id="get">get(name, publicKeyType=None, x__xgafv=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 200 | <pre>Gets a ServiceAccountKey. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 201 | |
| 202 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 203 | name: string, Required. The resource name of the service account key in the following format: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 204 | `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 205 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 206 | Using `-` as a wildcard for the `PROJECT_ID` will infer the project from |
| 207 | the account. The `ACCOUNT` value can be the `email` address or the |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 208 | `unique_id` of the service account. (required) |
| 209 | publicKeyType: string, The output format of the public key requested. |
| 210 | X509_PEM is the default output format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 211 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 212 | Allowed values |
| 213 | 1 - v1 error format |
| 214 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 215 | |
| 216 | Returns: |
| 217 | An object of the form: |
| 218 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 219 | { # Represents a service account key. |
| 220 | # |
| 221 | # A service account has two sets of key-pairs: user-managed, and |
| 222 | # system-managed. |
| 223 | # |
| 224 | # User-managed key-pairs can be created and deleted by users. Users are |
| 225 | # responsible for rotating these keys periodically to ensure security of |
| 226 | # their service accounts. Users retain the private key of these key-pairs, |
| 227 | # and Google retains ONLY the public key. |
| 228 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 229 | # System-managed keys are automatically rotated by Google, and are used for |
| 230 | # signing for a maximum of two weeks. The rotation process is probabilistic, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 231 | # and usage of the new key will gradually ramp up and down over the key's |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 232 | # lifetime. We recommend caching the public key set for a service account for |
| 233 | # no more than 24 hours to ensure you have access to the latest keys. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 234 | # |
| 235 | # Public keys for all service accounts are also published at the OAuth2 |
| 236 | # Service Account API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 237 | "privateKeyType": "A String", # The output format for the private key. |
| 238 | # Only provided in `CreateServiceAccountKey` responses, not |
| 239 | # in `GetServiceAccountKey` or `ListServiceAccountKey` responses. |
| 240 | # |
| 241 | # Google never exposes system-managed private keys, and never retains |
| 242 | # user-managed private keys. |
| 243 | "validAfterTime": "A String", # The key can be used after this timestamp. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 244 | "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses. |
| 245 | "name": "A String", # The resource name of the service account key in the following format |
| 246 | # `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 247 | "keyOrigin": "A String", # The key origin. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 248 | "validBeforeTime": "A String", # The key can be used before this timestamp. |
| 249 | # For system-managed key pairs, this timestamp is the end time for the |
| 250 | # private key signing operation. The public key could still be used |
| 251 | # for verification for a few hours after this time. |
| 252 | "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key. |
| 253 | "keyType": "A String", # The key type. |
| 254 | "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey` |
| 255 | # responses. Make sure to keep the private key data secure because it |
| 256 | # allows for the assertion of the service account identity. |
| 257 | # When base64 decoded, the private key data can be used to authenticate with |
| 258 | # Google API client libraries and with |
| 259 | # <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud |
| 260 | # auth activate-service-account</a>. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 261 | }</pre> |
| 262 | </div> |
| 263 | |
| 264 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 265 | <code class="details" id="list">list(name, keyTypes=None, x__xgafv=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 266 | <pre>Lists every ServiceAccountKey for a service account. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 267 | |
| 268 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 269 | name: string, Required. The resource name of the service account in the following format: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 270 | `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 271 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 272 | Using `-` as a wildcard for the `PROJECT_ID`, will infer the project from |
| 273 | the account. The `ACCOUNT` value can be the `email` address or the |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 274 | `unique_id` of the service account. (required) |
| 275 | keyTypes: string, Filters the types of keys the user wants to include in the list |
| 276 | response. Duplicate key types are not allowed. If no key type |
| 277 | is provided, all keys are returned. (repeated) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 278 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 279 | Allowed values |
| 280 | 1 - v1 error format |
| 281 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 282 | |
| 283 | Returns: |
| 284 | An object of the form: |
| 285 | |
| 286 | { # The service account keys list response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 287 | "keys": [ # The public keys for the service account. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 288 | { # Represents a service account key. |
| 289 | # |
| 290 | # A service account has two sets of key-pairs: user-managed, and |
| 291 | # system-managed. |
| 292 | # |
| 293 | # User-managed key-pairs can be created and deleted by users. Users are |
| 294 | # responsible for rotating these keys periodically to ensure security of |
| 295 | # their service accounts. Users retain the private key of these key-pairs, |
| 296 | # and Google retains ONLY the public key. |
| 297 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 298 | # System-managed keys are automatically rotated by Google, and are used for |
| 299 | # signing for a maximum of two weeks. The rotation process is probabilistic, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 300 | # and usage of the new key will gradually ramp up and down over the key's |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 301 | # lifetime. We recommend caching the public key set for a service account for |
| 302 | # no more than 24 hours to ensure you have access to the latest keys. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 303 | # |
| 304 | # Public keys for all service accounts are also published at the OAuth2 |
| 305 | # Service Account API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 306 | "privateKeyType": "A String", # The output format for the private key. |
| 307 | # Only provided in `CreateServiceAccountKey` responses, not |
| 308 | # in `GetServiceAccountKey` or `ListServiceAccountKey` responses. |
| 309 | # |
| 310 | # Google never exposes system-managed private keys, and never retains |
| 311 | # user-managed private keys. |
| 312 | "validAfterTime": "A String", # The key can be used after this timestamp. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 313 | "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses. |
| 314 | "name": "A String", # The resource name of the service account key in the following format |
| 315 | # `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 316 | "keyOrigin": "A String", # The key origin. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 317 | "validBeforeTime": "A String", # The key can be used before this timestamp. |
| 318 | # For system-managed key pairs, this timestamp is the end time for the |
| 319 | # private key signing operation. The public key could still be used |
| 320 | # for verification for a few hours after this time. |
| 321 | "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key. |
| 322 | "keyType": "A String", # The key type. |
| 323 | "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey` |
| 324 | # responses. Make sure to keep the private key data secure because it |
| 325 | # allows for the assertion of the service account identity. |
| 326 | # When base64 decoded, the private key data can be used to authenticate with |
| 327 | # Google API client libraries and with |
| 328 | # <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud |
| 329 | # auth activate-service-account</a>. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 330 | }, |
| 331 | ], |
| 332 | }</pre> |
| 333 | </div> |
| 334 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 335 | <div class="method"> |
| 336 | <code class="details" id="upload">upload(name, body=None, x__xgafv=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 337 | <pre>Creates a ServiceAccountKey, using a public key that you provide. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 338 | |
| 339 | Args: |
| 340 | name: string, The resource name of the service account in the following format: |
| 341 | `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. |
| 342 | Using `-` as a wildcard for the `PROJECT_ID` will infer the project from |
| 343 | the account. The `ACCOUNT` value can be the `email` address or the |
| 344 | `unique_id` of the service account. (required) |
| 345 | body: object, The request body. |
| 346 | The object takes the form of: |
| 347 | |
| 348 | { # The service account key upload request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 349 | "publicKeyData": "A String", # A field that allows clients to upload their own public key. If set, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 350 | # use this public key data to create a service account key for given |
| 351 | # service account. |
| 352 | # Please note, the expected format for this field is X509_PEM. |
| 353 | } |
| 354 | |
| 355 | x__xgafv: string, V1 error format. |
| 356 | Allowed values |
| 357 | 1 - v1 error format |
| 358 | 2 - v2 error format |
| 359 | |
| 360 | Returns: |
| 361 | An object of the form: |
| 362 | |
| 363 | { # Represents a service account key. |
| 364 | # |
| 365 | # A service account has two sets of key-pairs: user-managed, and |
| 366 | # system-managed. |
| 367 | # |
| 368 | # User-managed key-pairs can be created and deleted by users. Users are |
| 369 | # responsible for rotating these keys periodically to ensure security of |
| 370 | # their service accounts. Users retain the private key of these key-pairs, |
| 371 | # and Google retains ONLY the public key. |
| 372 | # |
| 373 | # System-managed keys are automatically rotated by Google, and are used for |
| 374 | # signing for a maximum of two weeks. The rotation process is probabilistic, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 375 | # and usage of the new key will gradually ramp up and down over the key's |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 376 | # lifetime. We recommend caching the public key set for a service account for |
| 377 | # no more than 24 hours to ensure you have access to the latest keys. |
| 378 | # |
| 379 | # Public keys for all service accounts are also published at the OAuth2 |
| 380 | # Service Account API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 381 | "privateKeyType": "A String", # The output format for the private key. |
| 382 | # Only provided in `CreateServiceAccountKey` responses, not |
| 383 | # in `GetServiceAccountKey` or `ListServiceAccountKey` responses. |
| 384 | # |
| 385 | # Google never exposes system-managed private keys, and never retains |
| 386 | # user-managed private keys. |
| 387 | "validAfterTime": "A String", # The key can be used after this timestamp. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 388 | "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses. |
| 389 | "name": "A String", # The resource name of the service account key in the following format |
| 390 | # `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 391 | "keyOrigin": "A String", # The key origin. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 392 | "validBeforeTime": "A String", # The key can be used before this timestamp. |
| 393 | # For system-managed key pairs, this timestamp is the end time for the |
| 394 | # private key signing operation. The public key could still be used |
| 395 | # for verification for a few hours after this time. |
| 396 | "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key. |
| 397 | "keyType": "A String", # The key type. |
| 398 | "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey` |
| 399 | # responses. Make sure to keep the private key data secure because it |
| 400 | # allows for the assertion of the service account identity. |
| 401 | # When base64 decoded, the private key data can be used to authenticate with |
| 402 | # Google API client libraries and with |
| 403 | # <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud |
| 404 | # auth activate-service-account</a>. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 405 | }</pre> |
| 406 | </div> |
| 407 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 408 | </body></html> |