/
getSslCertificate.go
164 lines (137 loc) · 8.61 KB
/
getSslCertificate.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package beta
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Returns the specified SslCertificate resource.
func LookupSslCertificate(ctx *pulumi.Context, args *LookupSslCertificateArgs, opts ...pulumi.InvokeOption) (*LookupSslCertificateResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSslCertificateResult
err := ctx.Invoke("google-native:compute/beta:getSslCertificate", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupSslCertificateArgs struct {
Project *string `pulumi:"project"`
SslCertificate string `pulumi:"sslCertificate"`
}
type LookupSslCertificateResult struct {
// A value read into memory from a certificate file. The certificate file must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert.
Certificate string `pulumi:"certificate"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp string `pulumi:"creationTimestamp"`
// An optional description of this resource. Provide this property when you create the resource.
Description string `pulumi:"description"`
// Expire time of the certificate. RFC3339
ExpireTime string `pulumi:"expireTime"`
// Type of the resource. Always compute#sslCertificate for SSL certificates.
Kind string `pulumi:"kind"`
// Configuration and status of a managed SSL certificate.
Managed SslCertificateManagedSslCertificateResponse `pulumi:"managed"`
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name string `pulumi:"name"`
// A value read into memory from a write-only private key file. The private key file must be in PEM format. For security, only insert requests include this field.
PrivateKey string `pulumi:"privateKey"`
// URL of the region where the regional SSL Certificate resides. This field is not applicable to global SSL Certificate.
Region string `pulumi:"region"`
// [Output only] Server-defined URL for the resource.
SelfLink string `pulumi:"selfLink"`
// Configuration and status of a self-managed SSL certificate.
SelfManaged SslCertificateSelfManagedSslCertificateResponse `pulumi:"selfManaged"`
// Domains associated with the certificate via Subject Alternative Name.
SubjectAlternativeNames []string `pulumi:"subjectAlternativeNames"`
// (Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the certificate is self-managed and the fields certificate and private_key are used.
Type string `pulumi:"type"`
}
func LookupSslCertificateOutput(ctx *pulumi.Context, args LookupSslCertificateOutputArgs, opts ...pulumi.InvokeOption) LookupSslCertificateResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupSslCertificateResult, error) {
args := v.(LookupSslCertificateArgs)
r, err := LookupSslCertificate(ctx, &args, opts...)
var s LookupSslCertificateResult
if r != nil {
s = *r
}
return s, err
}).(LookupSslCertificateResultOutput)
}
type LookupSslCertificateOutputArgs struct {
Project pulumi.StringPtrInput `pulumi:"project"`
SslCertificate pulumi.StringInput `pulumi:"sslCertificate"`
}
func (LookupSslCertificateOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSslCertificateArgs)(nil)).Elem()
}
type LookupSslCertificateResultOutput struct{ *pulumi.OutputState }
func (LookupSslCertificateResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSslCertificateResult)(nil)).Elem()
}
func (o LookupSslCertificateResultOutput) ToLookupSslCertificateResultOutput() LookupSslCertificateResultOutput {
return o
}
func (o LookupSslCertificateResultOutput) ToLookupSslCertificateResultOutputWithContext(ctx context.Context) LookupSslCertificateResultOutput {
return o
}
// A value read into memory from a certificate file. The certificate file must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert.
func (o LookupSslCertificateResultOutput) Certificate() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.Certificate }).(pulumi.StringOutput)
}
// Creation timestamp in RFC3339 text format.
func (o LookupSslCertificateResultOutput) CreationTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.CreationTimestamp }).(pulumi.StringOutput)
}
// An optional description of this resource. Provide this property when you create the resource.
func (o LookupSslCertificateResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.Description }).(pulumi.StringOutput)
}
// Expire time of the certificate. RFC3339
func (o LookupSslCertificateResultOutput) ExpireTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.ExpireTime }).(pulumi.StringOutput)
}
// Type of the resource. Always compute#sslCertificate for SSL certificates.
func (o LookupSslCertificateResultOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.Kind }).(pulumi.StringOutput)
}
// Configuration and status of a managed SSL certificate.
func (o LookupSslCertificateResultOutput) Managed() SslCertificateManagedSslCertificateResponseOutput {
return o.ApplyT(func(v LookupSslCertificateResult) SslCertificateManagedSslCertificateResponse { return v.Managed }).(SslCertificateManagedSslCertificateResponseOutput)
}
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
func (o LookupSslCertificateResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.Name }).(pulumi.StringOutput)
}
// A value read into memory from a write-only private key file. The private key file must be in PEM format. For security, only insert requests include this field.
func (o LookupSslCertificateResultOutput) PrivateKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.PrivateKey }).(pulumi.StringOutput)
}
// URL of the region where the regional SSL Certificate resides. This field is not applicable to global SSL Certificate.
func (o LookupSslCertificateResultOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.Region }).(pulumi.StringOutput)
}
// [Output only] Server-defined URL for the resource.
func (o LookupSslCertificateResultOutput) SelfLink() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.SelfLink }).(pulumi.StringOutput)
}
// Configuration and status of a self-managed SSL certificate.
func (o LookupSslCertificateResultOutput) SelfManaged() SslCertificateSelfManagedSslCertificateResponseOutput {
return o.ApplyT(func(v LookupSslCertificateResult) SslCertificateSelfManagedSslCertificateResponse {
return v.SelfManaged
}).(SslCertificateSelfManagedSslCertificateResponseOutput)
}
// Domains associated with the certificate via Subject Alternative Name.
func (o LookupSslCertificateResultOutput) SubjectAlternativeNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupSslCertificateResult) []string { return v.SubjectAlternativeNames }).(pulumi.StringArrayOutput)
}
// (Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the certificate is self-managed and the fields certificate and private_key are used.
func (o LookupSslCertificateResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupSslCertificateResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSslCertificateResultOutput{})
}