/
getTlsActivation.go
149 lines (130 loc) · 5.3 KB
/
getTlsActivation.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
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package fastly
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to get information on a TLS activation, including the certificate used, and the domain on which TLS was enabled.
//
// > **Warning:** The data source's filters are applied using an **AND** boolean operator, so depending on the combination
// of filters, they may become mutually exclusive. The exception to this is `id` which must not be specified in combination
// with any of the others.
//
// > **Note:** If more or less than a single match is returned by the search, this provider will fail. Ensure that your search is specific enough to return a single key.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-fastly/sdk/v4/go/fastly"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := fastly.LookupTlsActivation(ctx, &GetTlsActivationArgs{
// Domain: pulumi.StringRef("example.com"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func LookupTlsActivation(ctx *pulumi.Context, args *LookupTlsActivationArgs, opts ...pulumi.InvokeOption) (*LookupTlsActivationResult, error) {
var rv LookupTlsActivationResult
err := ctx.Invoke("fastly:index/getTlsActivation:getTlsActivation", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getTlsActivation.
type LookupTlsActivationArgs struct {
// ID of the TLS Certificate used.
CertificateId *string `pulumi:"certificateId"`
// ID of the TLS Configuration used.
ConfigurationId *string `pulumi:"configurationId"`
// Domain that TLS was enabled on.
Domain *string `pulumi:"domain"`
// Fastly Activation ID. Conflicts with all other filters.
Id *string `pulumi:"id"`
}
// A collection of values returned by getTlsActivation.
type LookupTlsActivationResult struct {
// ID of the TLS Certificate used.
CertificateId string `pulumi:"certificateId"`
// ID of the TLS Configuration used.
ConfigurationId string `pulumi:"configurationId"`
// Timestamp (GMT) when TLS was enabled.
CreatedAt string `pulumi:"createdAt"`
// Domain that TLS was enabled on.
Domain string `pulumi:"domain"`
// Fastly Activation ID. Conflicts with all other filters.
Id string `pulumi:"id"`
}
func LookupTlsActivationOutput(ctx *pulumi.Context, args LookupTlsActivationOutputArgs, opts ...pulumi.InvokeOption) LookupTlsActivationResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupTlsActivationResult, error) {
args := v.(LookupTlsActivationArgs)
r, err := LookupTlsActivation(ctx, &args, opts...)
var s LookupTlsActivationResult
if r != nil {
s = *r
}
return s, err
}).(LookupTlsActivationResultOutput)
}
// A collection of arguments for invoking getTlsActivation.
type LookupTlsActivationOutputArgs struct {
// ID of the TLS Certificate used.
CertificateId pulumi.StringPtrInput `pulumi:"certificateId"`
// ID of the TLS Configuration used.
ConfigurationId pulumi.StringPtrInput `pulumi:"configurationId"`
// Domain that TLS was enabled on.
Domain pulumi.StringPtrInput `pulumi:"domain"`
// Fastly Activation ID. Conflicts with all other filters.
Id pulumi.StringPtrInput `pulumi:"id"`
}
func (LookupTlsActivationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTlsActivationArgs)(nil)).Elem()
}
// A collection of values returned by getTlsActivation.
type LookupTlsActivationResultOutput struct{ *pulumi.OutputState }
func (LookupTlsActivationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTlsActivationResult)(nil)).Elem()
}
func (o LookupTlsActivationResultOutput) ToLookupTlsActivationResultOutput() LookupTlsActivationResultOutput {
return o
}
func (o LookupTlsActivationResultOutput) ToLookupTlsActivationResultOutputWithContext(ctx context.Context) LookupTlsActivationResultOutput {
return o
}
// ID of the TLS Certificate used.
func (o LookupTlsActivationResultOutput) CertificateId() pulumi.StringOutput {
return o.ApplyT(func(v LookupTlsActivationResult) string { return v.CertificateId }).(pulumi.StringOutput)
}
// ID of the TLS Configuration used.
func (o LookupTlsActivationResultOutput) ConfigurationId() pulumi.StringOutput {
return o.ApplyT(func(v LookupTlsActivationResult) string { return v.ConfigurationId }).(pulumi.StringOutput)
}
// Timestamp (GMT) when TLS was enabled.
func (o LookupTlsActivationResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupTlsActivationResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
// Domain that TLS was enabled on.
func (o LookupTlsActivationResultOutput) Domain() pulumi.StringOutput {
return o.ApplyT(func(v LookupTlsActivationResult) string { return v.Domain }).(pulumi.StringOutput)
}
// Fastly Activation ID. Conflicts with all other filters.
func (o LookupTlsActivationResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupTlsActivationResult) string { return v.Id }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTlsActivationResultOutput{})
}