/
GetCertificate.cs
158 lines (140 loc) · 5 KB
/
GetCertificate.cs
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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.DigitalOcean
{
public static class GetCertificate
{
/// <summary>
/// Get information on a certificate. This data source provides the name, type, state,
/// domains, expiry date, and the sha1 fingerprint as configured on your DigitalOcean account.
/// This is useful if the certificate in question is not managed by this provider or you need to utilize
/// any of the certificates data.
///
/// An error is triggered if the provided certificate name does not exist.
///
/// {{% examples %}}
/// ## Example Usage
/// {{% example %}}
///
/// Get the certificate:
///
/// ```csharp
/// using Pulumi;
/// using DigitalOcean = Pulumi.DigitalOcean;
///
/// class MyStack : Stack
/// {
/// public MyStack()
/// {
/// var example = Output.Create(DigitalOcean.GetCertificate.InvokeAsync(new DigitalOcean.GetCertificateArgs
/// {
/// Name = "example",
/// }));
/// }
///
/// }
/// ```
/// {{% /example %}}
/// {{% /examples %}}
/// </summary>
public static Task<GetCertificateResult> InvokeAsync(GetCertificateArgs args, InvokeOptions? options = null)
=> Pulumi.Deployment.Instance.InvokeAsync<GetCertificateResult>("digitalocean:index/getCertificate:getCertificate", args ?? new GetCertificateArgs(), options.WithDefaults());
/// <summary>
/// Get information on a certificate. This data source provides the name, type, state,
/// domains, expiry date, and the sha1 fingerprint as configured on your DigitalOcean account.
/// This is useful if the certificate in question is not managed by this provider or you need to utilize
/// any of the certificates data.
///
/// An error is triggered if the provided certificate name does not exist.
///
/// {{% examples %}}
/// ## Example Usage
/// {{% example %}}
///
/// Get the certificate:
///
/// ```csharp
/// using Pulumi;
/// using DigitalOcean = Pulumi.DigitalOcean;
///
/// class MyStack : Stack
/// {
/// public MyStack()
/// {
/// var example = Output.Create(DigitalOcean.GetCertificate.InvokeAsync(new DigitalOcean.GetCertificateArgs
/// {
/// Name = "example",
/// }));
/// }
///
/// }
/// ```
/// {{% /example %}}
/// {{% /examples %}}
/// </summary>
public static Output<GetCertificateResult> Invoke(GetCertificateInvokeArgs args, InvokeOptions? options = null)
=> Pulumi.Deployment.Instance.Invoke<GetCertificateResult>("digitalocean:index/getCertificate:getCertificate", args ?? new GetCertificateInvokeArgs(), options.WithDefaults());
}
public sealed class GetCertificateArgs : Pulumi.InvokeArgs
{
/// <summary>
/// The name of certificate.
/// </summary>
[Input("name", required: true)]
public string Name { get; set; } = null!;
public GetCertificateArgs()
{
}
}
public sealed class GetCertificateInvokeArgs : Pulumi.InvokeArgs
{
/// <summary>
/// The name of certificate.
/// </summary>
[Input("name", required: true)]
public Input<string> Name { get; set; } = null!;
public GetCertificateInvokeArgs()
{
}
}
[OutputType]
public sealed class GetCertificateResult
{
public readonly ImmutableArray<string> Domains;
/// <summary>
/// The provider-assigned unique ID for this managed resource.
/// </summary>
public readonly string Id;
public readonly string Name;
public readonly string NotAfter;
public readonly string Sha1Fingerprint;
public readonly string State;
public readonly string Type;
public readonly string Uuid;
[OutputConstructor]
private GetCertificateResult(
ImmutableArray<string> domains,
string id,
string name,
string notAfter,
string sha1Fingerprint,
string state,
string type,
string uuid)
{
Domains = domains;
Id = id;
Name = name;
NotAfter = notAfter;
Sha1Fingerprint = sha1Fingerprint;
State = state;
Type = type;
Uuid = uuid;
}
}
}