generated from pulumi/pulumi-tf-provider-boilerplate
/
getAgentPlugin.go
195 lines (168 loc) · 8.77 KB
/
getAgentPlugin.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
// 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 cloudbridge
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 Agent Plugin resource in Oracle Cloud Infrastructure Cloud Bridge service.
//
// Gets a plugin by identifier.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/CloudBridge"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := CloudBridge.GetAgentPlugin(ctx, &cloudbridge.GetAgentPluginArgs{
// AgentId: testAgent.Id,
// PluginName: agentPluginPluginName,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupAgentPlugin(ctx *pulumi.Context, args *LookupAgentPluginArgs, opts ...pulumi.InvokeOption) (*LookupAgentPluginResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAgentPluginResult
err := ctx.Invoke("oci:CloudBridge/getAgentPlugin:getAgentPlugin", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAgentPlugin.
type LookupAgentPluginArgs struct {
// Unique Agent identifier path parameter.
AgentId string `pulumi:"agentId"`
// Unique plugin identifier path parameter.
PluginName string `pulumi:"pluginName"`
}
// A collection of values returned by getAgentPlugin.
type LookupAgentPluginResult struct {
// Agent identifier.
AgentId string `pulumi:"agentId"`
// The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
DefinedTags map[string]interface{} `pulumi:"definedTags"`
// State to which the customer wants the plugin to move to.
DesiredState string `pulumi:"desiredState"`
// The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
FreeformTags map[string]interface{} `pulumi:"freeformTags"`
Id string `pulumi:"id"`
// A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
LifecycleDetails string `pulumi:"lifecycleDetails"`
// Plugin identifier, which can be renamed.
Name string `pulumi:"name"`
PluginName string `pulumi:"pluginName"`
// Plugin version.
PluginVersion string `pulumi:"pluginVersion"`
// The current state of the plugin.
State string `pulumi:"state"`
// The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{orcl-cloud: {free-tier-retain: true}}`
SystemTags map[string]interface{} `pulumi:"systemTags"`
// The time when the Agent was created. An RFC3339 formatted datetime string.
TimeCreated string `pulumi:"timeCreated"`
// The time when the Agent was updated. An RFC3339 formatted datetime string.
TimeUpdated string `pulumi:"timeUpdated"`
}
func LookupAgentPluginOutput(ctx *pulumi.Context, args LookupAgentPluginOutputArgs, opts ...pulumi.InvokeOption) LookupAgentPluginResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupAgentPluginResult, error) {
args := v.(LookupAgentPluginArgs)
r, err := LookupAgentPlugin(ctx, &args, opts...)
var s LookupAgentPluginResult
if r != nil {
s = *r
}
return s, err
}).(LookupAgentPluginResultOutput)
}
// A collection of arguments for invoking getAgentPlugin.
type LookupAgentPluginOutputArgs struct {
// Unique Agent identifier path parameter.
AgentId pulumi.StringInput `pulumi:"agentId"`
// Unique plugin identifier path parameter.
PluginName pulumi.StringInput `pulumi:"pluginName"`
}
func (LookupAgentPluginOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAgentPluginArgs)(nil)).Elem()
}
// A collection of values returned by getAgentPlugin.
type LookupAgentPluginResultOutput struct{ *pulumi.OutputState }
func (LookupAgentPluginResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAgentPluginResult)(nil)).Elem()
}
func (o LookupAgentPluginResultOutput) ToLookupAgentPluginResultOutput() LookupAgentPluginResultOutput {
return o
}
func (o LookupAgentPluginResultOutput) ToLookupAgentPluginResultOutputWithContext(ctx context.Context) LookupAgentPluginResultOutput {
return o
}
// Agent identifier.
func (o LookupAgentPluginResultOutput) AgentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.AgentId }).(pulumi.StringOutput)
}
// The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
func (o LookupAgentPluginResultOutput) DefinedTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupAgentPluginResult) map[string]interface{} { return v.DefinedTags }).(pulumi.MapOutput)
}
// State to which the customer wants the plugin to move to.
func (o LookupAgentPluginResultOutput) DesiredState() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.DesiredState }).(pulumi.StringOutput)
}
// The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
func (o LookupAgentPluginResultOutput) FreeformTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupAgentPluginResult) map[string]interface{} { return v.FreeformTags }).(pulumi.MapOutput)
}
func (o LookupAgentPluginResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.Id }).(pulumi.StringOutput)
}
// A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
func (o LookupAgentPluginResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
// Plugin identifier, which can be renamed.
func (o LookupAgentPluginResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupAgentPluginResultOutput) PluginName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.PluginName }).(pulumi.StringOutput)
}
// Plugin version.
func (o LookupAgentPluginResultOutput) PluginVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.PluginVersion }).(pulumi.StringOutput)
}
// The current state of the plugin.
func (o LookupAgentPluginResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.State }).(pulumi.StringOutput)
}
// The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{orcl-cloud: {free-tier-retain: true}}`
func (o LookupAgentPluginResultOutput) SystemTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupAgentPluginResult) map[string]interface{} { return v.SystemTags }).(pulumi.MapOutput)
}
// The time when the Agent was created. An RFC3339 formatted datetime string.
func (o LookupAgentPluginResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The time when the Agent was updated. An RFC3339 formatted datetime string.
func (o LookupAgentPluginResultOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgentPluginResult) string { return v.TimeUpdated }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAgentPluginResultOutput{})
}