generated from pulumi/pulumi-tf-provider-boilerplate
/
getConnection.go
236 lines (203 loc) · 10.7 KB
/
getConnection.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
// 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 details about a specific Connection resource in Oracle Cloud Infrastructure Devops service.
//
// Retrieves a connection by identifier.
//
// ## 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.GetConnection(ctx, &devops.GetConnectionArgs{
// ConnectionId: testConnectionOciDevopsConnection.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupConnection(ctx *pulumi.Context, args *LookupConnectionArgs, opts ...pulumi.InvokeOption) (*LookupConnectionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupConnectionResult
err := ctx.Invoke("oci:DevOps/getConnection:getConnection", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getConnection.
type LookupConnectionArgs struct {
// Unique connection identifier.
ConnectionId string `pulumi:"connectionId"`
}
// A collection of values returned by getConnection.
type LookupConnectionResult struct {
// The OCID of personal access token saved in secret store.
AccessToken string `pulumi:"accessToken"`
// OCID of personal Bitbucket Cloud AppPassword saved in secret store
AppPassword string `pulumi:"appPassword"`
// The Base URL of the hosted BitbucketServer/Visual Builder Studio server.
BaseUrl string `pulumi:"baseUrl"`
// The OCID of the compartment containing the connection.
CompartmentId string `pulumi:"compartmentId"`
ConnectionId string `pulumi:"connectionId"`
// The type of connection.
ConnectionType string `pulumi:"connectionType"`
// Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"foo-namespace.bar-key": "value"}`
DefinedTags map[string]interface{} `pulumi:"definedTags"`
// Optional description about the connection.
Description string `pulumi:"description"`
// Connection display name, which can be renamed and is not necessarily unique. Avoid entering confidential information.
DisplayName string `pulumi:"displayName"`
// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}`
FreeformTags map[string]interface{} `pulumi:"freeformTags"`
// Unique identifier that is immutable on creation.
Id string `pulumi:"id"`
// The result of validating the credentials of a connection.
LastConnectionValidationResults []GetConnectionLastConnectionValidationResult `pulumi:"lastConnectionValidationResults"`
// The OCID of the DevOps project.
ProjectId string `pulumi:"projectId"`
// The current state of the connection.
State string `pulumi:"state"`
// Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"orcl-cloud.free-tier-retained": "true"}`
SystemTags map[string]interface{} `pulumi:"systemTags"`
// The time the connection was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339).
TimeCreated string `pulumi:"timeCreated"`
// The time the connection was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339).
TimeUpdated string `pulumi:"timeUpdated"`
// TLS configuration used by build service to verify TLS connection.
TlsVerifyConfigs []GetConnectionTlsVerifyConfig `pulumi:"tlsVerifyConfigs"`
// Public Bitbucket Cloud Username in plain text
Username string `pulumi:"username"`
}
func LookupConnectionOutput(ctx *pulumi.Context, args LookupConnectionOutputArgs, opts ...pulumi.InvokeOption) LookupConnectionResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupConnectionResult, error) {
args := v.(LookupConnectionArgs)
r, err := LookupConnection(ctx, &args, opts...)
var s LookupConnectionResult
if r != nil {
s = *r
}
return s, err
}).(LookupConnectionResultOutput)
}
// A collection of arguments for invoking getConnection.
type LookupConnectionOutputArgs struct {
// Unique connection identifier.
ConnectionId pulumi.StringInput `pulumi:"connectionId"`
}
func (LookupConnectionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupConnectionArgs)(nil)).Elem()
}
// A collection of values returned by getConnection.
type LookupConnectionResultOutput struct{ *pulumi.OutputState }
func (LookupConnectionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupConnectionResult)(nil)).Elem()
}
func (o LookupConnectionResultOutput) ToLookupConnectionResultOutput() LookupConnectionResultOutput {
return o
}
func (o LookupConnectionResultOutput) ToLookupConnectionResultOutputWithContext(ctx context.Context) LookupConnectionResultOutput {
return o
}
// The OCID of personal access token saved in secret store.
func (o LookupConnectionResultOutput) AccessToken() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.AccessToken }).(pulumi.StringOutput)
}
// OCID of personal Bitbucket Cloud AppPassword saved in secret store
func (o LookupConnectionResultOutput) AppPassword() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.AppPassword }).(pulumi.StringOutput)
}
// The Base URL of the hosted BitbucketServer/Visual Builder Studio server.
func (o LookupConnectionResultOutput) BaseUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.BaseUrl }).(pulumi.StringOutput)
}
// The OCID of the compartment containing the connection.
func (o LookupConnectionResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
func (o LookupConnectionResultOutput) ConnectionId() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.ConnectionId }).(pulumi.StringOutput)
}
// The type of connection.
func (o LookupConnectionResultOutput) ConnectionType() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.ConnectionType }).(pulumi.StringOutput)
}
// Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"foo-namespace.bar-key": "value"}`
func (o LookupConnectionResultOutput) DefinedTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupConnectionResult) map[string]interface{} { return v.DefinedTags }).(pulumi.MapOutput)
}
// Optional description about the connection.
func (o LookupConnectionResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.Description }).(pulumi.StringOutput)
}
// Connection display name, which can be renamed and is not necessarily unique. Avoid entering confidential information.
func (o LookupConnectionResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}`
func (o LookupConnectionResultOutput) FreeformTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupConnectionResult) map[string]interface{} { return v.FreeformTags }).(pulumi.MapOutput)
}
// Unique identifier that is immutable on creation.
func (o LookupConnectionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.Id }).(pulumi.StringOutput)
}
// The result of validating the credentials of a connection.
func (o LookupConnectionResultOutput) LastConnectionValidationResults() GetConnectionLastConnectionValidationResultArrayOutput {
return o.ApplyT(func(v LookupConnectionResult) []GetConnectionLastConnectionValidationResult {
return v.LastConnectionValidationResults
}).(GetConnectionLastConnectionValidationResultArrayOutput)
}
// The OCID of the DevOps project.
func (o LookupConnectionResultOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.ProjectId }).(pulumi.StringOutput)
}
// The current state of the connection.
func (o LookupConnectionResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.State }).(pulumi.StringOutput)
}
// Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"orcl-cloud.free-tier-retained": "true"}`
func (o LookupConnectionResultOutput) SystemTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupConnectionResult) map[string]interface{} { return v.SystemTags }).(pulumi.MapOutput)
}
// The time the connection was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339).
func (o LookupConnectionResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The time the connection was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339).
func (o LookupConnectionResultOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.TimeUpdated }).(pulumi.StringOutput)
}
// TLS configuration used by build service to verify TLS connection.
func (o LookupConnectionResultOutput) TlsVerifyConfigs() GetConnectionTlsVerifyConfigArrayOutput {
return o.ApplyT(func(v LookupConnectionResult) []GetConnectionTlsVerifyConfig { return v.TlsVerifyConfigs }).(GetConnectionTlsVerifyConfigArrayOutput)
}
// Public Bitbucket Cloud Username in plain text
func (o LookupConnectionResultOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.Username }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupConnectionResultOutput{})
}