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