generated from pulumi/pulumi-tf-provider-boilerplate
/
getMonitoredResourceTask.go
192 lines (165 loc) · 9.6 KB
/
getMonitoredResourceTask.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
// 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 stackmonitoring
import (
"context"
"reflect"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This data source provides details about a specific Monitored Resource Task resource in Oracle Cloud Infrastructure Stack Monitoring service.
//
// Gets stack monitoring resource task details by identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/StackMonitoring"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := StackMonitoring.GetMonitoredResourceTask(ctx, &stackmonitoring.GetMonitoredResourceTaskArgs{
// MonitoredResourceTaskId: testMonitoredResourceTaskOciStackMonitoringMonitoredResourceTask.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupMonitoredResourceTask(ctx *pulumi.Context, args *LookupMonitoredResourceTaskArgs, opts ...pulumi.InvokeOption) (*LookupMonitoredResourceTaskResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupMonitoredResourceTaskResult
err := ctx.Invoke("oci:StackMonitoring/getMonitoredResourceTask:getMonitoredResourceTask", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getMonitoredResourceTask.
type LookupMonitoredResourceTaskArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of stack monitoring resource task.
MonitoredResourceTaskId string `pulumi:"monitoredResourceTaskId"`
}
// A collection of values returned by getMonitoredResourceTask.
type LookupMonitoredResourceTaskResult struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment identifier.
CompartmentId string `pulumi:"compartmentId"`
// Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
DefinedTags map[string]interface{} `pulumi:"definedTags"`
// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
FreeformTags map[string]interface{} `pulumi:"freeformTags"`
// Task identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
Id string `pulumi:"id"`
MonitoredResourceTaskId string `pulumi:"monitoredResourceTaskId"`
// Name of the task.
Name string `pulumi:"name"`
// The current state of the stack monitoring resource task.
State string `pulumi:"state"`
// Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`
SystemTags map[string]interface{} `pulumi:"systemTags"`
// The request details for the performing the task.
TaskDetails []GetMonitoredResourceTaskTaskDetail `pulumi:"taskDetails"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy.
TenantId string `pulumi:"tenantId"`
// The date and time when the stack monitoring resource task was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.
TimeCreated string `pulumi:"timeCreated"`
// The date and time when the stack monitoring resource task was last updated, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.
TimeUpdated string `pulumi:"timeUpdated"`
// Identifiers [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for work requests submitted for this task.
WorkRequestIds []string `pulumi:"workRequestIds"`
}
func LookupMonitoredResourceTaskOutput(ctx *pulumi.Context, args LookupMonitoredResourceTaskOutputArgs, opts ...pulumi.InvokeOption) LookupMonitoredResourceTaskResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupMonitoredResourceTaskResult, error) {
args := v.(LookupMonitoredResourceTaskArgs)
r, err := LookupMonitoredResourceTask(ctx, &args, opts...)
var s LookupMonitoredResourceTaskResult
if r != nil {
s = *r
}
return s, err
}).(LookupMonitoredResourceTaskResultOutput)
}
// A collection of arguments for invoking getMonitoredResourceTask.
type LookupMonitoredResourceTaskOutputArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of stack monitoring resource task.
MonitoredResourceTaskId pulumi.StringInput `pulumi:"monitoredResourceTaskId"`
}
func (LookupMonitoredResourceTaskOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMonitoredResourceTaskArgs)(nil)).Elem()
}
// A collection of values returned by getMonitoredResourceTask.
type LookupMonitoredResourceTaskResultOutput struct{ *pulumi.OutputState }
func (LookupMonitoredResourceTaskResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMonitoredResourceTaskResult)(nil)).Elem()
}
func (o LookupMonitoredResourceTaskResultOutput) ToLookupMonitoredResourceTaskResultOutput() LookupMonitoredResourceTaskResultOutput {
return o
}
func (o LookupMonitoredResourceTaskResultOutput) ToLookupMonitoredResourceTaskResultOutputWithContext(ctx context.Context) LookupMonitoredResourceTaskResultOutput {
return o
}
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment identifier.
func (o LookupMonitoredResourceTaskResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
// Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
func (o LookupMonitoredResourceTaskResultOutput) DefinedTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) map[string]interface{} { return v.DefinedTags }).(pulumi.MapOutput)
}
// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
func (o LookupMonitoredResourceTaskResultOutput) FreeformTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) map[string]interface{} { return v.FreeformTags }).(pulumi.MapOutput)
}
// Task identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
func (o LookupMonitoredResourceTaskResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupMonitoredResourceTaskResultOutput) MonitoredResourceTaskId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) string { return v.MonitoredResourceTaskId }).(pulumi.StringOutput)
}
// Name of the task.
func (o LookupMonitoredResourceTaskResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) string { return v.Name }).(pulumi.StringOutput)
}
// The current state of the stack monitoring resource task.
func (o LookupMonitoredResourceTaskResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) string { return v.State }).(pulumi.StringOutput)
}
// Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`
func (o LookupMonitoredResourceTaskResultOutput) SystemTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) map[string]interface{} { return v.SystemTags }).(pulumi.MapOutput)
}
// The request details for the performing the task.
func (o LookupMonitoredResourceTaskResultOutput) TaskDetails() GetMonitoredResourceTaskTaskDetailArrayOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) []GetMonitoredResourceTaskTaskDetail { return v.TaskDetails }).(GetMonitoredResourceTaskTaskDetailArrayOutput)
}
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy.
func (o LookupMonitoredResourceTaskResultOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) string { return v.TenantId }).(pulumi.StringOutput)
}
// The date and time when the stack monitoring resource task was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.
func (o LookupMonitoredResourceTaskResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The date and time when the stack monitoring resource task was last updated, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.
func (o LookupMonitoredResourceTaskResultOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) string { return v.TimeUpdated }).(pulumi.StringOutput)
}
// Identifiers [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for work requests submitted for this task.
func (o LookupMonitoredResourceTaskResultOutput) WorkRequestIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupMonitoredResourceTaskResult) []string { return v.WorkRequestIds }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupMonitoredResourceTaskResultOutput{})
}