generated from pulumi/pulumi-tf-provider-boilerplate
/
getSoftwareSourceModuleStream.go
188 lines (163 loc) · 8.32 KB
/
getSoftwareSourceModuleStream.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
// 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 details about a specific Software Source Module Stream resource in Oracle Cloud Infrastructure Os Management Hub service.
//
// Gets information about the specified module stream in a software source.
//
// ## 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.GetSoftwareSourceModuleStream(ctx, &osmanagementhub.GetSoftwareSourceModuleStreamArgs{
// ModuleName: softwareSourceModuleStreamModuleName,
// SoftwareSourceId: testSoftwareSource.Id,
// StreamName: testStream.Name,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetSoftwareSourceModuleStream(ctx *pulumi.Context, args *GetSoftwareSourceModuleStreamArgs, opts ...pulumi.InvokeOption) (*GetSoftwareSourceModuleStreamResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetSoftwareSourceModuleStreamResult
err := ctx.Invoke("oci:OsManagementHub/getSoftwareSourceModuleStream:getSoftwareSourceModuleStream", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSoftwareSourceModuleStream.
type GetSoftwareSourceModuleStreamArgs struct {
// The name of the module.
ModuleName string `pulumi:"moduleName"`
// The software source OCID.
SoftwareSourceId string `pulumi:"softwareSourceId"`
// The name of the stream of the containing module.
StreamName string `pulumi:"streamName"`
}
// A collection of values returned by getSoftwareSourceModuleStream.
type GetSoftwareSourceModuleStreamResult struct {
// The architecture for which the packages in this module stream were built.
ArchType string `pulumi:"archType"`
// A description of the contents of the module stream.
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Indicates if this stream is the default for its module.
IsDefault bool `pulumi:"isDefault"`
// 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"`
// The name of the stream.
Name string `pulumi:"name"`
// A list of packages that are contained by the stream. Each element in the list is the name of a package. The name is suitable to use as an argument to other OS Management Hub APIs that interact directly with packages.
Packages []string `pulumi:"packages"`
// A list of profiles that are part of the stream. Each element in the list is the name of a profile. The name is suitable to use as an argument to other OS Management Hub APIs that interact directly with module stream profiles. However, it is not URL encoded.
Profiles []string `pulumi:"profiles"`
// The OCID of the software source that provides this module stream.
SoftwareSourceId string `pulumi:"softwareSourceId"`
StreamName string `pulumi:"streamName"`
}
func GetSoftwareSourceModuleStreamOutput(ctx *pulumi.Context, args GetSoftwareSourceModuleStreamOutputArgs, opts ...pulumi.InvokeOption) GetSoftwareSourceModuleStreamResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetSoftwareSourceModuleStreamResult, error) {
args := v.(GetSoftwareSourceModuleStreamArgs)
r, err := GetSoftwareSourceModuleStream(ctx, &args, opts...)
var s GetSoftwareSourceModuleStreamResult
if r != nil {
s = *r
}
return s, err
}).(GetSoftwareSourceModuleStreamResultOutput)
}
// A collection of arguments for invoking getSoftwareSourceModuleStream.
type GetSoftwareSourceModuleStreamOutputArgs struct {
// The name of the module.
ModuleName pulumi.StringInput `pulumi:"moduleName"`
// The software source OCID.
SoftwareSourceId pulumi.StringInput `pulumi:"softwareSourceId"`
// The name of the stream of the containing module.
StreamName pulumi.StringInput `pulumi:"streamName"`
}
func (GetSoftwareSourceModuleStreamOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoftwareSourceModuleStreamArgs)(nil)).Elem()
}
// A collection of values returned by getSoftwareSourceModuleStream.
type GetSoftwareSourceModuleStreamResultOutput struct{ *pulumi.OutputState }
func (GetSoftwareSourceModuleStreamResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoftwareSourceModuleStreamResult)(nil)).Elem()
}
func (o GetSoftwareSourceModuleStreamResultOutput) ToGetSoftwareSourceModuleStreamResultOutput() GetSoftwareSourceModuleStreamResultOutput {
return o
}
func (o GetSoftwareSourceModuleStreamResultOutput) ToGetSoftwareSourceModuleStreamResultOutputWithContext(ctx context.Context) GetSoftwareSourceModuleStreamResultOutput {
return o
}
// The architecture for which the packages in this module stream were built.
func (o GetSoftwareSourceModuleStreamResultOutput) ArchType() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) string { return v.ArchType }).(pulumi.StringOutput)
}
// A description of the contents of the module stream.
func (o GetSoftwareSourceModuleStreamResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) string { return v.Description }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSoftwareSourceModuleStreamResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) string { return v.Id }).(pulumi.StringOutput)
}
// Indicates if this stream is the default for its module.
func (o GetSoftwareSourceModuleStreamResultOutput) IsDefault() pulumi.BoolOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) bool { return v.IsDefault }).(pulumi.BoolOutput)
}
// Indicates whether this module stream is the latest.
func (o GetSoftwareSourceModuleStreamResultOutput) IsLatest() pulumi.BoolOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) bool { return v.IsLatest }).(pulumi.BoolOutput)
}
// The name of the module that contains the stream.
func (o GetSoftwareSourceModuleStreamResultOutput) ModuleName() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) string { return v.ModuleName }).(pulumi.StringOutput)
}
// The name of the stream.
func (o GetSoftwareSourceModuleStreamResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) string { return v.Name }).(pulumi.StringOutput)
}
// A list of packages that are contained by the stream. Each element in the list is the name of a package. The name is suitable to use as an argument to other OS Management Hub APIs that interact directly with packages.
func (o GetSoftwareSourceModuleStreamResultOutput) Packages() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) []string { return v.Packages }).(pulumi.StringArrayOutput)
}
// A list of profiles that are part of the stream. Each element in the list is the name of a profile. The name is suitable to use as an argument to other OS Management Hub APIs that interact directly with module stream profiles. However, it is not URL encoded.
func (o GetSoftwareSourceModuleStreamResultOutput) Profiles() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) []string { return v.Profiles }).(pulumi.StringArrayOutput)
}
// The OCID of the software source that provides this module stream.
func (o GetSoftwareSourceModuleStreamResultOutput) SoftwareSourceId() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) string { return v.SoftwareSourceId }).(pulumi.StringOutput)
}
func (o GetSoftwareSourceModuleStreamResultOutput) StreamName() pulumi.StringOutput {
return o.ApplyT(func(v GetSoftwareSourceModuleStreamResult) string { return v.StreamName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetSoftwareSourceModuleStreamResultOutput{})
}