forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getDra.go
115 lines (96 loc) · 3.7 KB
/
getDra.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
// 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 datareplication
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets the details of the fabric agent.
// Azure REST API version: 2021-02-16-preview.
func LookupDra(ctx *pulumi.Context, args *LookupDraArgs, opts ...pulumi.InvokeOption) (*LookupDraResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupDraResult
err := ctx.Invoke("azure-native:datareplication:getDra", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupDraArgs struct {
// The fabric agent (Dra) name.
FabricAgentName string `pulumi:"fabricAgentName"`
// The fabric name.
FabricName string `pulumi:"fabricName"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// Dra model.
type LookupDraResult struct {
// Gets or sets the Id of the resource.
Id string `pulumi:"id"`
// Gets or sets the name of the resource.
Name string `pulumi:"name"`
// Dra model properties.
Properties DraModelPropertiesResponse `pulumi:"properties"`
SystemData DraModelResponseSystemData `pulumi:"systemData"`
// Gets or sets the type of the resource.
Type string `pulumi:"type"`
}
func LookupDraOutput(ctx *pulumi.Context, args LookupDraOutputArgs, opts ...pulumi.InvokeOption) LookupDraResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupDraResult, error) {
args := v.(LookupDraArgs)
r, err := LookupDra(ctx, &args, opts...)
var s LookupDraResult
if r != nil {
s = *r
}
return s, err
}).(LookupDraResultOutput)
}
type LookupDraOutputArgs struct {
// The fabric agent (Dra) name.
FabricAgentName pulumi.StringInput `pulumi:"fabricAgentName"`
// The fabric name.
FabricName pulumi.StringInput `pulumi:"fabricName"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupDraOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDraArgs)(nil)).Elem()
}
// Dra model.
type LookupDraResultOutput struct{ *pulumi.OutputState }
func (LookupDraResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDraResult)(nil)).Elem()
}
func (o LookupDraResultOutput) ToLookupDraResultOutput() LookupDraResultOutput {
return o
}
func (o LookupDraResultOutput) ToLookupDraResultOutputWithContext(ctx context.Context) LookupDraResultOutput {
return o
}
// Gets or sets the Id of the resource.
func (o LookupDraResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDraResult) string { return v.Id }).(pulumi.StringOutput)
}
// Gets or sets the name of the resource.
func (o LookupDraResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDraResult) string { return v.Name }).(pulumi.StringOutput)
}
// Dra model properties.
func (o LookupDraResultOutput) Properties() DraModelPropertiesResponseOutput {
return o.ApplyT(func(v LookupDraResult) DraModelPropertiesResponse { return v.Properties }).(DraModelPropertiesResponseOutput)
}
func (o LookupDraResultOutput) SystemData() DraModelResponseSystemDataOutput {
return o.ApplyT(func(v LookupDraResult) DraModelResponseSystemData { return v.SystemData }).(DraModelResponseSystemDataOutput)
}
// Gets or sets the type of the resource.
func (o LookupDraResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupDraResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDraResultOutput{})
}