generated from pulumi/pulumi-tf-provider-boilerplate
/
getCustomTables.go
143 lines (124 loc) · 5 KB
/
getCustomTables.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
// 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 meteringcomputation
import (
"context"
"reflect"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This data source provides the list of Custom Tables in Oracle Cloud Infrastructure Metering Computation service.
//
// Returns the saved custom table list.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/MeteringComputation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := MeteringComputation.GetCustomTables(ctx, &meteringcomputation.GetCustomTablesArgs{
// CompartmentId: compartmentId,
// SavedReportId: testSavedReport.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetCustomTables(ctx *pulumi.Context, args *GetCustomTablesArgs, opts ...pulumi.InvokeOption) (*GetCustomTablesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetCustomTablesResult
err := ctx.Invoke("oci:MeteringComputation/getCustomTables:getCustomTables", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCustomTables.
type GetCustomTablesArgs struct {
// The compartment ID in which to list resources.
CompartmentId string `pulumi:"compartmentId"`
Filters []GetCustomTablesFilter `pulumi:"filters"`
// The saved report ID in which to list resources.
SavedReportId string `pulumi:"savedReportId"`
}
// A collection of values returned by getCustomTables.
type GetCustomTablesResult struct {
// The custom table compartment OCID.
CompartmentId string `pulumi:"compartmentId"`
// The list of custom_table_collection.
CustomTableCollections []GetCustomTablesCustomTableCollection `pulumi:"customTableCollections"`
Filters []GetCustomTablesFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The custom table associated saved report OCID.
SavedReportId string `pulumi:"savedReportId"`
}
func GetCustomTablesOutput(ctx *pulumi.Context, args GetCustomTablesOutputArgs, opts ...pulumi.InvokeOption) GetCustomTablesResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetCustomTablesResult, error) {
args := v.(GetCustomTablesArgs)
r, err := GetCustomTables(ctx, &args, opts...)
var s GetCustomTablesResult
if r != nil {
s = *r
}
return s, err
}).(GetCustomTablesResultOutput)
}
// A collection of arguments for invoking getCustomTables.
type GetCustomTablesOutputArgs struct {
// The compartment ID in which to list resources.
CompartmentId pulumi.StringInput `pulumi:"compartmentId"`
Filters GetCustomTablesFilterArrayInput `pulumi:"filters"`
// The saved report ID in which to list resources.
SavedReportId pulumi.StringInput `pulumi:"savedReportId"`
}
func (GetCustomTablesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetCustomTablesArgs)(nil)).Elem()
}
// A collection of values returned by getCustomTables.
type GetCustomTablesResultOutput struct{ *pulumi.OutputState }
func (GetCustomTablesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetCustomTablesResult)(nil)).Elem()
}
func (o GetCustomTablesResultOutput) ToGetCustomTablesResultOutput() GetCustomTablesResultOutput {
return o
}
func (o GetCustomTablesResultOutput) ToGetCustomTablesResultOutputWithContext(ctx context.Context) GetCustomTablesResultOutput {
return o
}
// The custom table compartment OCID.
func (o GetCustomTablesResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetCustomTablesResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
// The list of custom_table_collection.
func (o GetCustomTablesResultOutput) CustomTableCollections() GetCustomTablesCustomTableCollectionArrayOutput {
return o.ApplyT(func(v GetCustomTablesResult) []GetCustomTablesCustomTableCollection { return v.CustomTableCollections }).(GetCustomTablesCustomTableCollectionArrayOutput)
}
func (o GetCustomTablesResultOutput) Filters() GetCustomTablesFilterArrayOutput {
return o.ApplyT(func(v GetCustomTablesResult) []GetCustomTablesFilter { return v.Filters }).(GetCustomTablesFilterArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetCustomTablesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetCustomTablesResult) string { return v.Id }).(pulumi.StringOutput)
}
// The custom table associated saved report OCID.
func (o GetCustomTablesResultOutput) SavedReportId() pulumi.StringOutput {
return o.ApplyT(func(v GetCustomTablesResult) string { return v.SavedReportId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetCustomTablesResultOutput{})
}