generated from pulumi/pulumi-tf-provider-boilerplate
/
getConnections.go
184 lines (162 loc) · 7.03 KB
/
getConnections.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
// 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 devops
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 Connections in Oracle Cloud Infrastructure Devops service.
//
// Returns a list of connections.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/DevOps"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := DevOps.GetConnections(ctx, &devops.GetConnectionsArgs{
// CompartmentId: pulumi.StringRef(compartmentId),
// ConnectionType: pulumi.StringRef(connectionConnectionType),
// DisplayName: pulumi.StringRef(connectionDisplayName),
// Id: pulumi.StringRef(connectionId),
// ProjectId: pulumi.StringRef(testProject.Id),
// State: pulumi.StringRef(connectionState),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetConnections(ctx *pulumi.Context, args *GetConnectionsArgs, opts ...pulumi.InvokeOption) (*GetConnectionsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetConnectionsResult
err := ctx.Invoke("oci:DevOps/getConnections:getConnections", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getConnections.
type GetConnectionsArgs struct {
// The OCID of the compartment in which to list resources.
CompartmentId *string `pulumi:"compartmentId"`
// A filter to return only resources that match the given connection type.
ConnectionType *string `pulumi:"connectionType"`
// A filter to return only resources that match the entire display name given.
DisplayName *string `pulumi:"displayName"`
Filters []GetConnectionsFilter `pulumi:"filters"`
// Unique identifier or OCID for listing a single resource by ID.
Id *string `pulumi:"id"`
// unique project identifier
ProjectId *string `pulumi:"projectId"`
// A filter to return only connections that matches the given lifecycle state.
State *string `pulumi:"state"`
}
// A collection of values returned by getConnections.
type GetConnectionsResult struct {
// The OCID of the compartment containing the connection.
CompartmentId *string `pulumi:"compartmentId"`
// The list of connection_collection.
ConnectionCollections []GetConnectionsConnectionCollection `pulumi:"connectionCollections"`
// The type of connection.
ConnectionType *string `pulumi:"connectionType"`
// Connection display name, which can be renamed and is not necessarily unique. Avoid entering confidential information.
DisplayName *string `pulumi:"displayName"`
Filters []GetConnectionsFilter `pulumi:"filters"`
// Unique identifier that is immutable on creation.
Id *string `pulumi:"id"`
// The OCID of the DevOps project.
ProjectId *string `pulumi:"projectId"`
// The current state of the connection.
State *string `pulumi:"state"`
}
func GetConnectionsOutput(ctx *pulumi.Context, args GetConnectionsOutputArgs, opts ...pulumi.InvokeOption) GetConnectionsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetConnectionsResult, error) {
args := v.(GetConnectionsArgs)
r, err := GetConnections(ctx, &args, opts...)
var s GetConnectionsResult
if r != nil {
s = *r
}
return s, err
}).(GetConnectionsResultOutput)
}
// A collection of arguments for invoking getConnections.
type GetConnectionsOutputArgs struct {
// The OCID of the compartment in which to list resources.
CompartmentId pulumi.StringPtrInput `pulumi:"compartmentId"`
// A filter to return only resources that match the given connection type.
ConnectionType pulumi.StringPtrInput `pulumi:"connectionType"`
// A filter to return only resources that match the entire display name given.
DisplayName pulumi.StringPtrInput `pulumi:"displayName"`
Filters GetConnectionsFilterArrayInput `pulumi:"filters"`
// Unique identifier or OCID for listing a single resource by ID.
Id pulumi.StringPtrInput `pulumi:"id"`
// unique project identifier
ProjectId pulumi.StringPtrInput `pulumi:"projectId"`
// A filter to return only connections that matches the given lifecycle state.
State pulumi.StringPtrInput `pulumi:"state"`
}
func (GetConnectionsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetConnectionsArgs)(nil)).Elem()
}
// A collection of values returned by getConnections.
type GetConnectionsResultOutput struct{ *pulumi.OutputState }
func (GetConnectionsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetConnectionsResult)(nil)).Elem()
}
func (o GetConnectionsResultOutput) ToGetConnectionsResultOutput() GetConnectionsResultOutput {
return o
}
func (o GetConnectionsResultOutput) ToGetConnectionsResultOutputWithContext(ctx context.Context) GetConnectionsResultOutput {
return o
}
// The OCID of the compartment containing the connection.
func (o GetConnectionsResultOutput) CompartmentId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetConnectionsResult) *string { return v.CompartmentId }).(pulumi.StringPtrOutput)
}
// The list of connection_collection.
func (o GetConnectionsResultOutput) ConnectionCollections() GetConnectionsConnectionCollectionArrayOutput {
return o.ApplyT(func(v GetConnectionsResult) []GetConnectionsConnectionCollection { return v.ConnectionCollections }).(GetConnectionsConnectionCollectionArrayOutput)
}
// The type of connection.
func (o GetConnectionsResultOutput) ConnectionType() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetConnectionsResult) *string { return v.ConnectionType }).(pulumi.StringPtrOutput)
}
// Connection display name, which can be renamed and is not necessarily unique. Avoid entering confidential information.
func (o GetConnectionsResultOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetConnectionsResult) *string { return v.DisplayName }).(pulumi.StringPtrOutput)
}
func (o GetConnectionsResultOutput) Filters() GetConnectionsFilterArrayOutput {
return o.ApplyT(func(v GetConnectionsResult) []GetConnectionsFilter { return v.Filters }).(GetConnectionsFilterArrayOutput)
}
// Unique identifier that is immutable on creation.
func (o GetConnectionsResultOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetConnectionsResult) *string { return v.Id }).(pulumi.StringPtrOutput)
}
// The OCID of the DevOps project.
func (o GetConnectionsResultOutput) ProjectId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetConnectionsResult) *string { return v.ProjectId }).(pulumi.StringPtrOutput)
}
// The current state of the connection.
func (o GetConnectionsResultOutput) State() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetConnectionsResult) *string { return v.State }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetConnectionsResultOutput{})
}