/
getDatabase.go
55 lines (50 loc) · 1.59 KB
/
getDatabase.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package aiven
import (
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
func LookupDatabase(ctx *pulumi.Context, args *GetDatabaseArgs) (*GetDatabaseResult, error) {
inputs := make(map[string]interface{})
if args != nil {
inputs["databaseName"] = args.DatabaseName
inputs["lcCollate"] = args.LcCollate
inputs["lcCtype"] = args.LcCtype
inputs["project"] = args.Project
inputs["serviceName"] = args.ServiceName
inputs["terminationProtection"] = args.TerminationProtection
}
outputs, err := ctx.Invoke("aiven:index/getDatabase:getDatabase", inputs)
if err != nil {
return nil, err
}
return &GetDatabaseResult{
DatabaseName: outputs["databaseName"],
LcCollate: outputs["lcCollate"],
LcCtype: outputs["lcCtype"],
Project: outputs["project"],
ServiceName: outputs["serviceName"],
TerminationProtection: outputs["terminationProtection"],
Id: outputs["id"],
}, nil
}
// A collection of arguments for invoking getDatabase.
type GetDatabaseArgs struct {
DatabaseName interface{}
LcCollate interface{}
LcCtype interface{}
Project interface{}
ServiceName interface{}
TerminationProtection interface{}
}
// A collection of values returned by getDatabase.
type GetDatabaseResult struct {
DatabaseName interface{}
LcCollate interface{}
LcCtype interface{}
Project interface{}
ServiceName interface{}
TerminationProtection interface{}
// id is the provider-assigned unique ID for this managed resource.
Id interface{}
}