forked from Azure/azure-sdk-for-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeyvault-certificates.api.md
499 lines (408 loc) · 15.2 KB
/
keyvault-certificates.api.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
## API Report File for "@azure/keyvault-certificates"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
/// <reference lib="esnext.asynciterable" />
import { AzureLogger } from '@azure/logger';
import * as coreHttp from '@azure/core-http';
import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PipelineOptions } from '@azure/core-http';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';
import { TokenCredential } from '@azure/core-http';
// @public
export type ActionType = "EmailContacts" | "AutoRenew";
// @public
export interface AdministratorContact {
email?: string;
firstName?: string;
lastName?: string;
phone?: string;
}
// @public
export type ArrayOneOrMore<T> = {
0: T;
} & Array<T>;
// @public
export type BackupCertificateOptions = coreHttp.OperationOptions;
// @public
export interface BackupCertificateResult {
readonly value?: Uint8Array;
}
// @public
export interface BeginCreateCertificateOptions extends CreateCertificateOptions, CertificatePollerOptions {
}
// @public
export type BeginDeleteCertificateOptions = CertificatePollerOptions;
// @public
export type BeginRecoverDeletedCertificateOptions = CertificatePollerOptions;
// @public
export type CancelCertificateOperationOptions = coreHttp.OperationOptions;
// @public
export class CertificateClient {
constructor(vaultUrl: string, credential: TokenCredential, pipelineOptions?: CertificateClientOptions);
backupCertificate(certificateName: string, options?: BackupCertificateOptions): Promise<Uint8Array | undefined>;
beginCreateCertificate(certificateName: string, policy: CertificatePolicy, options?: BeginCreateCertificateOptions): Promise<PollerLike<CreateCertificateState, KeyVaultCertificateWithPolicy>>;
beginDeleteCertificate(certificateName: string, options?: BeginDeleteCertificateOptions): Promise<PollerLike<DeleteCertificateState, DeletedCertificate>>;
beginRecoverDeletedCertificate(certificateName: string, options?: BeginRecoverDeletedCertificateOptions): Promise<PollerLike<RecoverDeletedCertificateState, KeyVaultCertificateWithPolicy>>;
createIssuer(issuerName: string, provider: string, options?: CreateIssuerOptions): Promise<CertificateIssuer>;
deleteCertificateOperation(certificateName: string, options?: DeleteCertificateOperationOptions): Promise<CertificateOperation>;
deleteContacts(options?: DeleteContactsOptions): Promise<CertificateContact[] | undefined>;
deleteIssuer(issuerName: string, options?: DeleteIssuerOptions): Promise<CertificateIssuer>;
getCertificate(certificateName: string, options?: GetCertificateOptions): Promise<KeyVaultCertificateWithPolicy>;
getCertificateOperation(certificateName: string, options?: GetCertificateOperationOptions): Promise<PollerLike<CertificateOperationState, KeyVaultCertificateWithPolicy>>;
getCertificatePolicy(certificateName: string, options?: GetCertificatePolicyOptions): Promise<CertificatePolicy>;
getCertificateVersion(certificateName: string, version: string, options?: GetCertificateVersionOptions): Promise<KeyVaultCertificate>;
getContacts(options?: GetContactsOptions): Promise<CertificateContact[] | undefined>;
getDeletedCertificate(certificateName: string, options?: GetDeletedCertificateOptions): Promise<DeletedCertificate>;
getIssuer(issuerName: string, options?: GetIssuerOptions): Promise<CertificateIssuer>;
importCertificate(certificateName: string, certificateBytes: Uint8Array, options?: ImportCertificateOptions): Promise<KeyVaultCertificateWithPolicy>;
listDeletedCertificates(options?: ListDeletedCertificatesOptions): PagedAsyncIterableIterator<DeletedCertificate>;
listPropertiesOfCertificates(options?: ListPropertiesOfCertificatesOptions): PagedAsyncIterableIterator<CertificateProperties>;
listPropertiesOfCertificateVersions(certificateName: string, options?: ListPropertiesOfCertificateVersionsOptions): PagedAsyncIterableIterator<CertificateProperties>;
listPropertiesOfIssuers(options?: ListPropertiesOfIssuersOptions): PagedAsyncIterableIterator<IssuerProperties>;
mergeCertificate(certificateName: string, x509Certificates: Uint8Array[], options?: MergeCertificateOptions): Promise<KeyVaultCertificateWithPolicy>;
purgeDeletedCertificate(certificateName: string, options?: PurgeDeletedCertificateOptions): Promise<null>;
restoreCertificateBackup(backup: Uint8Array, options?: RestoreCertificateBackupOptions): Promise<KeyVaultCertificateWithPolicy>;
setContacts(contacts: CertificateContact[], options?: SetContactsOptions): Promise<CertificateContact[] | undefined>;
updateCertificatePolicy(certificateName: string, policy: CertificatePolicy, options?: UpdateCertificatePolicyOptions): Promise<CertificatePolicy>;
updateCertificateProperties(certificateName: string, version: string, options?: UpdateCertificateOptions): Promise<KeyVaultCertificate>;
updateIssuer(issuerName: string, options?: UpdateIssuerOptions): Promise<CertificateIssuer>;
readonly vaultUrl: string;
}
// @public
export interface CertificateClientOptions extends coreHttp.PipelineOptions {
serviceVersion?: "7.0" | "7.1" | "7.2" | "7.3";
}
// @public
export type CertificateContact = RequireAtLeastOne<CertificateContactAll> | undefined;
// @public
export interface CertificateContactAll {
email: string;
name: string;
phone: string;
}
// @public
export type CertificateContentType = "application/x-pem-file" | "application/x-pkcs12" | undefined;
// @public
export interface CertificateIssuer extends IssuerProperties {
accountId?: string;
administratorContacts?: AdministratorContact[];
readonly createdOn?: Date;
enabled?: boolean;
organizationId?: string;
password?: string;
readonly updatedOn?: Date;
}
// @public
export type CertificateKeyCurveName = string;
// @public
export type CertificateKeyType = string;
// @public
export interface CertificateOperation {
cancellationRequested?: boolean;
certificateTransparency?: boolean;
certificateType?: string;
csr?: Uint8Array;
error?: CertificateOperationError;
readonly id?: string;
issuerName?: string;
readonly name?: string;
requestId?: string;
status?: string;
statusDetails?: string;
target?: string;
readonly vaultUrl?: string;
}
// @public
export interface CertificateOperationError {
readonly code?: string;
readonly innerError?: CertificateOperationError;
readonly message?: string;
}
// @public
export interface CertificateOperationState extends KeyVaultCertificatePollOperationState<KeyVaultCertificateWithPolicy> {
certificateOperation?: CertificateOperation;
}
// @public
export type CertificatePolicy = CertificatePolicyProperties & RequireAtLeastOne<PolicySubjectProperties>;
// @public
export type CertificatePolicyAction = "EmailContacts" | "AutoRenew";
// @public
export interface CertificatePolicyProperties {
certificateTransparency?: boolean;
certificateType?: string;
contentType?: CertificateContentType;
readonly createdOn?: Date;
enabled?: boolean;
enhancedKeyUsage?: string[];
exportable?: boolean;
issuerName?: WellKnownIssuer | string;
keyCurveName?: CertificateKeyCurveName;
keySize?: number;
keyType?: CertificateKeyType;
keyUsage?: KeyUsageType[];
lifetimeActions?: LifetimeAction[];
reuseKey?: boolean;
readonly updatedOn?: Date;
validityInMonths?: number;
}
// @public
export interface CertificatePollerOptions extends coreHttp.OperationOptions {
intervalInMs?: number;
resumeFrom?: string;
}
// @public
export interface CertificateProperties {
readonly createdOn?: Date;
enabled?: boolean;
readonly expiresOn?: Date;
readonly id?: string;
readonly name?: string;
notBefore?: Date;
recoverableDays?: number;
readonly recoveryLevel?: DeletionRecoveryLevel;
tags?: CertificateTags;
readonly updatedOn?: Date;
readonly vaultUrl?: string;
readonly version?: string;
readonly x509Thumbprint?: Uint8Array;
}
// @public
export type CertificateTags = {
[propertyName: string]: string;
};
// @public
export interface CoreSubjectAlternativeNames {
dnsNames?: string[];
emails?: string[];
upns?: string[];
}
// @public
export interface CreateCertificateOptions extends CertificateProperties, coreHttp.OperationOptions {
}
// @public
export type CreateCertificateState = KeyVaultCertificatePollOperationState<KeyVaultCertificateWithPolicy>;
// @public
export interface CreateIssuerOptions extends coreHttp.OperationOptions {
accountId?: string;
administratorContacts?: AdministratorContact[];
enabled?: boolean;
organizationId?: string;
password?: string;
}
// @public
export const DefaultCertificatePolicy: {
issuerName: string;
subject: string;
};
// @public
export type DeleteCertificateOperationOptions = coreHttp.OperationOptions;
// @public
export type DeleteCertificateState = KeyVaultCertificatePollOperationState<DeletedCertificate>;
// @public
export type DeleteContactsOptions = coreHttp.OperationOptions;
// @public
export interface DeletedCertificate extends KeyVaultCertificateWithPolicy {
readonly deletedOn?: Date;
readonly recoveryId?: string;
readonly scheduledPurgeDate?: Date;
}
// @public
export type DeleteIssuerOptions = coreHttp.OperationOptions;
// @public
export type DeletionRecoveryLevel = string;
// @public @deprecated
export interface ErrorModel {
readonly code?: string;
readonly innerError?: ErrorModel;
readonly message?: string;
}
// @public
export type GetCertificateOperationOptions = CertificatePollerOptions;
// @public
export type GetCertificateOptions = coreHttp.OperationOptions;
// @public
export type GetCertificatePolicyOptions = coreHttp.OperationOptions;
// @public
export type GetCertificateVersionOptions = coreHttp.OperationOptions;
// @public
export type GetContactsOptions = coreHttp.OperationOptions;
// @public
export type GetDeletedCertificateOptions = coreHttp.OperationOptions;
// @public
export type GetIssuerOptions = coreHttp.OperationOptions;
// @public
export type GetPlainCertificateOperationOptions = coreHttp.OperationOptions;
// @public
export interface ImportCertificateOptions extends coreHttp.OperationOptions {
enabled?: boolean;
password?: string;
policy?: ImportCertificatePolicy;
tags?: CertificateTags;
}
// @public
export type ImportCertificatePolicy = CertificatePolicyProperties & Partial<PolicySubjectProperties>;
// @public
export interface IssuerAttributes {
readonly created?: Date;
enabled?: boolean;
readonly updated?: Date;
}
// @public
export interface IssuerCredentials {
accountId?: string;
password?: string;
}
// @public
export interface IssuerParameters {
certificateTransparency?: boolean;
certificateType?: string;
name?: string;
}
// @public
export interface IssuerProperties {
id?: string;
readonly name?: string;
provider?: string;
}
// @public
export type KeyUsageType = string;
// @public
export interface KeyVaultCertificate {
cer?: Uint8Array;
id?: string;
readonly keyId?: string;
readonly name: string;
properties: CertificateProperties;
readonly secretId?: string;
}
// @public
export interface KeyVaultCertificateIdentifier {
name: string;
sourceId: string;
vaultUrl: string;
version?: string;
}
// @public
export interface KeyVaultCertificatePollOperationState<TResult> extends PollOperationState<TResult> {
certificateName: string;
}
// @public
export interface KeyVaultCertificateWithPolicy extends KeyVaultCertificate {
readonly policy?: CertificatePolicy;
}
// @public
export enum KnownCertificateKeyCurveNames {
P256 = "P-256",
P256K = "P-256K",
P384 = "P-384",
P521 = "P-521"
}
// @public
export enum KnownCertificateKeyTypes {
EC = "EC",
ECHSM = "EC-HSM",
Oct = "oct",
OctHSM = "oct-HSM",
RSA = "RSA",
RSAHSM = "RSA-HSM"
}
// @public
export enum KnownDeletionRecoveryLevels {
CustomizedRecoverable = "CustomizedRecoverable",
CustomizedRecoverableProtectedSubscription = "CustomizedRecoverable+ProtectedSubscription",
CustomizedRecoverablePurgeable = "CustomizedRecoverable+Purgeable",
Purgeable = "Purgeable",
Recoverable = "Recoverable",
RecoverableProtectedSubscription = "Recoverable+ProtectedSubscription",
RecoverablePurgeable = "Recoverable+Purgeable"
}
// @public
export enum KnownKeyUsageTypes {
CRLSign = "cRLSign",
DataEncipherment = "dataEncipherment",
DecipherOnly = "decipherOnly",
DigitalSignature = "digitalSignature",
EncipherOnly = "encipherOnly",
KeyAgreement = "keyAgreement",
KeyCertSign = "keyCertSign",
KeyEncipherment = "keyEncipherment",
NonRepudiation = "nonRepudiation"
}
// @public
export type KVPollerLike<TState extends PollOperationState<TResult>, TResult> = PollerLike<TState, TResult>;
// @public
export interface LifetimeAction {
action?: CertificatePolicyAction;
daysBeforeExpiry?: number;
lifetimePercentage?: number;
}
// @public
export interface ListDeletedCertificatesOptions extends coreHttp.OperationOptions {
includePending?: boolean;
}
// @public
export interface ListPropertiesOfCertificatesOptions extends coreHttp.OperationOptions {
includePending?: boolean;
}
// @public
export type ListPropertiesOfCertificateVersionsOptions = coreHttp.OperationOptions;
// @public
export type ListPropertiesOfIssuersOptions = coreHttp.OperationOptions;
// @public
export const logger: AzureLogger;
// @public
export type MergeCertificateOptions = coreHttp.OperationOptions;
// @public
export function parseKeyVaultCertificateIdentifier(id: string): KeyVaultCertificateIdentifier;
export { PipelineOptions }
// @public
export interface PolicySubjectProperties {
subject: string;
subjectAlternativeNames: SubjectAlternativeNames;
}
export { PollerLike }
// @public
export type PurgeDeletedCertificateOptions = coreHttp.OperationOptions;
// @public
export type RecoverDeletedCertificateState = KeyVaultCertificatePollOperationState<KeyVaultCertificateWithPolicy>;
// @public
export type RequireAtLeastOne<T> = {
[K in keyof T]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<keyof T, K>>>;
}[keyof T];
// @public
export type RestoreCertificateBackupOptions = coreHttp.OperationOptions;
// @public
export type SetContactsOptions = coreHttp.OperationOptions;
// @public
export type SubjectAlternativeNames = RequireAtLeastOne<SubjectAlternativeNamesAll>;
// @public
export interface SubjectAlternativeNamesAll {
dnsNames: ArrayOneOrMore<string>;
emails: ArrayOneOrMore<string>;
userPrincipalNames: ArrayOneOrMore<string>;
}
// @public
export interface UpdateCertificateOptions extends CertificateProperties, coreHttp.OperationOptions {
}
// @public
export type UpdateCertificatePolicyOptions = coreHttp.OperationOptions;
// @public
export interface UpdateIssuerOptions extends CreateIssuerOptions {
provider?: string;
}
// @public
export enum WellKnownIssuer {
Self = "Self",
Unknown = "Unknown"
}
// @public
export interface X509CertificateProperties {
ekus?: string[];
keyUsage?: KeyUsageType[];
subject?: string;
subjectAlternativeNames?: CoreSubjectAlternativeNames;
validityInMonths?: number;
}
// (No @packageDocumentation comment for this package)
```