generated from pulumi/pulumi-tf-provider-boilerplate
/
getSoftwareSourcePackageGroups.go
176 lines (154 loc) · 7.67 KB
/
getSoftwareSourcePackageGroups.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
// 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 Software Source Package Groups in Oracle Cloud Infrastructure Os Management Hub service.
//
// Lists package groups that associate with the specified software source OCID. Filter the list against a
// variety of criteria including but not limited to its name, and package group 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.GetSoftwareSourcePackageGroups(ctx, &osmanagementhub.GetSoftwareSourcePackageGroupsArgs{
// SoftwareSourceId: testSoftwareSource.Id,
// CompartmentId: pulumi.StringRef(compartmentId),
// GroupTypes: softwareSourcePackageGroupGroupType,
// Name: pulumi.StringRef(softwareSourcePackageGroupName),
// NameContains: pulumi.StringRef(softwareSourcePackageGroupNameContains),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetSoftwareSourcePackageGroups(ctx *pulumi.Context, args *GetSoftwareSourcePackageGroupsArgs, opts ...pulumi.InvokeOption) (*GetSoftwareSourcePackageGroupsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetSoftwareSourcePackageGroupsResult
err := ctx.Invoke("oci:OsManagementHub/getSoftwareSourcePackageGroups:getSoftwareSourcePackageGroups", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSoftwareSourcePackageGroups.
type GetSoftwareSourcePackageGroupsArgs struct {
// The OCID of the compartment that contains the resources to list.
CompartmentId *string `pulumi:"compartmentId"`
Filters []GetSoftwareSourcePackageGroupsFilter `pulumi:"filters"`
// A filter to return only package groups of the specified type.
GroupTypes []string `pulumi:"groupTypes"`
// The name of the entity to be queried.
Name *string `pulumi:"name"`
// A filter to return resources that may partially match the name given.
NameContains *string `pulumi:"nameContains"`
// The software source OCID.
SoftwareSourceId string `pulumi:"softwareSourceId"`
}
// A collection of values returned by getSoftwareSourcePackageGroups.
type GetSoftwareSourcePackageGroupsResult struct {
CompartmentId *string `pulumi:"compartmentId"`
Filters []GetSoftwareSourcePackageGroupsFilter `pulumi:"filters"`
// Indicates if this is a group, category or environment.
GroupTypes []string `pulumi:"groupTypes"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Package group name.
Name *string `pulumi:"name"`
NameContains *string `pulumi:"nameContains"`
// The list of package_group_collection.
PackageGroupCollections []GetSoftwareSourcePackageGroupsPackageGroupCollection `pulumi:"packageGroupCollections"`
SoftwareSourceId string `pulumi:"softwareSourceId"`
}
func GetSoftwareSourcePackageGroupsOutput(ctx *pulumi.Context, args GetSoftwareSourcePackageGroupsOutputArgs, opts ...pulumi.InvokeOption) GetSoftwareSourcePackageGroupsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetSoftwareSourcePackageGroupsResult, error) {
args := v.(GetSoftwareSourcePackageGroupsArgs)
r, err := GetSoftwareSourcePackageGroups(ctx, &args, opts...)
var s GetSoftwareSourcePackageGroupsResult
if r != nil {
s = *r
}
return s, err
}).(GetSoftwareSourcePackageGroupsResultOutput)
}
// A collection of arguments for invoking getSoftwareSourcePackageGroups.
type GetSoftwareSourcePackageGroupsOutputArgs struct {
// The OCID of the compartment that contains the resources to list.
CompartmentId pulumi.StringPtrInput `pulumi:"compartmentId"`
Filters GetSoftwareSourcePackageGroupsFilterArrayInput `pulumi:"filters"`
// A filter to return only package groups of the specified type.
GroupTypes pulumi.StringArrayInput `pulumi:"groupTypes"`
// The name of the entity to be queried.
Name pulumi.StringPtrInput `pulumi:"name"`
// A filter to return resources that may partially match the name given.
NameContains pulumi.StringPtrInput `pulumi:"nameContains"`
// The software source OCID.
SoftwareSourceId pulumi.StringInput `pulumi:"softwareSourceId"`
}
func (GetSoftwareSourcePackageGroupsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoftwareSourcePackageGroupsArgs)(nil)).Elem()
}
// A collection of values returned by getSoftwareSourcePackageGroups.
type GetSoftwareSourcePackageGroupsResultOutput struct{ *pulumi.OutputState }
func (GetSoftwareSourcePackageGroupsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoftwareSourcePackageGroupsResult)(nil)).Elem()
}
func (o GetSoftwareSourcePackageGroupsResultOutput) ToGetSoftwareSourcePackageGroupsResultOutput() GetSoftwareSourcePackageGroupsResultOutput {
return o
}
func (o GetSoftwareSourcePackageGroupsResultOutput) ToGetSoftwareSourcePackageGroupsResultOutputWithContext(ctx context.Context) GetSoftwareSourcePackageGroupsResultOutput {
return o
}
func (o GetSoftwareSourcePackageGroupsResultOutput) CompartmentId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSoftwareSourcePackageGroupsResult) *string { return v.CompartmentId }).(pulumi.StringPtrOutput)
}
func (o GetSoftwareSourcePackageGroupsResultOutput) Filters() GetSoftwareSourcePackageGroupsFilterArrayOutput {
return o.ApplyT(func(v GetSoftwareSourcePackageGroupsResult) []GetSoftwareSourcePackageGroupsFilter { return v.Filters }).(GetSoftwareSourcePackageGroupsFilterArrayOutput)
}
// Indicates if this is a group, category or environment.
func (o GetSoftwareSourcePackageGroupsResultOutput) GroupTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetSoftwareSourcePackageGroupsResult) []string { return v.GroupTypes }).(pulumi.StringArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSoftwareSourcePackageGroupsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourcePackageGroupsResult) string { return v.Id }).(pulumi.StringOutput)
}
// Package group name.
func (o GetSoftwareSourcePackageGroupsResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSoftwareSourcePackageGroupsResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
func (o GetSoftwareSourcePackageGroupsResultOutput) NameContains() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSoftwareSourcePackageGroupsResult) *string { return v.NameContains }).(pulumi.StringPtrOutput)
}
// The list of package_group_collection.
func (o GetSoftwareSourcePackageGroupsResultOutput) PackageGroupCollections() GetSoftwareSourcePackageGroupsPackageGroupCollectionArrayOutput {
return o.ApplyT(func(v GetSoftwareSourcePackageGroupsResult) []GetSoftwareSourcePackageGroupsPackageGroupCollection {
return v.PackageGroupCollections
}).(GetSoftwareSourcePackageGroupsPackageGroupCollectionArrayOutput)
}
func (o GetSoftwareSourcePackageGroupsResultOutput) SoftwareSourceId() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourcePackageGroupsResult) string { return v.SoftwareSourceId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetSoftwareSourcePackageGroupsResultOutput{})
}