generated from pulumi/pulumi-tf-provider-boilerplate
/
getProfiles.go
224 lines (198 loc) · 9.02 KB
/
getProfiles.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
// 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 osmanagementhub
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 Profiles in Oracle Cloud Infrastructure Os Management Hub service.
//
// Lists registration profiles that match the specified compartment or profile OCID. Filter the list against a
// variety of criteria including but not limited to its name, status, vendor name, and architecture type.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/OsManagementHub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := OsManagementHub.GetProfiles(ctx, &osmanagementhub.GetProfilesArgs{
// ArchType: pulumi.StringRef(profileArchType),
// CompartmentId: pulumi.StringRef(compartmentId),
// DisplayNames: profileDisplayName,
// DisplayNameContains: pulumi.StringRef(profileDisplayNameContains),
// OsFamily: pulumi.StringRef(profileOsFamily),
// ProfileId: pulumi.StringRef(testProfile.Id),
// ProfileTypes: profileProfileType,
// State: pulumi.StringRef(profileState),
// VendorName: pulumi.StringRef(profileVendorName),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetProfiles(ctx *pulumi.Context, args *GetProfilesArgs, opts ...pulumi.InvokeOption) (*GetProfilesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetProfilesResult
err := ctx.Invoke("oci:OsManagementHub/getProfiles:getProfiles", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getProfiles.
type GetProfilesArgs struct {
// A filter to return only profiles that match the given archType.
ArchType *string `pulumi:"archType"`
// The OCID of the compartment that contains the resources to list.
CompartmentId *string `pulumi:"compartmentId"`
// A filter to return resources that may partially match the given display name.
DisplayNameContains *string `pulumi:"displayNameContains"`
// A filter to return resources that match the given display names.
DisplayNames []string `pulumi:"displayNames"`
Filters []GetProfilesFilter `pulumi:"filters"`
// A filter to return only profiles that match the given osFamily.
OsFamily *string `pulumi:"osFamily"`
// The OCID of the registration profile.
ProfileId *string `pulumi:"profileId"`
// A filter to return registration profiles that match the given profileType.
ProfileTypes []string `pulumi:"profileTypes"`
// A filter to return only registration profile whose lifecycleState matches the given lifecycleState.
State *string `pulumi:"state"`
// A filter to return only profiles that match the given vendorName.
VendorName *string `pulumi:"vendorName"`
}
// A collection of values returned by getProfiles.
type GetProfilesResult struct {
// The architecture type.
ArchType *string `pulumi:"archType"`
// The OCID of the tenancy containing the registration profile.
CompartmentId *string `pulumi:"compartmentId"`
DisplayNameContains *string `pulumi:"displayNameContains"`
// Software source name.
DisplayNames []string `pulumi:"displayNames"`
Filters []GetProfilesFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The operating system family.
OsFamily *string `pulumi:"osFamily"`
// The list of profile_collection.
ProfileCollections []GetProfilesProfileCollection `pulumi:"profileCollections"`
ProfileId *string `pulumi:"profileId"`
// The type of Profile. One of SOFTWARESOURCE, GROUP or LIFECYCLE.
ProfileTypes []string `pulumi:"profileTypes"`
// The current state of the registration profile.
State *string `pulumi:"state"`
// The software source vendor name.
VendorName *string `pulumi:"vendorName"`
}
func GetProfilesOutput(ctx *pulumi.Context, args GetProfilesOutputArgs, opts ...pulumi.InvokeOption) GetProfilesResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetProfilesResult, error) {
args := v.(GetProfilesArgs)
r, err := GetProfiles(ctx, &args, opts...)
var s GetProfilesResult
if r != nil {
s = *r
}
return s, err
}).(GetProfilesResultOutput)
}
// A collection of arguments for invoking getProfiles.
type GetProfilesOutputArgs struct {
// A filter to return only profiles that match the given archType.
ArchType pulumi.StringPtrInput `pulumi:"archType"`
// The OCID of the compartment that contains the resources to list.
CompartmentId pulumi.StringPtrInput `pulumi:"compartmentId"`
// A filter to return resources that may partially match the given display name.
DisplayNameContains pulumi.StringPtrInput `pulumi:"displayNameContains"`
// A filter to return resources that match the given display names.
DisplayNames pulumi.StringArrayInput `pulumi:"displayNames"`
Filters GetProfilesFilterArrayInput `pulumi:"filters"`
// A filter to return only profiles that match the given osFamily.
OsFamily pulumi.StringPtrInput `pulumi:"osFamily"`
// The OCID of the registration profile.
ProfileId pulumi.StringPtrInput `pulumi:"profileId"`
// A filter to return registration profiles that match the given profileType.
ProfileTypes pulumi.StringArrayInput `pulumi:"profileTypes"`
// A filter to return only registration profile whose lifecycleState matches the given lifecycleState.
State pulumi.StringPtrInput `pulumi:"state"`
// A filter to return only profiles that match the given vendorName.
VendorName pulumi.StringPtrInput `pulumi:"vendorName"`
}
func (GetProfilesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetProfilesArgs)(nil)).Elem()
}
// A collection of values returned by getProfiles.
type GetProfilesResultOutput struct{ *pulumi.OutputState }
func (GetProfilesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetProfilesResult)(nil)).Elem()
}
func (o GetProfilesResultOutput) ToGetProfilesResultOutput() GetProfilesResultOutput {
return o
}
func (o GetProfilesResultOutput) ToGetProfilesResultOutputWithContext(ctx context.Context) GetProfilesResultOutput {
return o
}
// The architecture type.
func (o GetProfilesResultOutput) ArchType() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetProfilesResult) *string { return v.ArchType }).(pulumi.StringPtrOutput)
}
// The OCID of the tenancy containing the registration profile.
func (o GetProfilesResultOutput) CompartmentId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetProfilesResult) *string { return v.CompartmentId }).(pulumi.StringPtrOutput)
}
func (o GetProfilesResultOutput) DisplayNameContains() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetProfilesResult) *string { return v.DisplayNameContains }).(pulumi.StringPtrOutput)
}
// Software source name.
func (o GetProfilesResultOutput) DisplayNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetProfilesResult) []string { return v.DisplayNames }).(pulumi.StringArrayOutput)
}
func (o GetProfilesResultOutput) Filters() GetProfilesFilterArrayOutput {
return o.ApplyT(func(v GetProfilesResult) []GetProfilesFilter { return v.Filters }).(GetProfilesFilterArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetProfilesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetProfilesResult) string { return v.Id }).(pulumi.StringOutput)
}
// The operating system family.
func (o GetProfilesResultOutput) OsFamily() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetProfilesResult) *string { return v.OsFamily }).(pulumi.StringPtrOutput)
}
// The list of profile_collection.
func (o GetProfilesResultOutput) ProfileCollections() GetProfilesProfileCollectionArrayOutput {
return o.ApplyT(func(v GetProfilesResult) []GetProfilesProfileCollection { return v.ProfileCollections }).(GetProfilesProfileCollectionArrayOutput)
}
func (o GetProfilesResultOutput) ProfileId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetProfilesResult) *string { return v.ProfileId }).(pulumi.StringPtrOutput)
}
// The type of Profile. One of SOFTWARESOURCE, GROUP or LIFECYCLE.
func (o GetProfilesResultOutput) ProfileTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetProfilesResult) []string { return v.ProfileTypes }).(pulumi.StringArrayOutput)
}
// The current state of the registration profile.
func (o GetProfilesResultOutput) State() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetProfilesResult) *string { return v.State }).(pulumi.StringPtrOutput)
}
// The software source vendor name.
func (o GetProfilesResultOutput) VendorName() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetProfilesResult) *string { return v.VendorName }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetProfilesResultOutput{})
}