generated from pulumi/pulumi-tf-provider-boilerplate
/
getExadataInsights.go
197 lines (174 loc) · 8.5 KB
/
getExadataInsights.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// 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 opsi
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 Exadata Insights in Oracle Cloud Infrastructure Opsi service.
//
// Gets a list of Exadata insights based on the query parameters specified. Either compartmentId or id query parameter must be specified.
// When both compartmentId and compartmentIdInSubtree are specified, a list of Exadata insights in that compartment and in all sub-compartments will be returned.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/Opsi"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := Opsi.GetExadataInsights(ctx, &opsi.GetExadataInsightsArgs{
// CompartmentId: pulumi.StringRef(compartmentId),
// CompartmentIdInSubtree: pulumi.BoolRef(exadataInsightCompartmentIdInSubtree),
// EnterpriseManagerBridgeId: pulumi.StringRef(testEnterpriseManagerBridge.Id),
// ExadataTypes: exadataInsightExadataType,
// Id: pulumi.StringRef(exadataInsightId),
// States: exadataInsightState,
// Statuses: exadataInsightStatus,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetExadataInsights(ctx *pulumi.Context, args *GetExadataInsightsArgs, opts ...pulumi.InvokeOption) (*GetExadataInsightsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetExadataInsightsResult
err := ctx.Invoke("oci:Opsi/getExadataInsights:getExadataInsights", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getExadataInsights.
type GetExadataInsightsArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
CompartmentId *string `pulumi:"compartmentId"`
// A flag to search all resources within a given compartment and all sub-compartments.
CompartmentIdInSubtree *bool `pulumi:"compartmentIdInSubtree"`
// Unique Enterprise Manager bridge identifier
EnterpriseManagerBridgeId *string `pulumi:"enterpriseManagerBridgeId"`
// Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.
ExadataTypes []string `pulumi:"exadataTypes"`
Filters []GetExadataInsightsFilter `pulumi:"filters"`
// Optional list of Exadata insight resource [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
Id *string `pulumi:"id"`
// Lifecycle states
States []string `pulumi:"states"`
// Resource Status
Statuses []string `pulumi:"statuses"`
}
// A collection of values returned by getExadataInsights.
type GetExadataInsightsResult struct {
// Compartment identifier of the Exadata insight resource
CompartmentId *string `pulumi:"compartmentId"`
CompartmentIdInSubtree *bool `pulumi:"compartmentIdInSubtree"`
// OPSI Enterprise Manager Bridge OCID
EnterpriseManagerBridgeId *string `pulumi:"enterpriseManagerBridgeId"`
// The list of exadata_insight_summary_collection.
ExadataInsightSummaryCollections []GetExadataInsightsExadataInsightSummaryCollection `pulumi:"exadataInsightSummaryCollections"`
// Operations Insights internal representation of the the Exadata system type.
ExadataTypes []string `pulumi:"exadataTypes"`
Filters []GetExadataInsightsFilter `pulumi:"filters"`
// Exadata insight identifier
Id *string `pulumi:"id"`
// The current state of the Exadata insight.
States []string `pulumi:"states"`
// Indicates the status of an Exadata insight in Operations Insights
Statuses []string `pulumi:"statuses"`
}
func GetExadataInsightsOutput(ctx *pulumi.Context, args GetExadataInsightsOutputArgs, opts ...pulumi.InvokeOption) GetExadataInsightsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetExadataInsightsResult, error) {
args := v.(GetExadataInsightsArgs)
r, err := GetExadataInsights(ctx, &args, opts...)
var s GetExadataInsightsResult
if r != nil {
s = *r
}
return s, err
}).(GetExadataInsightsResultOutput)
}
// A collection of arguments for invoking getExadataInsights.
type GetExadataInsightsOutputArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
CompartmentId pulumi.StringPtrInput `pulumi:"compartmentId"`
// A flag to search all resources within a given compartment and all sub-compartments.
CompartmentIdInSubtree pulumi.BoolPtrInput `pulumi:"compartmentIdInSubtree"`
// Unique Enterprise Manager bridge identifier
EnterpriseManagerBridgeId pulumi.StringPtrInput `pulumi:"enterpriseManagerBridgeId"`
// Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.
ExadataTypes pulumi.StringArrayInput `pulumi:"exadataTypes"`
Filters GetExadataInsightsFilterArrayInput `pulumi:"filters"`
// Optional list of Exadata insight resource [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
Id pulumi.StringPtrInput `pulumi:"id"`
// Lifecycle states
States pulumi.StringArrayInput `pulumi:"states"`
// Resource Status
Statuses pulumi.StringArrayInput `pulumi:"statuses"`
}
func (GetExadataInsightsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetExadataInsightsArgs)(nil)).Elem()
}
// A collection of values returned by getExadataInsights.
type GetExadataInsightsResultOutput struct{ *pulumi.OutputState }
func (GetExadataInsightsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetExadataInsightsResult)(nil)).Elem()
}
func (o GetExadataInsightsResultOutput) ToGetExadataInsightsResultOutput() GetExadataInsightsResultOutput {
return o
}
func (o GetExadataInsightsResultOutput) ToGetExadataInsightsResultOutputWithContext(ctx context.Context) GetExadataInsightsResultOutput {
return o
}
// Compartment identifier of the Exadata insight resource
func (o GetExadataInsightsResultOutput) CompartmentId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetExadataInsightsResult) *string { return v.CompartmentId }).(pulumi.StringPtrOutput)
}
func (o GetExadataInsightsResultOutput) CompartmentIdInSubtree() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetExadataInsightsResult) *bool { return v.CompartmentIdInSubtree }).(pulumi.BoolPtrOutput)
}
// OPSI Enterprise Manager Bridge OCID
func (o GetExadataInsightsResultOutput) EnterpriseManagerBridgeId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetExadataInsightsResult) *string { return v.EnterpriseManagerBridgeId }).(pulumi.StringPtrOutput)
}
// The list of exadata_insight_summary_collection.
func (o GetExadataInsightsResultOutput) ExadataInsightSummaryCollections() GetExadataInsightsExadataInsightSummaryCollectionArrayOutput {
return o.ApplyT(func(v GetExadataInsightsResult) []GetExadataInsightsExadataInsightSummaryCollection {
return v.ExadataInsightSummaryCollections
}).(GetExadataInsightsExadataInsightSummaryCollectionArrayOutput)
}
// Operations Insights internal representation of the the Exadata system type.
func (o GetExadataInsightsResultOutput) ExadataTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetExadataInsightsResult) []string { return v.ExadataTypes }).(pulumi.StringArrayOutput)
}
func (o GetExadataInsightsResultOutput) Filters() GetExadataInsightsFilterArrayOutput {
return o.ApplyT(func(v GetExadataInsightsResult) []GetExadataInsightsFilter { return v.Filters }).(GetExadataInsightsFilterArrayOutput)
}
// Exadata insight identifier
func (o GetExadataInsightsResultOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetExadataInsightsResult) *string { return v.Id }).(pulumi.StringPtrOutput)
}
// The current state of the Exadata insight.
func (o GetExadataInsightsResultOutput) States() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetExadataInsightsResult) []string { return v.States }).(pulumi.StringArrayOutput)
}
// Indicates the status of an Exadata insight in Operations Insights
func (o GetExadataInsightsResultOutput) Statuses() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetExadataInsightsResult) []string { return v.Statuses }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(GetExadataInsightsResultOutput{})
}