generated from pulumi/pulumi-tf-provider-boilerplate
/
getSoftwareSourceModuleStreams.go
180 lines (158 loc) · 8.12 KB
/
getSoftwareSourceModuleStreams.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
// 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 Module Streams in Oracle Cloud Infrastructure Os Management Hub service.
//
// Lists module streams from the specified software source OCID. Filter the list against a variety of
// criteria including but not limited to its module name and (stream) name.
//
// ## 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.GetSoftwareSourceModuleStreams(ctx, &osmanagementhub.GetSoftwareSourceModuleStreamsArgs{
// SoftwareSourceId: testSoftwareSource.Id,
// IsLatest: pulumi.BoolRef(softwareSourceModuleStreamIsLatest),
// ModuleName: pulumi.StringRef(softwareSourceModuleStreamModuleName),
// ModuleNameContains: pulumi.StringRef(softwareSourceModuleStreamModuleNameContains),
// Name: pulumi.StringRef(softwareSourceModuleStreamName),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetSoftwareSourceModuleStreams(ctx *pulumi.Context, args *GetSoftwareSourceModuleStreamsArgs, opts ...pulumi.InvokeOption) (*GetSoftwareSourceModuleStreamsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetSoftwareSourceModuleStreamsResult
err := ctx.Invoke("oci:OsManagementHub/getSoftwareSourceModuleStreams:getSoftwareSourceModuleStreams", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSoftwareSourceModuleStreams.
type GetSoftwareSourceModuleStreamsArgs struct {
Filters []GetSoftwareSourceModuleStreamsFilter `pulumi:"filters"`
// A boolean variable that is used to list only the latest versions of packages, module streams, and stream profiles when set to true. All packages, module streams, and stream profiles are returned when set to false.
IsLatest *bool `pulumi:"isLatest"`
// The name of a module. This parameter is required if a streamName is specified.
ModuleName *string `pulumi:"moduleName"`
// A filter to return resources that may partially match the module name given.
ModuleNameContains *string `pulumi:"moduleNameContains"`
// The name of the entity to be queried.
Name *string `pulumi:"name"`
// The software source OCID.
SoftwareSourceId string `pulumi:"softwareSourceId"`
}
// A collection of values returned by getSoftwareSourceModuleStreams.
type GetSoftwareSourceModuleStreamsResult struct {
Filters []GetSoftwareSourceModuleStreamsFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Indicates whether this module stream is the latest.
IsLatest *bool `pulumi:"isLatest"`
// The name of the module that contains the stream.
ModuleName *string `pulumi:"moduleName"`
ModuleNameContains *string `pulumi:"moduleNameContains"`
// The list of module_stream_collection.
ModuleStreamCollections []GetSoftwareSourceModuleStreamsModuleStreamCollection `pulumi:"moduleStreamCollections"`
// The name of the stream.
Name *string `pulumi:"name"`
// The OCID of the software source that provides this module stream.
SoftwareSourceId string `pulumi:"softwareSourceId"`
}
func GetSoftwareSourceModuleStreamsOutput(ctx *pulumi.Context, args GetSoftwareSourceModuleStreamsOutputArgs, opts ...pulumi.InvokeOption) GetSoftwareSourceModuleStreamsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetSoftwareSourceModuleStreamsResult, error) {
args := v.(GetSoftwareSourceModuleStreamsArgs)
r, err := GetSoftwareSourceModuleStreams(ctx, &args, opts...)
var s GetSoftwareSourceModuleStreamsResult
if r != nil {
s = *r
}
return s, err
}).(GetSoftwareSourceModuleStreamsResultOutput)
}
// A collection of arguments for invoking getSoftwareSourceModuleStreams.
type GetSoftwareSourceModuleStreamsOutputArgs struct {
Filters GetSoftwareSourceModuleStreamsFilterArrayInput `pulumi:"filters"`
// A boolean variable that is used to list only the latest versions of packages, module streams, and stream profiles when set to true. All packages, module streams, and stream profiles are returned when set to false.
IsLatest pulumi.BoolPtrInput `pulumi:"isLatest"`
// The name of a module. This parameter is required if a streamName is specified.
ModuleName pulumi.StringPtrInput `pulumi:"moduleName"`
// A filter to return resources that may partially match the module name given.
ModuleNameContains pulumi.StringPtrInput `pulumi:"moduleNameContains"`
// The name of the entity to be queried.
Name pulumi.StringPtrInput `pulumi:"name"`
// The software source OCID.
SoftwareSourceId pulumi.StringInput `pulumi:"softwareSourceId"`
}
func (GetSoftwareSourceModuleStreamsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoftwareSourceModuleStreamsArgs)(nil)).Elem()
}
// A collection of values returned by getSoftwareSourceModuleStreams.
type GetSoftwareSourceModuleStreamsResultOutput struct{ *pulumi.OutputState }
func (GetSoftwareSourceModuleStreamsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoftwareSourceModuleStreamsResult)(nil)).Elem()
}
func (o GetSoftwareSourceModuleStreamsResultOutput) ToGetSoftwareSourceModuleStreamsResultOutput() GetSoftwareSourceModuleStreamsResultOutput {
return o
}
func (o GetSoftwareSourceModuleStreamsResultOutput) ToGetSoftwareSourceModuleStreamsResultOutputWithContext(ctx context.Context) GetSoftwareSourceModuleStreamsResultOutput {
return o
}
func (o GetSoftwareSourceModuleStreamsResultOutput) Filters() GetSoftwareSourceModuleStreamsFilterArrayOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamsResult) []GetSoftwareSourceModuleStreamsFilter { return v.Filters }).(GetSoftwareSourceModuleStreamsFilterArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSoftwareSourceModuleStreamsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamsResult) string { return v.Id }).(pulumi.StringOutput)
}
// Indicates whether this module stream is the latest.
func (o GetSoftwareSourceModuleStreamsResultOutput) IsLatest() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamsResult) *bool { return v.IsLatest }).(pulumi.BoolPtrOutput)
}
// The name of the module that contains the stream.
func (o GetSoftwareSourceModuleStreamsResultOutput) ModuleName() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamsResult) *string { return v.ModuleName }).(pulumi.StringPtrOutput)
}
func (o GetSoftwareSourceModuleStreamsResultOutput) ModuleNameContains() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamsResult) *string { return v.ModuleNameContains }).(pulumi.StringPtrOutput)
}
// The list of module_stream_collection.
func (o GetSoftwareSourceModuleStreamsResultOutput) ModuleStreamCollections() GetSoftwareSourceModuleStreamsModuleStreamCollectionArrayOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamsResult) []GetSoftwareSourceModuleStreamsModuleStreamCollection {
return v.ModuleStreamCollections
}).(GetSoftwareSourceModuleStreamsModuleStreamCollectionArrayOutput)
}
// The name of the stream.
func (o GetSoftwareSourceModuleStreamsResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamsResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// The OCID of the software source that provides this module stream.
func (o GetSoftwareSourceModuleStreamsResultOutput) SoftwareSourceId() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamsResult) string { return v.SoftwareSourceId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetSoftwareSourceModuleStreamsResultOutput{})
}