-
Notifications
You must be signed in to change notification settings - Fork 883
/
Copy pathclient.go
1669 lines (1585 loc) · 73.4 KB
/
client.go
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
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package azcertificates
import (
"context"
"errors"
"net/http"
"net/url"
"strconv"
"strings"
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
)
// Client contains the methods for the group.
// Don't use this type directly, use a constructor function instead.
type Client struct {
internal *azcore.Client
vaultBaseUrl string
}
// BackupCertificate - Backs up the specified certificate.
//
// Requests that a backup of the specified certificate be downloaded to the client. All versions of the certificate will be
// downloaded. This operation requires the certificates/backup permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the certificate.
// - options - BackupCertificateOptions contains the optional parameters for the Client.BackupCertificate method.
func (client *Client) BackupCertificate(ctx context.Context, name string, options *BackupCertificateOptions) (BackupCertificateResponse, error) {
var err error
const operationName = "Client.BackupCertificate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.backupCertificateCreateRequest(ctx, name, options)
if err != nil {
return BackupCertificateResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return BackupCertificateResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return BackupCertificateResponse{}, err
}
resp, err := client.backupCertificateHandleResponse(httpResp)
return resp, err
}
// backupCertificateCreateRequest creates the BackupCertificate request.
func (client *Client) backupCertificateCreateRequest(ctx context.Context, name string, _ *BackupCertificateOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/{certificate-name}/backup"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// backupCertificateHandleResponse handles the BackupCertificate response.
func (client *Client) backupCertificateHandleResponse(resp *http.Response) (BackupCertificateResponse, error) {
result := BackupCertificateResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.BackupCertificateResult); err != nil {
return BackupCertificateResponse{}, err
}
return result, nil
}
// CreateCertificate - Creates a new certificate.
//
// If this is the first version, the certificate resource is created. This operation requires the certificates/create permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the certificate. The value you provide may be copied globally for the purpose of running the service.
// The value provided should not include personally identifiable or sensitive information.
// - parameters - The parameters to create a certificate.
// - options - CreateCertificateOptions contains the optional parameters for the Client.CreateCertificate method.
func (client *Client) CreateCertificate(ctx context.Context, name string, parameters CreateCertificateParameters, options *CreateCertificateOptions) (CreateCertificateResponse, error) {
var err error
const operationName = "Client.CreateCertificate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.createCertificateCreateRequest(ctx, name, parameters, options)
if err != nil {
return CreateCertificateResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return CreateCertificateResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
err = runtime.NewResponseError(httpResp)
return CreateCertificateResponse{}, err
}
resp, err := client.createCertificateHandleResponse(httpResp)
return resp, err
}
// createCertificateCreateRequest creates the CreateCertificate request.
func (client *Client) createCertificateCreateRequest(ctx context.Context, name string, parameters CreateCertificateParameters, _ *CreateCertificateOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/{certificate-name}/create"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
return nil, err
}
return req, nil
}
// createCertificateHandleResponse handles the CreateCertificate response.
func (client *Client) createCertificateHandleResponse(resp *http.Response) (CreateCertificateResponse, error) {
result := CreateCertificateResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOperation); err != nil {
return CreateCertificateResponse{}, err
}
return result, nil
}
// DeleteCertificate - Deletes a certificate from a specified key vault.
//
// Deletes all versions of a certificate object along with its associated policy. Delete certificate cannot be used to remove
// individual versions of a certificate object. This operation requires the certificates/delete permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the certificate.
// - options - DeleteCertificateOptions contains the optional parameters for the Client.DeleteCertificate method.
func (client *Client) DeleteCertificate(ctx context.Context, name string, options *DeleteCertificateOptions) (DeleteCertificateResponse, error) {
var err error
const operationName = "Client.DeleteCertificate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.deleteCertificateCreateRequest(ctx, name, options)
if err != nil {
return DeleteCertificateResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return DeleteCertificateResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return DeleteCertificateResponse{}, err
}
resp, err := client.deleteCertificateHandleResponse(httpResp)
return resp, err
}
// deleteCertificateCreateRequest creates the DeleteCertificate request.
func (client *Client) deleteCertificateCreateRequest(ctx context.Context, name string, _ *DeleteCertificateOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/{certificate-name}"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// deleteCertificateHandleResponse handles the DeleteCertificate response.
func (client *Client) deleteCertificateHandleResponse(resp *http.Response) (DeleteCertificateResponse, error) {
result := DeleteCertificateResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.DeletedCertificate); err != nil {
return DeleteCertificateResponse{}, err
}
return result, nil
}
// DeleteCertificateOperation - Deletes the creation operation for a specific certificate.
//
// Deletes the creation operation for a specified certificate that is in the process of being created. The certificate is
// no longer created. This operation requires the certificates/update permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the certificate.
// - options - DeleteCertificateOperationOptions contains the optional parameters for the Client.DeleteCertificateOperation
// method.
func (client *Client) DeleteCertificateOperation(ctx context.Context, name string, options *DeleteCertificateOperationOptions) (DeleteCertificateOperationResponse, error) {
var err error
const operationName = "Client.DeleteCertificateOperation"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.deleteCertificateOperationCreateRequest(ctx, name, options)
if err != nil {
return DeleteCertificateOperationResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return DeleteCertificateOperationResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return DeleteCertificateOperationResponse{}, err
}
resp, err := client.deleteCertificateOperationHandleResponse(httpResp)
return resp, err
}
// deleteCertificateOperationCreateRequest creates the DeleteCertificateOperation request.
func (client *Client) deleteCertificateOperationCreateRequest(ctx context.Context, name string, _ *DeleteCertificateOperationOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/{certificate-name}/pending"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// deleteCertificateOperationHandleResponse handles the DeleteCertificateOperation response.
func (client *Client) deleteCertificateOperationHandleResponse(resp *http.Response) (DeleteCertificateOperationResponse, error) {
result := DeleteCertificateOperationResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOperation); err != nil {
return DeleteCertificateOperationResponse{}, err
}
return result, nil
}
// DeleteContacts - Deletes the certificate contacts for a specified key vault.
//
// Deletes the certificate contacts for a specified key vault certificate. This operation requires the certificates/managecontacts
// permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - options - DeleteContactsOptions contains the optional parameters for the Client.DeleteContacts method.
func (client *Client) DeleteContacts(ctx context.Context, options *DeleteContactsOptions) (DeleteContactsResponse, error) {
var err error
const operationName = "Client.DeleteContacts"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.deleteContactsCreateRequest(ctx, options)
if err != nil {
return DeleteContactsResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return DeleteContactsResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return DeleteContactsResponse{}, err
}
resp, err := client.deleteContactsHandleResponse(httpResp)
return resp, err
}
// deleteContactsCreateRequest creates the DeleteContacts request.
func (client *Client) deleteContactsCreateRequest(ctx context.Context, _ *DeleteContactsOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/contacts"
req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// deleteContactsHandleResponse handles the DeleteContacts response.
func (client *Client) deleteContactsHandleResponse(resp *http.Response) (DeleteContactsResponse, error) {
result := DeleteContactsResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.Contacts); err != nil {
return DeleteContactsResponse{}, err
}
return result, nil
}
// DeleteIssuer - Deletes the specified certificate issuer.
//
// The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from the vault. This operation
// requires the certificates/manageissuers/deleteissuers permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the issuer.
// - options - DeleteIssuerOptions contains the optional parameters for the Client.DeleteIssuer method.
func (client *Client) DeleteIssuer(ctx context.Context, name string, options *DeleteIssuerOptions) (DeleteIssuerResponse, error) {
var err error
const operationName = "Client.DeleteIssuer"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.deleteIssuerCreateRequest(ctx, name, options)
if err != nil {
return DeleteIssuerResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return DeleteIssuerResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return DeleteIssuerResponse{}, err
}
resp, err := client.deleteIssuerHandleResponse(httpResp)
return resp, err
}
// deleteIssuerCreateRequest creates the DeleteIssuer request.
func (client *Client) deleteIssuerCreateRequest(ctx context.Context, name string, _ *DeleteIssuerOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/issuers/{issuer-name}"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{issuer-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// deleteIssuerHandleResponse handles the DeleteIssuer response.
func (client *Client) deleteIssuerHandleResponse(resp *http.Response) (DeleteIssuerResponse, error) {
result := DeleteIssuerResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.Issuer); err != nil {
return DeleteIssuerResponse{}, err
}
return result, nil
}
// GetCertificate - Gets information about a certificate.
//
// Gets information about a specific certificate. This operation requires the certificates/get permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the certificate in the given vault.
// - version - The version of the certificate. This URI fragment is optional. If not specified, the latest version of the certificate
// is returned.
// - options - GetCertificateOptions contains the optional parameters for the Client.GetCertificate method.
func (client *Client) GetCertificate(ctx context.Context, name string, version string, options *GetCertificateOptions) (GetCertificateResponse, error) {
var err error
const operationName = "Client.GetCertificate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.getCertificateCreateRequest(ctx, name, version, options)
if err != nil {
return GetCertificateResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return GetCertificateResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return GetCertificateResponse{}, err
}
resp, err := client.getCertificateHandleResponse(httpResp)
return resp, err
}
// getCertificateCreateRequest creates the GetCertificate request.
func (client *Client) getCertificateCreateRequest(ctx context.Context, name string, version string, _ *GetCertificateOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/{certificate-name}/{certificate-version}"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
urlPath = strings.ReplaceAll(urlPath, "{certificate-version}", url.PathEscape(version))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// getCertificateHandleResponse handles the GetCertificate response.
func (client *Client) getCertificateHandleResponse(resp *http.Response) (GetCertificateResponse, error) {
result := GetCertificateResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.Certificate); err != nil {
return GetCertificateResponse{}, err
}
return result, nil
}
// GetCertificateOperation - Gets the creation operation of a certificate.
//
// Gets the creation operation associated with a specified certificate. This operation requires the certificates/get permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the certificate.
// - options - GetCertificateOperationOptions contains the optional parameters for the Client.GetCertificateOperation method.
func (client *Client) GetCertificateOperation(ctx context.Context, name string, options *GetCertificateOperationOptions) (GetCertificateOperationResponse, error) {
var err error
const operationName = "Client.GetCertificateOperation"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.getCertificateOperationCreateRequest(ctx, name, options)
if err != nil {
return GetCertificateOperationResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return GetCertificateOperationResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return GetCertificateOperationResponse{}, err
}
resp, err := client.getCertificateOperationHandleResponse(httpResp)
return resp, err
}
// getCertificateOperationCreateRequest creates the GetCertificateOperation request.
func (client *Client) getCertificateOperationCreateRequest(ctx context.Context, name string, _ *GetCertificateOperationOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/{certificate-name}/pending"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// getCertificateOperationHandleResponse handles the GetCertificateOperation response.
func (client *Client) getCertificateOperationHandleResponse(resp *http.Response) (GetCertificateOperationResponse, error) {
result := GetCertificateOperationResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOperation); err != nil {
return GetCertificateOperationResponse{}, err
}
return result, nil
}
// GetCertificatePolicy - Lists the policy for a certificate.
//
// The GetCertificatePolicy operation returns the specified certificate policy resources in the specified key vault. This
// operation requires the certificates/get permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the certificate in a given key vault.
// - options - GetCertificatePolicyOptions contains the optional parameters for the Client.GetCertificatePolicy method.
func (client *Client) GetCertificatePolicy(ctx context.Context, name string, options *GetCertificatePolicyOptions) (GetCertificatePolicyResponse, error) {
var err error
const operationName = "Client.GetCertificatePolicy"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.getCertificatePolicyCreateRequest(ctx, name, options)
if err != nil {
return GetCertificatePolicyResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return GetCertificatePolicyResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return GetCertificatePolicyResponse{}, err
}
resp, err := client.getCertificatePolicyHandleResponse(httpResp)
return resp, err
}
// getCertificatePolicyCreateRequest creates the GetCertificatePolicy request.
func (client *Client) getCertificatePolicyCreateRequest(ctx context.Context, name string, _ *GetCertificatePolicyOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/{certificate-name}/policy"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// getCertificatePolicyHandleResponse handles the GetCertificatePolicy response.
func (client *Client) getCertificatePolicyHandleResponse(resp *http.Response) (GetCertificatePolicyResponse, error) {
result := GetCertificatePolicyResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.CertificatePolicy); err != nil {
return GetCertificatePolicyResponse{}, err
}
return result, nil
}
// GetContacts - Lists the certificate contacts for a specified key vault.
//
// The GetCertificateContacts operation returns the set of certificate contact resources in the specified key vault. This
// operation requires the certificates/managecontacts permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - options - GetContactsOptions contains the optional parameters for the Client.GetContacts method.
func (client *Client) GetContacts(ctx context.Context, options *GetContactsOptions) (GetContactsResponse, error) {
var err error
const operationName = "Client.GetContacts"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.getContactsCreateRequest(ctx, options)
if err != nil {
return GetContactsResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return GetContactsResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return GetContactsResponse{}, err
}
resp, err := client.getContactsHandleResponse(httpResp)
return resp, err
}
// getContactsCreateRequest creates the GetContacts request.
func (client *Client) getContactsCreateRequest(ctx context.Context, _ *GetContactsOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/contacts"
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// getContactsHandleResponse handles the GetContacts response.
func (client *Client) getContactsHandleResponse(resp *http.Response) (GetContactsResponse, error) {
result := GetContactsResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.Contacts); err != nil {
return GetContactsResponse{}, err
}
return result, nil
}
// GetDeletedCertificate - Retrieves information about the specified deleted certificate.
//
// The GetDeletedCertificate operation retrieves the deleted certificate information plus its attributes, such as retention
// interval, scheduled permanent deletion and the current deletion recovery level. This operation requires the certificates/get
// permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the certificate
// - options - GetDeletedCertificateOptions contains the optional parameters for the Client.GetDeletedCertificate method.
func (client *Client) GetDeletedCertificate(ctx context.Context, name string, options *GetDeletedCertificateOptions) (GetDeletedCertificateResponse, error) {
var err error
const operationName = "Client.GetDeletedCertificate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.getDeletedCertificateCreateRequest(ctx, name, options)
if err != nil {
return GetDeletedCertificateResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return GetDeletedCertificateResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return GetDeletedCertificateResponse{}, err
}
resp, err := client.getDeletedCertificateHandleResponse(httpResp)
return resp, err
}
// getDeletedCertificateCreateRequest creates the GetDeletedCertificate request.
func (client *Client) getDeletedCertificateCreateRequest(ctx context.Context, name string, _ *GetDeletedCertificateOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/deletedcertificates/{certificate-name}"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// getDeletedCertificateHandleResponse handles the GetDeletedCertificate response.
func (client *Client) getDeletedCertificateHandleResponse(resp *http.Response) (GetDeletedCertificateResponse, error) {
result := GetDeletedCertificateResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.DeletedCertificate); err != nil {
return GetDeletedCertificateResponse{}, err
}
return result, nil
}
// GetIssuer - Lists the specified certificate issuer.
//
// The GetCertificateIssuer operation returns the specified certificate issuer resources in the specified key vault. This
// operation requires the certificates/manageissuers/getissuers permission.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the issuer.
// - options - GetIssuerOptions contains the optional parameters for the Client.GetIssuer method.
func (client *Client) GetIssuer(ctx context.Context, name string, options *GetIssuerOptions) (GetIssuerResponse, error) {
var err error
const operationName = "Client.GetIssuer"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.getIssuerCreateRequest(ctx, name, options)
if err != nil {
return GetIssuerResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return GetIssuerResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return GetIssuerResponse{}, err
}
resp, err := client.getIssuerHandleResponse(httpResp)
return resp, err
}
// getIssuerCreateRequest creates the GetIssuer request.
func (client *Client) getIssuerCreateRequest(ctx context.Context, name string, _ *GetIssuerOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/issuers/{issuer-name}"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{issuer-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// getIssuerHandleResponse handles the GetIssuer response.
func (client *Client) getIssuerHandleResponse(resp *http.Response) (GetIssuerResponse, error) {
result := GetIssuerResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.Issuer); err != nil {
return GetIssuerResponse{}, err
}
return result, nil
}
// ImportCertificate - Imports a certificate into a specified key vault.
//
// Imports an existing valid certificate, containing a private key, into Azure Key Vault. This operation requires the certificates/import
// permission. The certificate to be imported can be in either PFX or PEM format. If the certificate is in PEM format the
// PEM file must contain the key as well as x509 certificates. Key Vault will only accept a key in PKCS#8 format.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 7.5
// - name - The name of the certificate. The value you provide may be copied globally for the purpose of running the service.
// The value provided should not include personally identifiable or sensitive information.
// - parameters - The parameters to import the certificate.
// - options - ImportCertificateOptions contains the optional parameters for the Client.ImportCertificate method.
func (client *Client) ImportCertificate(ctx context.Context, name string, parameters ImportCertificateParameters, options *ImportCertificateOptions) (ImportCertificateResponse, error) {
var err error
const operationName = "Client.ImportCertificate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.importCertificateCreateRequest(ctx, name, parameters, options)
if err != nil {
return ImportCertificateResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return ImportCertificateResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return ImportCertificateResponse{}, err
}
resp, err := client.importCertificateHandleResponse(httpResp)
return resp, err
}
// importCertificateCreateRequest creates the ImportCertificate request.
func (client *Client) importCertificateCreateRequest(ctx context.Context, name string, parameters ImportCertificateParameters, _ *ImportCertificateOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/{certificate-name}/import"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
return nil, err
}
return req, nil
}
// importCertificateHandleResponse handles the ImportCertificate response.
func (client *Client) importCertificateHandleResponse(resp *http.Response) (ImportCertificateResponse, error) {
result := ImportCertificateResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.Certificate); err != nil {
return ImportCertificateResponse{}, err
}
return result, nil
}
// NewListCertificatePropertiesPager - List certificates in a specified key vault
//
// The GetCertificates operation returns the set of certificates resources in the specified key vault. This operation requires
// the certificates/list permission.
//
// Generated from API version 7.5
// - options - ListCertificatePropertiesOptions contains the optional parameters for the Client.NewListCertificatePropertiesPager
// method.
func (client *Client) NewListCertificatePropertiesPager(options *ListCertificatePropertiesOptions) *runtime.Pager[ListCertificatePropertiesResponse] {
return runtime.NewPager(runtime.PagingHandler[ListCertificatePropertiesResponse]{
More: func(page ListCertificatePropertiesResponse) bool {
return page.NextLink != nil && len(*page.NextLink) > 0
},
Fetcher: func(ctx context.Context, page *ListCertificatePropertiesResponse) (ListCertificatePropertiesResponse, error) {
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListCertificatePropertiesPager")
nextLink := ""
if page != nil {
nextLink = *page.NextLink
}
resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
return client.listCertificatePropertiesCreateRequest(ctx, options)
}, nil)
if err != nil {
return ListCertificatePropertiesResponse{}, err
}
return client.listCertificatePropertiesHandleResponse(resp)
},
Tracer: client.internal.Tracer(),
})
}
// listCertificatePropertiesCreateRequest creates the ListCertificateProperties request.
func (client *Client) listCertificatePropertiesCreateRequest(ctx context.Context, options *ListCertificatePropertiesOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates"
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
if options != nil && options.IncludePending != nil {
reqQP.Set("includePending", strconv.FormatBool(*options.IncludePending))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// listCertificatePropertiesHandleResponse handles the ListCertificateProperties response.
func (client *Client) listCertificatePropertiesHandleResponse(resp *http.Response) (ListCertificatePropertiesResponse, error) {
result := ListCertificatePropertiesResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.CertificatePropertiesListResult); err != nil {
return ListCertificatePropertiesResponse{}, err
}
return result, nil
}
// NewListCertificatePropertiesVersionsPager - List the versions of a certificate.
//
// The GetCertificateVersions operation returns the versions of a certificate in the specified key vault. This operation requires
// the certificates/list permission.
//
// Generated from API version 7.5
// - name - The name of the certificate.
// - options - ListCertificatePropertiesVersionsOptions contains the optional parameters for the Client.NewListCertificatePropertiesVersionsPager
// method.
func (client *Client) NewListCertificatePropertiesVersionsPager(name string, options *ListCertificatePropertiesVersionsOptions) *runtime.Pager[ListCertificatePropertiesVersionsResponse] {
return runtime.NewPager(runtime.PagingHandler[ListCertificatePropertiesVersionsResponse]{
More: func(page ListCertificatePropertiesVersionsResponse) bool {
return page.NextLink != nil && len(*page.NextLink) > 0
},
Fetcher: func(ctx context.Context, page *ListCertificatePropertiesVersionsResponse) (ListCertificatePropertiesVersionsResponse, error) {
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListCertificatePropertiesVersionsPager")
nextLink := ""
if page != nil {
nextLink = *page.NextLink
}
resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
return client.listCertificatePropertiesVersionsCreateRequest(ctx, name, options)
}, nil)
if err != nil {
return ListCertificatePropertiesVersionsResponse{}, err
}
return client.listCertificatePropertiesVersionsHandleResponse(resp)
},
Tracer: client.internal.Tracer(),
})
}
// listCertificatePropertiesVersionsCreateRequest creates the ListCertificatePropertiesVersions request.
func (client *Client) listCertificatePropertiesVersionsCreateRequest(ctx context.Context, name string, _ *ListCertificatePropertiesVersionsOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/certificates/{certificate-name}/versions"
if name == "" {
return nil, errors.New("parameter name cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{certificate-name}", url.PathEscape(name))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// listCertificatePropertiesVersionsHandleResponse handles the ListCertificatePropertiesVersions response.
func (client *Client) listCertificatePropertiesVersionsHandleResponse(resp *http.Response) (ListCertificatePropertiesVersionsResponse, error) {
result := ListCertificatePropertiesVersionsResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.CertificatePropertiesListResult); err != nil {
return ListCertificatePropertiesVersionsResponse{}, err
}
return result, nil
}
// NewListDeletedCertificatePropertiesPager - Lists the deleted certificates in the specified vault currently available for
// recovery.
//
// The GetDeletedCertificates operation retrieves the certificates in the current vault which are in a deleted state and ready
// for recovery or purging. This operation includes deletion-specific information. This operation requires the certificates/get/list
// permission. This operation can only be enabled on soft-delete enabled vaults.
//
// Generated from API version 7.5
// - options - ListDeletedCertificatePropertiesOptions contains the optional parameters for the Client.NewListDeletedCertificatePropertiesPager
// method.
func (client *Client) NewListDeletedCertificatePropertiesPager(options *ListDeletedCertificatePropertiesOptions) *runtime.Pager[ListDeletedCertificatePropertiesResponse] {
return runtime.NewPager(runtime.PagingHandler[ListDeletedCertificatePropertiesResponse]{
More: func(page ListDeletedCertificatePropertiesResponse) bool {
return page.NextLink != nil && len(*page.NextLink) > 0
},
Fetcher: func(ctx context.Context, page *ListDeletedCertificatePropertiesResponse) (ListDeletedCertificatePropertiesResponse, error) {
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListDeletedCertificatePropertiesPager")
nextLink := ""
if page != nil {
nextLink = *page.NextLink
}
resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
return client.listDeletedCertificatePropertiesCreateRequest(ctx, options)
}, nil)
if err != nil {
return ListDeletedCertificatePropertiesResponse{}, err
}
return client.listDeletedCertificatePropertiesHandleResponse(resp)
},
Tracer: client.internal.Tracer(),
})
}
// listDeletedCertificatePropertiesCreateRequest creates the ListDeletedCertificateProperties request.
func (client *Client) listDeletedCertificatePropertiesCreateRequest(ctx context.Context, options *ListDeletedCertificatePropertiesOptions) (*policy.Request, error) {
host := "{vaultBaseUrl}"
host = strings.ReplaceAll(host, "{vaultBaseUrl}", client.vaultBaseUrl)
urlPath := "/deletedcertificates"
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(host, urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "7.5")
if options != nil && options.IncludePending != nil {
reqQP.Set("includePending", strconv.FormatBool(*options.IncludePending))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// listDeletedCertificatePropertiesHandleResponse handles the ListDeletedCertificateProperties response.
func (client *Client) listDeletedCertificatePropertiesHandleResponse(resp *http.Response) (ListDeletedCertificatePropertiesResponse, error) {
result := ListDeletedCertificatePropertiesResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.DeletedCertificatePropertiesListResult); err != nil {
return ListDeletedCertificatePropertiesResponse{}, err
}
return result, nil
}
// NewListIssuerPropertiesPager - List certificate issuers for a specified key vault.
//
// The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault. This operation
// requires the certificates/manageissuers/getissuers permission.
//
// Generated from API version 7.5
// - options - ListIssuerPropertiesOptions contains the optional parameters for the Client.NewListIssuerPropertiesPager method.
func (client *Client) NewListIssuerPropertiesPager(options *ListIssuerPropertiesOptions) *runtime.Pager[ListIssuerPropertiesResponse] {