forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getConnection.go
129 lines (108 loc) · 5.06 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
// 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 azuredatatransfer
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets connection resource.
// Azure REST API version: 2023-10-11-preview.
//
// Other available API versions: 2024-01-25.
func LookupConnection(ctx *pulumi.Context, args *LookupConnectionArgs, opts ...pulumi.InvokeOption) (*LookupConnectionResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupConnectionResult
err := ctx.Invoke("azure-native:azuredatatransfer:getConnection", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupConnectionArgs struct {
// The name for the connection that is to be requested.
ConnectionName string `pulumi:"connectionName"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The connection resource definition.
type LookupConnectionResult struct {
// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
Id string `pulumi:"id"`
// The geo-location where the resource lives
Location string `pulumi:"location"`
// The name of the resource
Name string `pulumi:"name"`
// Properties of connection
Properties ConnectionPropertiesResponse `pulumi:"properties"`
// Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData SystemDataResponse `pulumi:"systemData"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type string `pulumi:"type"`
}
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)
}
type LookupConnectionOutputArgs struct {
// The name for the connection that is to be requested.
ConnectionName pulumi.StringInput `pulumi:"connectionName"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupConnectionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupConnectionArgs)(nil)).Elem()
}
// The connection resource definition.
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
}
// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
func (o LookupConnectionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.Id }).(pulumi.StringOutput)
}
// The geo-location where the resource lives
func (o LookupConnectionResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.Location }).(pulumi.StringOutput)
}
// The name of the resource
func (o LookupConnectionResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.Name }).(pulumi.StringOutput)
}
// Properties of connection
func (o LookupConnectionResultOutput) Properties() ConnectionPropertiesResponseOutput {
return o.ApplyT(func(v LookupConnectionResult) ConnectionPropertiesResponse { return v.Properties }).(ConnectionPropertiesResponseOutput)
}
// Azure Resource Manager metadata containing createdBy and modifiedBy information.
func (o LookupConnectionResultOutput) SystemData() SystemDataResponseOutput {
return o.ApplyT(func(v LookupConnectionResult) SystemDataResponse { return v.SystemData }).(SystemDataResponseOutput)
}
// Resource tags.
func (o LookupConnectionResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupConnectionResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
func (o LookupConnectionResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupConnectionResultOutput{})
}