generated from pulumi/pulumi-tf-provider-boilerplate
/
getGuardTarget.go
234 lines (201 loc) · 10.2 KB
/
getGuardTarget.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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// 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 cloudguard
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 Target resource in Oracle Cloud Infrastructure Cloud Guard service.
//
// # Returns a Target identified by targetId
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/CloudGuard"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := CloudGuard.GetGuardTarget(ctx, &cloudguard.GetGuardTargetArgs{
// TargetId: testTargetOciCloudGuardTarget.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetGuardTarget(ctx *pulumi.Context, args *GetGuardTargetArgs, opts ...pulumi.InvokeOption) (*GetGuardTargetResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetGuardTargetResult
err := ctx.Invoke("oci:CloudGuard/getGuardTarget:getGuardTarget", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getGuardTarget.
type GetGuardTargetArgs struct {
// OCID of target
TargetId string `pulumi:"targetId"`
}
// A collection of values returned by getGuardTarget.
type GetGuardTargetResult struct {
// 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"`
// ResponderRule description.
Description string `pulumi:"description"`
// ResponderRule display name.
DisplayName string `pulumi:"displayName"`
// 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"`
// Unique identifier of TargetResponderRecipe that can't be changed after creation.
Id string `pulumi:"id"`
// List of inherited compartments
InheritedByCompartments []string `pulumi:"inheritedByCompartments"`
// A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
LifecyleDetails string `pulumi:"lifecyleDetails"`
// Total number of recipes attached to target
RecipeCount int `pulumi:"recipeCount"`
// The current state of the ResponderRule.
State string `pulumi:"state"`
// System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). System tags can be viewed by users, but can only be created by the system. Example: `{"orcl-cloud.free-tier-retained": "true"}`
SystemTags map[string]interface{} `pulumi:"systemTags"`
// Details specific to the target type.
TargetDetails []GetGuardTargetTargetDetail `pulumi:"targetDetails"`
// List of detector recipes associated with target
TargetDetectorRecipes []GetGuardTargetTargetDetectorRecipe `pulumi:"targetDetectorRecipes"`
TargetId string `pulumi:"targetId"`
// Resource ID which the target uses to monitor
TargetResourceId string `pulumi:"targetResourceId"`
// possible type of targets
TargetResourceType string `pulumi:"targetResourceType"`
// List of responder recipes associated with target
TargetResponderRecipes []GetGuardTargetTargetResponderRecipe `pulumi:"targetResponderRecipes"`
// The date and time the target was created. Format defined by RFC3339.
TimeCreated string `pulumi:"timeCreated"`
// The date and time the target was updated. Format defined by RFC3339.
TimeUpdated string `pulumi:"timeUpdated"`
}
func GetGuardTargetOutput(ctx *pulumi.Context, args GetGuardTargetOutputArgs, opts ...pulumi.InvokeOption) GetGuardTargetResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetGuardTargetResult, error) {
args := v.(GetGuardTargetArgs)
r, err := GetGuardTarget(ctx, &args, opts...)
var s GetGuardTargetResult
if r != nil {
s = *r
}
return s, err
}).(GetGuardTargetResultOutput)
}
// A collection of arguments for invoking getGuardTarget.
type GetGuardTargetOutputArgs struct {
// OCID of target
TargetId pulumi.StringInput `pulumi:"targetId"`
}
func (GetGuardTargetOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetGuardTargetArgs)(nil)).Elem()
}
// A collection of values returned by getGuardTarget.
type GetGuardTargetResultOutput struct{ *pulumi.OutputState }
func (GetGuardTargetResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetGuardTargetResult)(nil)).Elem()
}
func (o GetGuardTargetResultOutput) ToGetGuardTargetResultOutput() GetGuardTargetResultOutput {
return o
}
func (o GetGuardTargetResultOutput) ToGetGuardTargetResultOutputWithContext(ctx context.Context) GetGuardTargetResultOutput {
return o
}
// Compartment Identifier
func (o GetGuardTargetResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) 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 GetGuardTargetResultOutput) DefinedTags() pulumi.MapOutput {
return o.ApplyT(func(v GetGuardTargetResult) map[string]interface{} { return v.DefinedTags }).(pulumi.MapOutput)
}
// ResponderRule description.
func (o GetGuardTargetResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.Description }).(pulumi.StringOutput)
}
// ResponderRule display name.
func (o GetGuardTargetResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// 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 GetGuardTargetResultOutput) FreeformTags() pulumi.MapOutput {
return o.ApplyT(func(v GetGuardTargetResult) map[string]interface{} { return v.FreeformTags }).(pulumi.MapOutput)
}
// Unique identifier of TargetResponderRecipe that can't be changed after creation.
func (o GetGuardTargetResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.Id }).(pulumi.StringOutput)
}
// List of inherited compartments
func (o GetGuardTargetResultOutput) InheritedByCompartments() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetGuardTargetResult) []string { return v.InheritedByCompartments }).(pulumi.StringArrayOutput)
}
// A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
func (o GetGuardTargetResultOutput) LifecyleDetails() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.LifecyleDetails }).(pulumi.StringOutput)
}
// Total number of recipes attached to target
func (o GetGuardTargetResultOutput) RecipeCount() pulumi.IntOutput {
return o.ApplyT(func(v GetGuardTargetResult) int { return v.RecipeCount }).(pulumi.IntOutput)
}
// The current state of the ResponderRule.
func (o GetGuardTargetResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.State }).(pulumi.StringOutput)
}
// System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). System tags can be viewed by users, but can only be created by the system. Example: `{"orcl-cloud.free-tier-retained": "true"}`
func (o GetGuardTargetResultOutput) SystemTags() pulumi.MapOutput {
return o.ApplyT(func(v GetGuardTargetResult) map[string]interface{} { return v.SystemTags }).(pulumi.MapOutput)
}
// Details specific to the target type.
func (o GetGuardTargetResultOutput) TargetDetails() GetGuardTargetTargetDetailArrayOutput {
return o.ApplyT(func(v GetGuardTargetResult) []GetGuardTargetTargetDetail { return v.TargetDetails }).(GetGuardTargetTargetDetailArrayOutput)
}
// List of detector recipes associated with target
func (o GetGuardTargetResultOutput) TargetDetectorRecipes() GetGuardTargetTargetDetectorRecipeArrayOutput {
return o.ApplyT(func(v GetGuardTargetResult) []GetGuardTargetTargetDetectorRecipe { return v.TargetDetectorRecipes }).(GetGuardTargetTargetDetectorRecipeArrayOutput)
}
func (o GetGuardTargetResultOutput) TargetId() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.TargetId }).(pulumi.StringOutput)
}
// Resource ID which the target uses to monitor
func (o GetGuardTargetResultOutput) TargetResourceId() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.TargetResourceId }).(pulumi.StringOutput)
}
// possible type of targets
func (o GetGuardTargetResultOutput) TargetResourceType() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.TargetResourceType }).(pulumi.StringOutput)
}
// List of responder recipes associated with target
func (o GetGuardTargetResultOutput) TargetResponderRecipes() GetGuardTargetTargetResponderRecipeArrayOutput {
return o.ApplyT(func(v GetGuardTargetResult) []GetGuardTargetTargetResponderRecipe { return v.TargetResponderRecipes }).(GetGuardTargetTargetResponderRecipeArrayOutput)
}
// The date and time the target was created. Format defined by RFC3339.
func (o GetGuardTargetResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The date and time the target was updated. Format defined by RFC3339.
func (o GetGuardTargetResultOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v GetGuardTargetResult) string { return v.TimeUpdated }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetGuardTargetResultOutput{})
}