generated from pulumi/pulumi-tf-provider-boilerplate
/
getCatalogType.go
214 lines (185 loc) · 8.42 KB
/
getCatalogType.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
// 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 datacatalog
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 Catalog Type resource in Oracle Cloud Infrastructure Data Catalog service.
//
// Gets a specific type by key within a data catalog.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/DataCatalog"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := DataCatalog.GetCatalogType(ctx, &datacatalog.GetCatalogTypeArgs{
// CatalogId: testCatalog.Id,
// TypeKey: catalogTypeTypeKey,
// Fields: catalogTypeFields,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetCatalogType(ctx *pulumi.Context, args *GetCatalogTypeArgs, opts ...pulumi.InvokeOption) (*GetCatalogTypeResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetCatalogTypeResult
err := ctx.Invoke("oci:DataCatalog/getCatalogType:getCatalogType", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCatalogType.
type GetCatalogTypeArgs struct {
// Unique catalog identifier.
CatalogId string `pulumi:"catalogId"`
// Specifies the fields to return in a type response.
Fields []string `pulumi:"fields"`
// Unique type key.
TypeKey string `pulumi:"typeKey"`
}
// A collection of values returned by getCatalogType.
type GetCatalogTypeResult struct {
// The data catalog's OCID.
CatalogId string `pulumi:"catalogId"`
// Detailed description of the type.
Description string `pulumi:"description"`
// Mapping type equivalence in the external system.
ExternalTypeName string `pulumi:"externalTypeName"`
Fields []string `pulumi:"fields"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Indicates whether the type is approved for use as a classifying object.
IsApproved bool `pulumi:"isApproved"`
// Indicates whether the type is internal, making it unavailable for use by metadata elements.
IsInternal bool `pulumi:"isInternal"`
// Indicates whether the type can be used for tagging metadata elements.
IsTag bool `pulumi:"isTag"`
// Unique type key that is immutable.
Key string `pulumi:"key"`
// The immutable name of the type.
Name string `pulumi:"name"`
// A map of arrays which defines the type specific properties, both required and optional. The map keys are category names and the values are arrays contiaing all property details. Every property is contained inside of a category. Most types have required properties within the "default" category. Example: `{ "properties": { "default": { "attributes:": [ { "name": "host", "type": "string", "isRequired": true, "isUpdatable": false }, ... ] } } }`
Properties map[string]interface{} `pulumi:"properties"`
// The current state of the type.
State string `pulumi:"state"`
// Indicates the category this type belongs to. For instance, data assets, connections.
TypeCategory string `pulumi:"typeCategory"`
TypeKey string `pulumi:"typeKey"`
// URI to the type instance in the API.
Uri string `pulumi:"uri"`
}
func GetCatalogTypeOutput(ctx *pulumi.Context, args GetCatalogTypeOutputArgs, opts ...pulumi.InvokeOption) GetCatalogTypeResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetCatalogTypeResult, error) {
args := v.(GetCatalogTypeArgs)
r, err := GetCatalogType(ctx, &args, opts...)
var s GetCatalogTypeResult
if r != nil {
s = *r
}
return s, err
}).(GetCatalogTypeResultOutput)
}
// A collection of arguments for invoking getCatalogType.
type GetCatalogTypeOutputArgs struct {
// Unique catalog identifier.
CatalogId pulumi.StringInput `pulumi:"catalogId"`
// Specifies the fields to return in a type response.
Fields pulumi.StringArrayInput `pulumi:"fields"`
// Unique type key.
TypeKey pulumi.StringInput `pulumi:"typeKey"`
}
func (GetCatalogTypeOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetCatalogTypeArgs)(nil)).Elem()
}
// A collection of values returned by getCatalogType.
type GetCatalogTypeResultOutput struct{ *pulumi.OutputState }
func (GetCatalogTypeResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetCatalogTypeResult)(nil)).Elem()
}
func (o GetCatalogTypeResultOutput) ToGetCatalogTypeResultOutput() GetCatalogTypeResultOutput {
return o
}
func (o GetCatalogTypeResultOutput) ToGetCatalogTypeResultOutputWithContext(ctx context.Context) GetCatalogTypeResultOutput {
return o
}
// The data catalog's OCID.
func (o GetCatalogTypeResultOutput) CatalogId() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.CatalogId }).(pulumi.StringOutput)
}
// Detailed description of the type.
func (o GetCatalogTypeResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.Description }).(pulumi.StringOutput)
}
// Mapping type equivalence in the external system.
func (o GetCatalogTypeResultOutput) ExternalTypeName() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.ExternalTypeName }).(pulumi.StringOutput)
}
func (o GetCatalogTypeResultOutput) Fields() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetCatalogTypeResult) []string { return v.Fields }).(pulumi.StringArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetCatalogTypeResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.Id }).(pulumi.StringOutput)
}
// Indicates whether the type is approved for use as a classifying object.
func (o GetCatalogTypeResultOutput) IsApproved() pulumi.BoolOutput {
return o.ApplyT(func(v GetCatalogTypeResult) bool { return v.IsApproved }).(pulumi.BoolOutput)
}
// Indicates whether the type is internal, making it unavailable for use by metadata elements.
func (o GetCatalogTypeResultOutput) IsInternal() pulumi.BoolOutput {
return o.ApplyT(func(v GetCatalogTypeResult) bool { return v.IsInternal }).(pulumi.BoolOutput)
}
// Indicates whether the type can be used for tagging metadata elements.
func (o GetCatalogTypeResultOutput) IsTag() pulumi.BoolOutput {
return o.ApplyT(func(v GetCatalogTypeResult) bool { return v.IsTag }).(pulumi.BoolOutput)
}
// Unique type key that is immutable.
func (o GetCatalogTypeResultOutput) Key() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.Key }).(pulumi.StringOutput)
}
// The immutable name of the type.
func (o GetCatalogTypeResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.Name }).(pulumi.StringOutput)
}
// A map of arrays which defines the type specific properties, both required and optional. The map keys are category names and the values are arrays contiaing all property details. Every property is contained inside of a category. Most types have required properties within the "default" category. Example: `{ "properties": { "default": { "attributes:": [ { "name": "host", "type": "string", "isRequired": true, "isUpdatable": false }, ... ] } } }`
func (o GetCatalogTypeResultOutput) Properties() pulumi.MapOutput {
return o.ApplyT(func(v GetCatalogTypeResult) map[string]interface{} { return v.Properties }).(pulumi.MapOutput)
}
// The current state of the type.
func (o GetCatalogTypeResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.State }).(pulumi.StringOutput)
}
// Indicates the category this type belongs to. For instance, data assets, connections.
func (o GetCatalogTypeResultOutput) TypeCategory() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.TypeCategory }).(pulumi.StringOutput)
}
func (o GetCatalogTypeResultOutput) TypeKey() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.TypeKey }).(pulumi.StringOutput)
}
// URI to the type instance in the API.
func (o GetCatalogTypeResultOutput) Uri() pulumi.StringOutput {
return o.ApplyT(func(v GetCatalogTypeResult) string { return v.Uri }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetCatalogTypeResultOutput{})
}