generated from pulumi/pulumi-tf-provider-boilerplate
/
getManagementAgentInstallKey.go
199 lines (171 loc) · 8.86 KB
/
getManagementAgentInstallKey.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
// 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 managementagent
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 Management Agent Install Key resource in Oracle Cloud Infrastructure Management Agent service.
//
// # Gets complete details of the Agent install Key for a given key id
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/ManagementAgent"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ManagementAgent.GetManagementAgentInstallKey(ctx, &managementagent.GetManagementAgentInstallKeyArgs{
// ManagementAgentInstallKeyId: testManagementAgentInstallKeyOciManagementAgentManagementAgentInstallKey.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupManagementAgentInstallKey(ctx *pulumi.Context, args *LookupManagementAgentInstallKeyArgs, opts ...pulumi.InvokeOption) (*LookupManagementAgentInstallKeyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupManagementAgentInstallKeyResult
err := ctx.Invoke("oci:ManagementAgent/getManagementAgentInstallKey:getManagementAgentInstallKey", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getManagementAgentInstallKey.
type LookupManagementAgentInstallKeyArgs struct {
// Unique Management Agent Install Key identifier
ManagementAgentInstallKeyId string `pulumi:"managementAgentInstallKeyId"`
}
// A collection of values returned by getManagementAgentInstallKey.
type LookupManagementAgentInstallKeyResult struct {
// Total number of install for this keys
AllowedKeyInstallCount int `pulumi:"allowedKeyInstallCount"`
// Compartment Identifier
CompartmentId string `pulumi:"compartmentId"`
// Principal id of user who created the Agent Install key
CreatedByPrincipalId string `pulumi:"createdByPrincipalId"`
// Total number of install for this keys
CurrentKeyInstallCount int `pulumi:"currentKeyInstallCount"`
// Management Agent Install Key Name
DisplayName string `pulumi:"displayName"`
// Agent install Key identifier
Id string `pulumi:"id"`
// If set to true, the install key has no expiration date or usage limit. Properties allowedKeyInstallCount and timeExpires are ignored if set to true. Defaults to false.
IsUnlimited bool `pulumi:"isUnlimited"`
// Management Agent Install Key
Key string `pulumi:"key"`
// A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
LifecycleDetails string `pulumi:"lifecycleDetails"`
ManagementAgentInstallKeyId string `pulumi:"managementAgentInstallKeyId"`
// Status of Key
State string `pulumi:"state"`
// The time when Management Agent install Key was created. An RFC3339 formatted date time string
TimeCreated string `pulumi:"timeCreated"`
// date after which key would expire after creation
TimeExpires string `pulumi:"timeExpires"`
// The time when Management Agent install Key was updated. An RFC3339 formatted date time string
TimeUpdated string `pulumi:"timeUpdated"`
}
func LookupManagementAgentInstallKeyOutput(ctx *pulumi.Context, args LookupManagementAgentInstallKeyOutputArgs, opts ...pulumi.InvokeOption) LookupManagementAgentInstallKeyResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupManagementAgentInstallKeyResult, error) {
args := v.(LookupManagementAgentInstallKeyArgs)
r, err := LookupManagementAgentInstallKey(ctx, &args, opts...)
var s LookupManagementAgentInstallKeyResult
if r != nil {
s = *r
}
return s, err
}).(LookupManagementAgentInstallKeyResultOutput)
}
// A collection of arguments for invoking getManagementAgentInstallKey.
type LookupManagementAgentInstallKeyOutputArgs struct {
// Unique Management Agent Install Key identifier
ManagementAgentInstallKeyId pulumi.StringInput `pulumi:"managementAgentInstallKeyId"`
}
func (LookupManagementAgentInstallKeyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupManagementAgentInstallKeyArgs)(nil)).Elem()
}
// A collection of values returned by getManagementAgentInstallKey.
type LookupManagementAgentInstallKeyResultOutput struct{ *pulumi.OutputState }
func (LookupManagementAgentInstallKeyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupManagementAgentInstallKeyResult)(nil)).Elem()
}
func (o LookupManagementAgentInstallKeyResultOutput) ToLookupManagementAgentInstallKeyResultOutput() LookupManagementAgentInstallKeyResultOutput {
return o
}
func (o LookupManagementAgentInstallKeyResultOutput) ToLookupManagementAgentInstallKeyResultOutputWithContext(ctx context.Context) LookupManagementAgentInstallKeyResultOutput {
return o
}
// Total number of install for this keys
func (o LookupManagementAgentInstallKeyResultOutput) AllowedKeyInstallCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) int { return v.AllowedKeyInstallCount }).(pulumi.IntOutput)
}
// Compartment Identifier
func (o LookupManagementAgentInstallKeyResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
// Principal id of user who created the Agent Install key
func (o LookupManagementAgentInstallKeyResultOutput) CreatedByPrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.CreatedByPrincipalId }).(pulumi.StringOutput)
}
// Total number of install for this keys
func (o LookupManagementAgentInstallKeyResultOutput) CurrentKeyInstallCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) int { return v.CurrentKeyInstallCount }).(pulumi.IntOutput)
}
// Management Agent Install Key Name
func (o LookupManagementAgentInstallKeyResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Agent install Key identifier
func (o LookupManagementAgentInstallKeyResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.Id }).(pulumi.StringOutput)
}
// If set to true, the install key has no expiration date or usage limit. Properties allowedKeyInstallCount and timeExpires are ignored if set to true. Defaults to false.
func (o LookupManagementAgentInstallKeyResultOutput) IsUnlimited() pulumi.BoolOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) bool { return v.IsUnlimited }).(pulumi.BoolOutput)
}
// Management Agent Install Key
func (o LookupManagementAgentInstallKeyResultOutput) Key() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.Key }).(pulumi.StringOutput)
}
// 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 LookupManagementAgentInstallKeyResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
func (o LookupManagementAgentInstallKeyResultOutput) ManagementAgentInstallKeyId() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.ManagementAgentInstallKeyId }).(pulumi.StringOutput)
}
// Status of Key
func (o LookupManagementAgentInstallKeyResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.State }).(pulumi.StringOutput)
}
// The time when Management Agent install Key was created. An RFC3339 formatted date time string
func (o LookupManagementAgentInstallKeyResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// date after which key would expire after creation
func (o LookupManagementAgentInstallKeyResultOutput) TimeExpires() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.TimeExpires }).(pulumi.StringOutput)
}
// The time when Management Agent install Key was updated. An RFC3339 formatted date time string
func (o LookupManagementAgentInstallKeyResultOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagementAgentInstallKeyResult) string { return v.TimeUpdated }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupManagementAgentInstallKeyResultOutput{})
}