generated from pulumi/pulumi-tf-provider-boilerplate
/
getMetastore.go
199 lines (171 loc) · 9.08 KB
/
getMetastore.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
// 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 Metastore resource in Oracle Cloud Infrastructure Data Catalog service.
//
// Gets a metastore by identifier.
//
// ## 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.GetMetastore(ctx, &datacatalog.GetMetastoreArgs{
// MetastoreId: testMetastoreOciDatacatalogMetastore.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupMetastore(ctx *pulumi.Context, args *LookupMetastoreArgs, opts ...pulumi.InvokeOption) (*LookupMetastoreResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupMetastoreResult
err := ctx.Invoke("oci:DataCatalog/getMetastore:getMetastore", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getMetastore.
type LookupMetastoreArgs struct {
// The metastore's OCID.
MetastoreId string `pulumi:"metastoreId"`
}
// A collection of values returned by getMetastore.
type LookupMetastoreResult struct {
// OCID of the compartment which holds the metastore.
CompartmentId string `pulumi:"compartmentId"`
// Location under which external tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
DefaultExternalTableLocation string `pulumi:"defaultExternalTableLocation"`
// Location under which managed tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
DefaultManagedTableLocation string `pulumi:"defaultManagedTableLocation"`
// Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{"foo-namespace.bar-key": "value"}`
DefinedTags map[string]interface{} `pulumi:"definedTags"`
// Mutable name of the metastore.
DisplayName string `pulumi:"displayName"`
// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
FreeformTags map[string]interface{} `pulumi:"freeformTags"`
// The metastore's OCID.
Id string `pulumi:"id"`
// A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
LifecycleDetails string `pulumi:"lifecycleDetails"`
// Locks associated with this resource.
Locks []GetMetastoreLock `pulumi:"locks"`
MetastoreId string `pulumi:"metastoreId"`
// The current state of the metastore.
State string `pulumi:"state"`
// System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). System tags can be viewed by users, but can only be created by the system. Example: `{"orcl-cloud.free-tier-retained": "true"}`
SystemTags map[string]interface{} `pulumi:"systemTags"`
// Time at which the metastore was created. An [RFC3339](https://tools.ietf.org/html/rfc3339) formatted datetime string.
TimeCreated string `pulumi:"timeCreated"`
// Time at which the metastore was last modified. An [RFC3339](https://tools.ietf.org/html/rfc3339) formatted datetime string.
TimeUpdated string `pulumi:"timeUpdated"`
}
func LookupMetastoreOutput(ctx *pulumi.Context, args LookupMetastoreOutputArgs, opts ...pulumi.InvokeOption) LookupMetastoreResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupMetastoreResult, error) {
args := v.(LookupMetastoreArgs)
r, err := LookupMetastore(ctx, &args, opts...)
var s LookupMetastoreResult
if r != nil {
s = *r
}
return s, err
}).(LookupMetastoreResultOutput)
}
// A collection of arguments for invoking getMetastore.
type LookupMetastoreOutputArgs struct {
// The metastore's OCID.
MetastoreId pulumi.StringInput `pulumi:"metastoreId"`
}
func (LookupMetastoreOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMetastoreArgs)(nil)).Elem()
}
// A collection of values returned by getMetastore.
type LookupMetastoreResultOutput struct{ *pulumi.OutputState }
func (LookupMetastoreResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMetastoreResult)(nil)).Elem()
}
func (o LookupMetastoreResultOutput) ToLookupMetastoreResultOutput() LookupMetastoreResultOutput {
return o
}
func (o LookupMetastoreResultOutput) ToLookupMetastoreResultOutputWithContext(ctx context.Context) LookupMetastoreResultOutput {
return o
}
// OCID of the compartment which holds the metastore.
func (o LookupMetastoreResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
// Location under which external tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
func (o LookupMetastoreResultOutput) DefaultExternalTableLocation() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.DefaultExternalTableLocation }).(pulumi.StringOutput)
}
// Location under which managed tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
func (o LookupMetastoreResultOutput) DefaultManagedTableLocation() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.DefaultManagedTableLocation }).(pulumi.StringOutput)
}
// Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{"foo-namespace.bar-key": "value"}`
func (o LookupMetastoreResultOutput) DefinedTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupMetastoreResult) map[string]interface{} { return v.DefinedTags }).(pulumi.MapOutput)
}
// Mutable name of the metastore.
func (o LookupMetastoreResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
func (o LookupMetastoreResultOutput) FreeformTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupMetastoreResult) map[string]interface{} { return v.FreeformTags }).(pulumi.MapOutput)
}
// The metastore's OCID.
func (o LookupMetastoreResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.Id }).(pulumi.StringOutput)
}
// A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
func (o LookupMetastoreResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
// Locks associated with this resource.
func (o LookupMetastoreResultOutput) Locks() GetMetastoreLockArrayOutput {
return o.ApplyT(func(v LookupMetastoreResult) []GetMetastoreLock { return v.Locks }).(GetMetastoreLockArrayOutput)
}
func (o LookupMetastoreResultOutput) MetastoreId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.MetastoreId }).(pulumi.StringOutput)
}
// The current state of the metastore.
func (o LookupMetastoreResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.State }).(pulumi.StringOutput)
}
// System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). System tags can be viewed by users, but can only be created by the system. Example: `{"orcl-cloud.free-tier-retained": "true"}`
func (o LookupMetastoreResultOutput) SystemTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupMetastoreResult) map[string]interface{} { return v.SystemTags }).(pulumi.MapOutput)
}
// Time at which the metastore was created. An [RFC3339](https://tools.ietf.org/html/rfc3339) formatted datetime string.
func (o LookupMetastoreResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// Time at which the metastore was last modified. An [RFC3339](https://tools.ietf.org/html/rfc3339) formatted datetime string.
func (o LookupMetastoreResultOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v LookupMetastoreResult) string { return v.TimeUpdated }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupMetastoreResultOutput{})
}