Debian Codegraph @

docs/dyn/gmail_v1.users.settings.cse.keypairs.html

raw
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
75 <h1><a href="gmail_v1.html">Gmail API</a> . <a href="gmail_v1.users.html">users</a> . <a href="gmail_v1.users.settings.html">settings</a> . <a href="gmail_v1.users.settings.cse.html">cse</a> . <a href="gmail_v1.users.settings.cse.keypairs.html">keypairs</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#create">create(userId, body=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.</p>
83 <p class="toc_element">
84 <code><a href="#disable">disable(userId, keyPairId, body=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Turns off a client-side encryption key pair. The authenticated user can no longer use the key pair to decrypt incoming CSE message texts or sign outgoing CSE mail. To regain access, use the EnableCseKeyPair to turn on the key pair. After 30 days, you can permanently delete the key pair by using the ObliterateCseKeyPair method. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.</p>
86 <p class="toc_element">
87 <code><a href="#enable">enable(userId, keyPairId, body=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Turns on a client-side encryption key pair that was turned off. The key pair becomes active again for any associated client-side encryption identities. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.</p>
89 <p class="toc_element">
90 <code><a href="#get">get(userId, keyPairId, x__xgafv=None)</a></code></p>
91 <p class="firstline">Retrieves an existing client-side encryption key pair. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.</p>
92 <p class="toc_element">
93 <code><a href="#list">list(userId, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
94 <p class="firstline">Lists client-side encryption key pairs for an authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.</p>
95 <p class="toc_element">
96 <code><a href="#list_next">list_next()</a></code></p>
97 <p class="firstline">Retrieves the next page of results.</p>
98 <p class="toc_element">
99 <code><a href="#obliterate">obliterate(userId, keyPairId, body=None, x__xgafv=None)</a></code></p>
100 <p class="firstline">Deletes a client-side encryption key pair permanently and immediately. You can only permanently delete key pairs that have been turned off for more than 30 days. To turn off a key pair, use the DisableCseKeyPair method. Gmail can't restore or decrypt any messages that were encrypted by an obliterated key. Authenticated users and Google Workspace administrators lose access to reading the encrypted messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.</p>
101 <h3>Method Details</h3>
102 <div class="method">
103 <code class="details" id="close">close()</code>
104 <pre>Close httplib2 connections.</pre>
105 </div>
106
107 <div class="method">
108 <code class="details" id="create">create(userId, body=None, x__xgafv=None)</code>
109 <pre>Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
110
111 Args:
112 userId: string, The requester&#x27;s primary email address. To indicate the authenticated user, you can use the special value `me`. (required)
113 body: object, The request body.
114 The object takes the form of:
115
116 { # A client-side encryption S/MIME key pair, which is comprised of a public key, its certificate chain, and metadata for its paired private key. Gmail uses the key pair to complete the following tasks: - Sign outgoing client-side encrypted messages. - Save and reopen drafts of client-side encrypted messages. - Save and reopen sent messages. - Decrypt incoming or archived S/MIME messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
117 &quot;disableTime&quot;: &quot;A String&quot;, # Output only. If a key pair is set to `DISABLED`, the time that the key pair&#x27;s state changed from `ENABLED` to `DISABLED`. This field is present only when the key pair is in state `DISABLED`.
118 &quot;enablementState&quot;: &quot;A String&quot;, # Output only. The current state of the key pair.
119 &quot;keyPairId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the client-side encryption S/MIME key pair.
120 &quot;pem&quot;: &quot;A String&quot;, # Output only. The public key and its certificate chain, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
121 &quot;pkcs7&quot;: &quot;A String&quot;, # Input only. The public key and its certificate chain. The chain must be in [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding and ASCII armor.
122 &quot;privateKeyMetadata&quot;: [ # Metadata for instances of this key pair&#x27;s private key.
123 { # Metadata for a private key instance.
124 &quot;hardwareKeyMetadata&quot;: { # Metadata for hardware keys. If [hardware key encryption](https://support.google.com/a/answer/14153163) is set up for the Google Workspace organization, users can optionally store their private key on their smart card and use it to sign and decrypt email messages in Gmail by inserting their smart card into a reader attached to their Windows device. # Metadata for hardware keys.
125 &quot;description&quot;: &quot;A String&quot;, # Description about the hardware key.
126 },
127 &quot;kaclsKeyMetadata&quot;: { # Metadata for private keys managed by an external key access control list service. For details about managing key access, see [Google Workspace CSE API Reference](https://developers.google.com/workspace/cse/reference). # Metadata for a private key instance managed by an external key access control list service.
128 &quot;kaclsData&quot;: &quot;A String&quot;, # Opaque data generated and used by the key access control list service. Maximum size: 8 KiB.
129 &quot;kaclsUri&quot;: &quot;A String&quot;, # The URI of the key access control list service that manages the private key.
130 },
131 &quot;privateKeyMetadataId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the private key metadata instance.
132 },
133 ],
134 &quot;subjectEmailAddresses&quot;: [ # Output only. The email address identities that are specified on the leaf certificate.
135 &quot;A String&quot;,
136 ],
137 }
138
139 x__xgafv: string, V1 error format.
140 Allowed values
141 1 - v1 error format
142 2 - v2 error format
143
144 Returns:
145 An object of the form:
146
147 { # A client-side encryption S/MIME key pair, which is comprised of a public key, its certificate chain, and metadata for its paired private key. Gmail uses the key pair to complete the following tasks: - Sign outgoing client-side encrypted messages. - Save and reopen drafts of client-side encrypted messages. - Save and reopen sent messages. - Decrypt incoming or archived S/MIME messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
148 &quot;disableTime&quot;: &quot;A String&quot;, # Output only. If a key pair is set to `DISABLED`, the time that the key pair&#x27;s state changed from `ENABLED` to `DISABLED`. This field is present only when the key pair is in state `DISABLED`.
149 &quot;enablementState&quot;: &quot;A String&quot;, # Output only. The current state of the key pair.
150 &quot;keyPairId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the client-side encryption S/MIME key pair.
151 &quot;pem&quot;: &quot;A String&quot;, # Output only. The public key and its certificate chain, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
152 &quot;pkcs7&quot;: &quot;A String&quot;, # Input only. The public key and its certificate chain. The chain must be in [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding and ASCII armor.
153 &quot;privateKeyMetadata&quot;: [ # Metadata for instances of this key pair&#x27;s private key.
154 { # Metadata for a private key instance.
155 &quot;hardwareKeyMetadata&quot;: { # Metadata for hardware keys. If [hardware key encryption](https://support.google.com/a/answer/14153163) is set up for the Google Workspace organization, users can optionally store their private key on their smart card and use it to sign and decrypt email messages in Gmail by inserting their smart card into a reader attached to their Windows device. # Metadata for hardware keys.
156 &quot;description&quot;: &quot;A String&quot;, # Description about the hardware key.
157 },
158 &quot;kaclsKeyMetadata&quot;: { # Metadata for private keys managed by an external key access control list service. For details about managing key access, see [Google Workspace CSE API Reference](https://developers.google.com/workspace/cse/reference). # Metadata for a private key instance managed by an external key access control list service.
159 &quot;kaclsData&quot;: &quot;A String&quot;, # Opaque data generated and used by the key access control list service. Maximum size: 8 KiB.
160 &quot;kaclsUri&quot;: &quot;A String&quot;, # The URI of the key access control list service that manages the private key.
161 },
162 &quot;privateKeyMetadataId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the private key metadata instance.
163 },
164 ],
165 &quot;subjectEmailAddresses&quot;: [ # Output only. The email address identities that are specified on the leaf certificate.
166 &quot;A String&quot;,
167 ],
168 }</pre>
169 </div>
170
171 <div class="method">
172 <code class="details" id="disable">disable(userId, keyPairId, body=None, x__xgafv=None)</code>
173 <pre>Turns off a client-side encryption key pair. The authenticated user can no longer use the key pair to decrypt incoming CSE message texts or sign outgoing CSE mail. To regain access, use the EnableCseKeyPair to turn on the key pair. After 30 days, you can permanently delete the key pair by using the ObliterateCseKeyPair method. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
174
175 Args:
176 userId: string, The requester&#x27;s primary email address. To indicate the authenticated user, you can use the special value `me`. (required)
177 keyPairId: string, The identifier of the key pair to turn off. (required)
178 body: object, The request body.
179 The object takes the form of:
180
181 { # Requests to turn off a client-side encryption key pair.
182 }
183
184 x__xgafv: string, V1 error format.
185 Allowed values
186 1 - v1 error format
187 2 - v2 error format
188
189 Returns:
190 An object of the form:
191
192 { # A client-side encryption S/MIME key pair, which is comprised of a public key, its certificate chain, and metadata for its paired private key. Gmail uses the key pair to complete the following tasks: - Sign outgoing client-side encrypted messages. - Save and reopen drafts of client-side encrypted messages. - Save and reopen sent messages. - Decrypt incoming or archived S/MIME messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
193 &quot;disableTime&quot;: &quot;A String&quot;, # Output only. If a key pair is set to `DISABLED`, the time that the key pair&#x27;s state changed from `ENABLED` to `DISABLED`. This field is present only when the key pair is in state `DISABLED`.
194 &quot;enablementState&quot;: &quot;A String&quot;, # Output only. The current state of the key pair.
195 &quot;keyPairId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the client-side encryption S/MIME key pair.
196 &quot;pem&quot;: &quot;A String&quot;, # Output only. The public key and its certificate chain, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
197 &quot;pkcs7&quot;: &quot;A String&quot;, # Input only. The public key and its certificate chain. The chain must be in [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding and ASCII armor.
198 &quot;privateKeyMetadata&quot;: [ # Metadata for instances of this key pair&#x27;s private key.
199 { # Metadata for a private key instance.
200 &quot;hardwareKeyMetadata&quot;: { # Metadata for hardware keys. If [hardware key encryption](https://support.google.com/a/answer/14153163) is set up for the Google Workspace organization, users can optionally store their private key on their smart card and use it to sign and decrypt email messages in Gmail by inserting their smart card into a reader attached to their Windows device. # Metadata for hardware keys.
201 &quot;description&quot;: &quot;A String&quot;, # Description about the hardware key.
202 },
203 &quot;kaclsKeyMetadata&quot;: { # Metadata for private keys managed by an external key access control list service. For details about managing key access, see [Google Workspace CSE API Reference](https://developers.google.com/workspace/cse/reference). # Metadata for a private key instance managed by an external key access control list service.
204 &quot;kaclsData&quot;: &quot;A String&quot;, # Opaque data generated and used by the key access control list service. Maximum size: 8 KiB.
205 &quot;kaclsUri&quot;: &quot;A String&quot;, # The URI of the key access control list service that manages the private key.
206 },
207 &quot;privateKeyMetadataId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the private key metadata instance.
208 },
209 ],
210 &quot;subjectEmailAddresses&quot;: [ # Output only. The email address identities that are specified on the leaf certificate.
211 &quot;A String&quot;,
212 ],
213 }</pre>
214 </div>
215
216 <div class="method">
217 <code class="details" id="enable">enable(userId, keyPairId, body=None, x__xgafv=None)</code>
218 <pre>Turns on a client-side encryption key pair that was turned off. The key pair becomes active again for any associated client-side encryption identities. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
219
220 Args:
221 userId: string, The requester&#x27;s primary email address. To indicate the authenticated user, you can use the special value `me`. (required)
222 keyPairId: string, The identifier of the key pair to turn on. (required)
223 body: object, The request body.
224 The object takes the form of:
225
226 { # Requests to turn on a client-side encryption key pair.
227 }
228
229 x__xgafv: string, V1 error format.
230 Allowed values
231 1 - v1 error format
232 2 - v2 error format
233
234 Returns:
235 An object of the form:
236
237 { # A client-side encryption S/MIME key pair, which is comprised of a public key, its certificate chain, and metadata for its paired private key. Gmail uses the key pair to complete the following tasks: - Sign outgoing client-side encrypted messages. - Save and reopen drafts of client-side encrypted messages. - Save and reopen sent messages. - Decrypt incoming or archived S/MIME messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
238 &quot;disableTime&quot;: &quot;A String&quot;, # Output only. If a key pair is set to `DISABLED`, the time that the key pair&#x27;s state changed from `ENABLED` to `DISABLED`. This field is present only when the key pair is in state `DISABLED`.
239 &quot;enablementState&quot;: &quot;A String&quot;, # Output only. The current state of the key pair.
240 &quot;keyPairId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the client-side encryption S/MIME key pair.
241 &quot;pem&quot;: &quot;A String&quot;, # Output only. The public key and its certificate chain, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
242 &quot;pkcs7&quot;: &quot;A String&quot;, # Input only. The public key and its certificate chain. The chain must be in [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding and ASCII armor.
243 &quot;privateKeyMetadata&quot;: [ # Metadata for instances of this key pair&#x27;s private key.
244 { # Metadata for a private key instance.
245 &quot;hardwareKeyMetadata&quot;: { # Metadata for hardware keys. If [hardware key encryption](https://support.google.com/a/answer/14153163) is set up for the Google Workspace organization, users can optionally store their private key on their smart card and use it to sign and decrypt email messages in Gmail by inserting their smart card into a reader attached to their Windows device. # Metadata for hardware keys.
246 &quot;description&quot;: &quot;A String&quot;, # Description about the hardware key.
247 },
248 &quot;kaclsKeyMetadata&quot;: { # Metadata for private keys managed by an external key access control list service. For details about managing key access, see [Google Workspace CSE API Reference](https://developers.google.com/workspace/cse/reference). # Metadata for a private key instance managed by an external key access control list service.
249 &quot;kaclsData&quot;: &quot;A String&quot;, # Opaque data generated and used by the key access control list service. Maximum size: 8 KiB.
250 &quot;kaclsUri&quot;: &quot;A String&quot;, # The URI of the key access control list service that manages the private key.
251 },
252 &quot;privateKeyMetadataId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the private key metadata instance.
253 },
254 ],
255 &quot;subjectEmailAddresses&quot;: [ # Output only. The email address identities that are specified on the leaf certificate.
256 &quot;A String&quot;,
257 ],
258 }</pre>
259 </div>
260
261 <div class="method">
262 <code class="details" id="get">get(userId, keyPairId, x__xgafv=None)</code>
263 <pre>Retrieves an existing client-side encryption key pair. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
264
265 Args:
266 userId: string, The requester&#x27;s primary email address. To indicate the authenticated user, you can use the special value `me`. (required)
267 keyPairId: string, The identifier of the key pair to retrieve. (required)
268 x__xgafv: string, V1 error format.
269 Allowed values
270 1 - v1 error format
271 2 - v2 error format
272
273 Returns:
274 An object of the form:
275
276 { # A client-side encryption S/MIME key pair, which is comprised of a public key, its certificate chain, and metadata for its paired private key. Gmail uses the key pair to complete the following tasks: - Sign outgoing client-side encrypted messages. - Save and reopen drafts of client-side encrypted messages. - Save and reopen sent messages. - Decrypt incoming or archived S/MIME messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
277 &quot;disableTime&quot;: &quot;A String&quot;, # Output only. If a key pair is set to `DISABLED`, the time that the key pair&#x27;s state changed from `ENABLED` to `DISABLED`. This field is present only when the key pair is in state `DISABLED`.
278 &quot;enablementState&quot;: &quot;A String&quot;, # Output only. The current state of the key pair.
279 &quot;keyPairId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the client-side encryption S/MIME key pair.
280 &quot;pem&quot;: &quot;A String&quot;, # Output only. The public key and its certificate chain, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
281 &quot;pkcs7&quot;: &quot;A String&quot;, # Input only. The public key and its certificate chain. The chain must be in [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding and ASCII armor.
282 &quot;privateKeyMetadata&quot;: [ # Metadata for instances of this key pair&#x27;s private key.
283 { # Metadata for a private key instance.
284 &quot;hardwareKeyMetadata&quot;: { # Metadata for hardware keys. If [hardware key encryption](https://support.google.com/a/answer/14153163) is set up for the Google Workspace organization, users can optionally store their private key on their smart card and use it to sign and decrypt email messages in Gmail by inserting their smart card into a reader attached to their Windows device. # Metadata for hardware keys.
285 &quot;description&quot;: &quot;A String&quot;, # Description about the hardware key.
286 },
287 &quot;kaclsKeyMetadata&quot;: { # Metadata for private keys managed by an external key access control list service. For details about managing key access, see [Google Workspace CSE API Reference](https://developers.google.com/workspace/cse/reference). # Metadata for a private key instance managed by an external key access control list service.
288 &quot;kaclsData&quot;: &quot;A String&quot;, # Opaque data generated and used by the key access control list service. Maximum size: 8 KiB.
289 &quot;kaclsUri&quot;: &quot;A String&quot;, # The URI of the key access control list service that manages the private key.
290 },
291 &quot;privateKeyMetadataId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the private key metadata instance.
292 },
293 ],
294 &quot;subjectEmailAddresses&quot;: [ # Output only. The email address identities that are specified on the leaf certificate.
295 &quot;A String&quot;,
296 ],
297 }</pre>
298 </div>
299
300 <div class="method">
301 <code class="details" id="list">list(userId, pageSize=None, pageToken=None, x__xgafv=None)</code>
302 <pre>Lists client-side encryption key pairs for an authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
303
304 Args:
305 userId: string, The requester&#x27;s primary email address. To indicate the authenticated user, you can use the special value `me`. (required)
306 pageSize: integer, The number of key pairs to return. If not provided, the page size will default to 20 entries.
307 pageToken: string, Pagination token indicating which page of key pairs to return. If the token is not supplied, then the API will return the first page of results.
308 x__xgafv: string, V1 error format.
309 Allowed values
310 1 - v1 error format
311 2 - v2 error format
312
313 Returns:
314 An object of the form:
315
316 {
317 &quot;cseKeyPairs&quot;: [ # One page of the list of CSE key pairs installed for the user.
318 { # A client-side encryption S/MIME key pair, which is comprised of a public key, its certificate chain, and metadata for its paired private key. Gmail uses the key pair to complete the following tasks: - Sign outgoing client-side encrypted messages. - Save and reopen drafts of client-side encrypted messages. - Save and reopen sent messages. - Decrypt incoming or archived S/MIME messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
319 &quot;disableTime&quot;: &quot;A String&quot;, # Output only. If a key pair is set to `DISABLED`, the time that the key pair&#x27;s state changed from `ENABLED` to `DISABLED`. This field is present only when the key pair is in state `DISABLED`.
320 &quot;enablementState&quot;: &quot;A String&quot;, # Output only. The current state of the key pair.
321 &quot;keyPairId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the client-side encryption S/MIME key pair.
322 &quot;pem&quot;: &quot;A String&quot;, # Output only. The public key and its certificate chain, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
323 &quot;pkcs7&quot;: &quot;A String&quot;, # Input only. The public key and its certificate chain. The chain must be in [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding and ASCII armor.
324 &quot;privateKeyMetadata&quot;: [ # Metadata for instances of this key pair&#x27;s private key.
325 { # Metadata for a private key instance.
326 &quot;hardwareKeyMetadata&quot;: { # Metadata for hardware keys. If [hardware key encryption](https://support.google.com/a/answer/14153163) is set up for the Google Workspace organization, users can optionally store their private key on their smart card and use it to sign and decrypt email messages in Gmail by inserting their smart card into a reader attached to their Windows device. # Metadata for hardware keys.
327 &quot;description&quot;: &quot;A String&quot;, # Description about the hardware key.
328 },
329 &quot;kaclsKeyMetadata&quot;: { # Metadata for private keys managed by an external key access control list service. For details about managing key access, see [Google Workspace CSE API Reference](https://developers.google.com/workspace/cse/reference). # Metadata for a private key instance managed by an external key access control list service.
330 &quot;kaclsData&quot;: &quot;A String&quot;, # Opaque data generated and used by the key access control list service. Maximum size: 8 KiB.
331 &quot;kaclsUri&quot;: &quot;A String&quot;, # The URI of the key access control list service that manages the private key.
332 },
333 &quot;privateKeyMetadataId&quot;: &quot;A String&quot;, # Output only. The immutable ID for the private key metadata instance.
334 },
335 ],
336 &quot;subjectEmailAddresses&quot;: [ # Output only. The email address identities that are specified on the leaf certificate.
337 &quot;A String&quot;,
338 ],
339 },
340 ],
341 &quot;nextPageToken&quot;: &quot;A String&quot;, # Pagination token to be passed to a subsequent ListCseKeyPairs call in order to retrieve the next page of key pairs. If this value is not returned, then no further pages remain.
342 }</pre>
343 </div>
344
345 <div class="method">
346 <code class="details" id="list_next">list_next()</code>
347 <pre>Retrieves the next page of results.
348
349 Args:
350 previous_request: The request for the previous page. (required)
351 previous_response: The response from the request for the previous page. (required)
352
353 Returns:
354 A request object that you can call &#x27;execute()&#x27; on to request the next
355 page. Returns None if there are no more items in the collection.
356 </pre>
357 </div>
358
359 <div class="method">
360 <code class="details" id="obliterate">obliterate(userId, keyPairId, body=None, x__xgafv=None)</code>
361 <pre>Deletes a client-side encryption key pair permanently and immediately. You can only permanently delete key pairs that have been turned off for more than 30 days. To turn off a key pair, use the DisableCseKeyPair method. Gmail can&#x27;t restore or decrypt any messages that were encrypted by an obliterated key. Authenticated users and Google Workspace administrators lose access to reading the encrypted messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.
362
363 Args:
364 userId: string, The requester&#x27;s primary email address. To indicate the authenticated user, you can use the special value `me`. (required)
365 keyPairId: string, The identifier of the key pair to obliterate. (required)
366 body: object, The request body.
367 The object takes the form of:
368
369 { # Request to obliterate a CSE key pair.
370 }
371
372 x__xgafv: string, V1 error format.
373 Allowed values
374 1 - v1 error format
375 2 - v2 error format
376 </pre>
377 </div>
378
379 </body></html>