/
getAuthpath.go
112 lines (93 loc) · 4.08 KB
/
getAuthpath.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
// 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 router
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/internal"
)
// Use this data source to get information on an fortios router authpath
func LookupAuthpath(ctx *pulumi.Context, args *LookupAuthpathArgs, opts ...pulumi.InvokeOption) (*LookupAuthpathResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAuthpathResult
err := ctx.Invoke("fortios:router/getAuthpath:getAuthpath", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAuthpath.
type LookupAuthpathArgs struct {
// Specify the name of the desired router authpath.
Name string `pulumi:"name"`
// Specifies the vdom to which the data source will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam *string `pulumi:"vdomparam"`
}
// A collection of values returned by getAuthpath.
type LookupAuthpathResult struct {
// Outgoing interface.
Device string `pulumi:"device"`
// Gateway IP address.
Gateway string `pulumi:"gateway"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Name of the entry.
Name string `pulumi:"name"`
Vdomparam *string `pulumi:"vdomparam"`
}
func LookupAuthpathOutput(ctx *pulumi.Context, args LookupAuthpathOutputArgs, opts ...pulumi.InvokeOption) LookupAuthpathResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupAuthpathResult, error) {
args := v.(LookupAuthpathArgs)
r, err := LookupAuthpath(ctx, &args, opts...)
var s LookupAuthpathResult
if r != nil {
s = *r
}
return s, err
}).(LookupAuthpathResultOutput)
}
// A collection of arguments for invoking getAuthpath.
type LookupAuthpathOutputArgs struct {
// Specify the name of the desired router authpath.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the vdom to which the data source will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrInput `pulumi:"vdomparam"`
}
func (LookupAuthpathOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAuthpathArgs)(nil)).Elem()
}
// A collection of values returned by getAuthpath.
type LookupAuthpathResultOutput struct{ *pulumi.OutputState }
func (LookupAuthpathResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAuthpathResult)(nil)).Elem()
}
func (o LookupAuthpathResultOutput) ToLookupAuthpathResultOutput() LookupAuthpathResultOutput {
return o
}
func (o LookupAuthpathResultOutput) ToLookupAuthpathResultOutputWithContext(ctx context.Context) LookupAuthpathResultOutput {
return o
}
// Outgoing interface.
func (o LookupAuthpathResultOutput) Device() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthpathResult) string { return v.Device }).(pulumi.StringOutput)
}
// Gateway IP address.
func (o LookupAuthpathResultOutput) Gateway() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthpathResult) string { return v.Gateway }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAuthpathResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthpathResult) string { return v.Id }).(pulumi.StringOutput)
}
// Name of the entry.
func (o LookupAuthpathResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthpathResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupAuthpathResultOutput) Vdomparam() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupAuthpathResult) *string { return v.Vdomparam }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAuthpathResultOutput{})
}