generated from pulumi/pulumi-tf-provider-boilerplate
/
getCertificates.go
181 lines (158 loc) · 7.61 KB
/
getCertificates.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
// 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 waas
import (
"context"
"reflect"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This data source provides the list of Certificates in Oracle Cloud Infrastructure Web Application Acceleration and Security service.
//
// Gets a list of SSL certificates that can be used in a WAAS policy.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/Waas"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := Waas.GetCertificates(ctx, &waas.GetCertificatesArgs{
// CompartmentId: compartmentId,
// DisplayNames: certificateDisplayNames,
// Ids: certificateIds,
// States: certificateStates,
// TimeCreatedGreaterThanOrEqualTo: pulumi.StringRef(certificateTimeCreatedGreaterThanOrEqualTo),
// TimeCreatedLessThan: pulumi.StringRef(certificateTimeCreatedLessThan),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetCertificates(ctx *pulumi.Context, args *GetCertificatesArgs, opts ...pulumi.InvokeOption) (*GetCertificatesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetCertificatesResult
err := ctx.Invoke("oci:Waas/getCertificates:getCertificates", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCertificates.
type GetCertificatesArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. This number is generated when the compartment is created.
CompartmentId string `pulumi:"compartmentId"`
// Filter certificates using a list of display names.
DisplayNames []string `pulumi:"displayNames"`
Filters []GetCertificatesFilter `pulumi:"filters"`
// Filter certificates using a list of certificates OCIDs.
Ids []string `pulumi:"ids"`
// Filter certificates using a list of lifecycle states.
States []string `pulumi:"states"`
// A filter that matches certificates created on or after the specified date-time.
TimeCreatedGreaterThanOrEqualTo *string `pulumi:"timeCreatedGreaterThanOrEqualTo"`
// A filter that matches certificates created before the specified date-time.
TimeCreatedLessThan *string `pulumi:"timeCreatedLessThan"`
}
// A collection of values returned by getCertificates.
type GetCertificatesResult struct {
// The list of certificates.
Certificates []GetCertificatesCertificate `pulumi:"certificates"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the SSL certificate's compartment.
CompartmentId string `pulumi:"compartmentId"`
DisplayNames []string `pulumi:"displayNames"`
Filters []GetCertificatesFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Ids []string `pulumi:"ids"`
States []string `pulumi:"states"`
TimeCreatedGreaterThanOrEqualTo *string `pulumi:"timeCreatedGreaterThanOrEqualTo"`
TimeCreatedLessThan *string `pulumi:"timeCreatedLessThan"`
}
func GetCertificatesOutput(ctx *pulumi.Context, args GetCertificatesOutputArgs, opts ...pulumi.InvokeOption) GetCertificatesResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetCertificatesResult, error) {
args := v.(GetCertificatesArgs)
r, err := GetCertificates(ctx, &args, opts...)
var s GetCertificatesResult
if r != nil {
s = *r
}
return s, err
}).(GetCertificatesResultOutput)
}
// A collection of arguments for invoking getCertificates.
type GetCertificatesOutputArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. This number is generated when the compartment is created.
CompartmentId pulumi.StringInput `pulumi:"compartmentId"`
// Filter certificates using a list of display names.
DisplayNames pulumi.StringArrayInput `pulumi:"displayNames"`
Filters GetCertificatesFilterArrayInput `pulumi:"filters"`
// Filter certificates using a list of certificates OCIDs.
Ids pulumi.StringArrayInput `pulumi:"ids"`
// Filter certificates using a list of lifecycle states.
States pulumi.StringArrayInput `pulumi:"states"`
// A filter that matches certificates created on or after the specified date-time.
TimeCreatedGreaterThanOrEqualTo pulumi.StringPtrInput `pulumi:"timeCreatedGreaterThanOrEqualTo"`
// A filter that matches certificates created before the specified date-time.
TimeCreatedLessThan pulumi.StringPtrInput `pulumi:"timeCreatedLessThan"`
}
func (GetCertificatesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetCertificatesArgs)(nil)).Elem()
}
// A collection of values returned by getCertificates.
type GetCertificatesResultOutput struct{ *pulumi.OutputState }
func (GetCertificatesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetCertificatesResult)(nil)).Elem()
}
func (o GetCertificatesResultOutput) ToGetCertificatesResultOutput() GetCertificatesResultOutput {
return o
}
func (o GetCertificatesResultOutput) ToGetCertificatesResultOutputWithContext(ctx context.Context) GetCertificatesResultOutput {
return o
}
// The list of certificates.
func (o GetCertificatesResultOutput) Certificates() GetCertificatesCertificateArrayOutput {
return o.ApplyT(func(v GetCertificatesResult) []GetCertificatesCertificate { return v.Certificates }).(GetCertificatesCertificateArrayOutput)
}
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the SSL certificate's compartment.
func (o GetCertificatesResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetCertificatesResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
func (o GetCertificatesResultOutput) DisplayNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetCertificatesResult) []string { return v.DisplayNames }).(pulumi.StringArrayOutput)
}
func (o GetCertificatesResultOutput) Filters() GetCertificatesFilterArrayOutput {
return o.ApplyT(func(v GetCertificatesResult) []GetCertificatesFilter { return v.Filters }).(GetCertificatesFilterArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetCertificatesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetCertificatesResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetCertificatesResultOutput) Ids() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetCertificatesResult) []string { return v.Ids }).(pulumi.StringArrayOutput)
}
func (o GetCertificatesResultOutput) States() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetCertificatesResult) []string { return v.States }).(pulumi.StringArrayOutput)
}
func (o GetCertificatesResultOutput) TimeCreatedGreaterThanOrEqualTo() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetCertificatesResult) *string { return v.TimeCreatedGreaterThanOrEqualTo }).(pulumi.StringPtrOutput)
}
func (o GetCertificatesResultOutput) TimeCreatedLessThan() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetCertificatesResult) *string { return v.TimeCreatedLessThan }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetCertificatesResultOutput{})
}