generated from pulumi/pulumi-tf-provider-boilerplate
/
getServiceCatalogs.go
155 lines (135 loc) · 5.73 KB
/
getServiceCatalogs.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
// 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 servicecatalog
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 Service Catalogs in Oracle Cloud Infrastructure Service Catalog service.
//
// Lists all the service catalogs in the given compartment.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/ServiceCatalog"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ServiceCatalog.GetServiceCatalogs(ctx, &servicecatalog.GetServiceCatalogsArgs{
// CompartmentId: compartmentId,
// DisplayName: pulumi.StringRef(serviceCatalogDisplayName),
// ServiceCatalogId: pulumi.StringRef(testServiceCatalog.Id),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetServiceCatalogs(ctx *pulumi.Context, args *GetServiceCatalogsArgs, opts ...pulumi.InvokeOption) (*GetServiceCatalogsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetServiceCatalogsResult
err := ctx.Invoke("oci:ServiceCatalog/getServiceCatalogs:getServiceCatalogs", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getServiceCatalogs.
type GetServiceCatalogsArgs struct {
// The unique identifier for the compartment.
CompartmentId string `pulumi:"compartmentId"`
// Exact match name filter.
DisplayName *string `pulumi:"displayName"`
Filters []GetServiceCatalogsFilter `pulumi:"filters"`
// The unique identifier for the service catalog.
ServiceCatalogId *string `pulumi:"serviceCatalogId"`
}
// A collection of values returned by getServiceCatalogs.
type GetServiceCatalogsResult struct {
// The Compartment id where the service catalog exists
CompartmentId string `pulumi:"compartmentId"`
// The name of the service catalog.
DisplayName *string `pulumi:"displayName"`
Filters []GetServiceCatalogsFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The list of service_catalog_collection.
ServiceCatalogCollections []GetServiceCatalogsServiceCatalogCollection `pulumi:"serviceCatalogCollections"`
ServiceCatalogId *string `pulumi:"serviceCatalogId"`
}
func GetServiceCatalogsOutput(ctx *pulumi.Context, args GetServiceCatalogsOutputArgs, opts ...pulumi.InvokeOption) GetServiceCatalogsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetServiceCatalogsResult, error) {
args := v.(GetServiceCatalogsArgs)
r, err := GetServiceCatalogs(ctx, &args, opts...)
var s GetServiceCatalogsResult
if r != nil {
s = *r
}
return s, err
}).(GetServiceCatalogsResultOutput)
}
// A collection of arguments for invoking getServiceCatalogs.
type GetServiceCatalogsOutputArgs struct {
// The unique identifier for the compartment.
CompartmentId pulumi.StringInput `pulumi:"compartmentId"`
// Exact match name filter.
DisplayName pulumi.StringPtrInput `pulumi:"displayName"`
Filters GetServiceCatalogsFilterArrayInput `pulumi:"filters"`
// The unique identifier for the service catalog.
ServiceCatalogId pulumi.StringPtrInput `pulumi:"serviceCatalogId"`
}
func (GetServiceCatalogsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceCatalogsArgs)(nil)).Elem()
}
// A collection of values returned by getServiceCatalogs.
type GetServiceCatalogsResultOutput struct{ *pulumi.OutputState }
func (GetServiceCatalogsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceCatalogsResult)(nil)).Elem()
}
func (o GetServiceCatalogsResultOutput) ToGetServiceCatalogsResultOutput() GetServiceCatalogsResultOutput {
return o
}
func (o GetServiceCatalogsResultOutput) ToGetServiceCatalogsResultOutputWithContext(ctx context.Context) GetServiceCatalogsResultOutput {
return o
}
// The Compartment id where the service catalog exists
func (o GetServiceCatalogsResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceCatalogsResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
// The name of the service catalog.
func (o GetServiceCatalogsResultOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetServiceCatalogsResult) *string { return v.DisplayName }).(pulumi.StringPtrOutput)
}
func (o GetServiceCatalogsResultOutput) Filters() GetServiceCatalogsFilterArrayOutput {
return o.ApplyT(func(v GetServiceCatalogsResult) []GetServiceCatalogsFilter { return v.Filters }).(GetServiceCatalogsFilterArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetServiceCatalogsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceCatalogsResult) string { return v.Id }).(pulumi.StringOutput)
}
// The list of service_catalog_collection.
func (o GetServiceCatalogsResultOutput) ServiceCatalogCollections() GetServiceCatalogsServiceCatalogCollectionArrayOutput {
return o.ApplyT(func(v GetServiceCatalogsResult) []GetServiceCatalogsServiceCatalogCollection {
return v.ServiceCatalogCollections
}).(GetServiceCatalogsServiceCatalogCollectionArrayOutput)
}
func (o GetServiceCatalogsResultOutput) ServiceCatalogId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetServiceCatalogsResult) *string { return v.ServiceCatalogId }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetServiceCatalogsResultOutput{})
}