generated from pulumi/pulumi-tf-provider-boilerplate
/
getPairs.go
110 lines (90 loc) · 3.76 KB
/
getPairs.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
// 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 key
import (
"context"
"reflect"
"github.com/mergtil/pulumi-tencentcloud/sdk/go/tencentcloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func GetPairs(ctx *pulumi.Context, args *GetPairsArgs, opts ...pulumi.InvokeOption) (*GetPairsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetPairsResult
err := ctx.Invoke("tencentcloud:Key/getPairs:getPairs", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPairs.
type GetPairsArgs struct {
KeyId *string `pulumi:"keyId"`
KeyName *string `pulumi:"keyName"`
ProjectId *int `pulumi:"projectId"`
ResultOutputFile *string `pulumi:"resultOutputFile"`
}
// A collection of values returned by getPairs.
type GetPairsResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
KeyId *string `pulumi:"keyId"`
KeyName *string `pulumi:"keyName"`
KeyPairLists []GetPairsKeyPairList `pulumi:"keyPairLists"`
ProjectId *int `pulumi:"projectId"`
ResultOutputFile *string `pulumi:"resultOutputFile"`
}
func GetPairsOutput(ctx *pulumi.Context, args GetPairsOutputArgs, opts ...pulumi.InvokeOption) GetPairsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetPairsResult, error) {
args := v.(GetPairsArgs)
r, err := GetPairs(ctx, &args, opts...)
var s GetPairsResult
if r != nil {
s = *r
}
return s, err
}).(GetPairsResultOutput)
}
// A collection of arguments for invoking getPairs.
type GetPairsOutputArgs struct {
KeyId pulumi.StringPtrInput `pulumi:"keyId"`
KeyName pulumi.StringPtrInput `pulumi:"keyName"`
ProjectId pulumi.IntPtrInput `pulumi:"projectId"`
ResultOutputFile pulumi.StringPtrInput `pulumi:"resultOutputFile"`
}
func (GetPairsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetPairsArgs)(nil)).Elem()
}
// A collection of values returned by getPairs.
type GetPairsResultOutput struct{ *pulumi.OutputState }
func (GetPairsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetPairsResult)(nil)).Elem()
}
func (o GetPairsResultOutput) ToGetPairsResultOutput() GetPairsResultOutput {
return o
}
func (o GetPairsResultOutput) ToGetPairsResultOutputWithContext(ctx context.Context) GetPairsResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o GetPairsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetPairsResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetPairsResultOutput) KeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetPairsResult) *string { return v.KeyId }).(pulumi.StringPtrOutput)
}
func (o GetPairsResultOutput) KeyName() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetPairsResult) *string { return v.KeyName }).(pulumi.StringPtrOutput)
}
func (o GetPairsResultOutput) KeyPairLists() GetPairsKeyPairListArrayOutput {
return o.ApplyT(func(v GetPairsResult) []GetPairsKeyPairList { return v.KeyPairLists }).(GetPairsKeyPairListArrayOutput)
}
func (o GetPairsResultOutput) ProjectId() pulumi.IntPtrOutput {
return o.ApplyT(func(v GetPairsResult) *int { return v.ProjectId }).(pulumi.IntPtrOutput)
}
func (o GetPairsResultOutput) ResultOutputFile() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetPairsResult) *string { return v.ResultOutputFile }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetPairsResultOutput{})
}