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"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <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] | 82 | <p class="firstline">Creates 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="#delete">delete(name, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 85 | <p class="firstline">Deletes a ServiceAccountKey. Deleting a service account key does not revoke short-lived credentials that have been issued based on the service account key.</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="#get">get(name, publicKeyType=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 88 | <p class="firstline">Gets a ServiceAccountKey.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 89 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 90 | <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] | 91 | <p class="firstline">Lists every ServiceAccountKey for a service account.</p> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 92 | <p class="toc_element"> |
| 93 | <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] | 94 | <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] | 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 97 | <code class="details" id="close">close()</code> |
| 98 | <pre>Close httplib2 connections.</pre> |
| 99 | </div> |
| 100 | |
| 101 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | <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] | 103 | <pre>Creates a ServiceAccountKey. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 104 | |
| 105 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 106 | name: string, Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 107 | body: object, The request body. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 108 | The object takes the form of: |
| 109 | |
| 110 | { # The service account key create request. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 111 | "keyAlgorithm": "A String", # Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame^] | 112 | "privateKeyType": "A String", # The output format of the private key. The default value is `TYPE_GOOGLE_CREDENTIALS_FILE`, which is the Google Credentials File 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 | |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 123 | { # Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 124 | "keyOrigin": "A String", # The key origin. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 125 | "keyType": "A String", # The key type. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame^] | 126 | "validBeforeTime": "A String", # The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time. |
| 127 | "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. |
| 128 | "privateKeyType": "A String", # The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 129 | "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses. |
| 130 | "validAfterTime": "A String", # The key can be used after this timestamp. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame^] | 131 | "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key. |
| 132 | "name": "A String", # The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 133 | }</pre> |
| 134 | </div> |
| 135 | |
| 136 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 137 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 138 | <pre>Deletes a ServiceAccountKey. Deleting a service account key does not revoke short-lived credentials that have been issued based on the service account key. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 139 | |
| 140 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 141 | name: string, Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 142 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 143 | Allowed values |
| 144 | 1 - v1 error format |
| 145 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 146 | |
| 147 | Returns: |
| 148 | An object of the form: |
| 149 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 150 | { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 151 | }</pre> |
| 152 | </div> |
| 153 | |
| 154 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 155 | <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] | 156 | <pre>Gets a ServiceAccountKey. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 157 | |
| 158 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 159 | name: string, Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required) |
| 160 | publicKeyType: string, The output format of the public key requested. X509_PEM is the default output format. |
| 161 | Allowed values |
| 162 | TYPE_NONE - Unspecified. Returns nothing here. |
| 163 | TYPE_X509_PEM_FILE - X509 PEM format. |
| 164 | TYPE_RAW_PUBLIC_KEY - Raw public key. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 165 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 166 | Allowed values |
| 167 | 1 - v1 error format |
| 168 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 169 | |
| 170 | Returns: |
| 171 | An object of the form: |
| 172 | |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 173 | { # Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 174 | "keyOrigin": "A String", # The key origin. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 175 | "keyType": "A String", # The key type. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame^] | 176 | "validBeforeTime": "A String", # The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time. |
| 177 | "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. |
| 178 | "privateKeyType": "A String", # The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 179 | "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses. |
| 180 | "validAfterTime": "A String", # The key can be used after this timestamp. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame^] | 181 | "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key. |
| 182 | "name": "A String", # The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 183 | }</pre> |
| 184 | </div> |
| 185 | |
| 186 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 187 | <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] | 188 | <pre>Lists every ServiceAccountKey for a service account. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 189 | |
| 190 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 191 | name: string, Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID`, will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required) |
| 192 | keyTypes: string, Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned. (repeated) |
| 193 | Allowed values |
| 194 | KEY_TYPE_UNSPECIFIED - Unspecified key type. The presence of this in the message will immediately result in an error. |
| 195 | USER_MANAGED - User-managed keys (managed and rotated by the user). |
| 196 | SYSTEM_MANAGED - System-managed keys (managed and rotated by Google). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 197 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 198 | Allowed values |
| 199 | 1 - v1 error format |
| 200 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 201 | |
| 202 | Returns: |
| 203 | An object of the form: |
| 204 | |
| 205 | { # The service account keys list response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 206 | "keys": [ # The public keys for the service account. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 207 | { # Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 208 | "keyOrigin": "A String", # The key origin. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 209 | "keyType": "A String", # The key type. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame^] | 210 | "validBeforeTime": "A String", # The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time. |
| 211 | "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. |
| 212 | "privateKeyType": "A String", # The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 213 | "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses. |
| 214 | "validAfterTime": "A String", # The key can be used after this timestamp. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame^] | 215 | "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key. |
| 216 | "name": "A String", # The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 217 | }, |
| 218 | ], |
| 219 | }</pre> |
| 220 | </div> |
| 221 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 222 | <div class="method"> |
| 223 | <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] | 224 | <pre>Creates a ServiceAccountKey, using a public key that you provide. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 225 | |
| 226 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 227 | name: string, The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 228 | body: object, The request body. |
| 229 | The object takes the form of: |
| 230 | |
| 231 | { # The service account key upload request. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 232 | "publicKeyData": "A String", # A field that allows clients to upload their own public key. If set, use this public key data to create a service account key for given service account. Please note, the expected format for this field is X509_PEM. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 233 | } |
| 234 | |
| 235 | x__xgafv: string, V1 error format. |
| 236 | Allowed values |
| 237 | 1 - v1 error format |
| 238 | 2 - v2 error format |
| 239 | |
| 240 | Returns: |
| 241 | An object of the form: |
| 242 | |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 243 | { # Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 244 | "keyOrigin": "A String", # The key origin. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 245 | "keyType": "A String", # The key type. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame^] | 246 | "validBeforeTime": "A String", # The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time. |
| 247 | "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. |
| 248 | "privateKeyType": "A String", # The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 249 | "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses. |
| 250 | "validAfterTime": "A String", # The key can be used after this timestamp. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame^] | 251 | "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key. |
| 252 | "name": "A String", # The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 253 | }</pre> |
| 254 | </div> |
| 255 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 256 | </body></html> |