-
Notifications
You must be signed in to change notification settings - Fork 2
/
project.go
158 lines (141 loc) · 5.09 KB
/
project.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
// *** 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/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
type Project struct {
s *pulumi.ResourceState
}
// NewProject registers a new resource with the given unique name, arguments, and options.
func NewProject(ctx *pulumi.Context,
name string, args *ProjectArgs, opts ...pulumi.ResourceOpt) (*Project, error) {
if args == nil || args.Project == nil {
return nil, errors.New("missing required argument 'Project'")
}
inputs := make(map[string]interface{})
if args == nil {
inputs["billingAddress"] = nil
inputs["billingEmails"] = nil
inputs["caCert"] = nil
inputs["cardId"] = nil
inputs["copyFromProject"] = nil
inputs["countryCode"] = nil
inputs["project"] = nil
inputs["technicalEmails"] = nil
} else {
inputs["billingAddress"] = args.BillingAddress
inputs["billingEmails"] = args.BillingEmails
inputs["caCert"] = args.CaCert
inputs["cardId"] = args.CardId
inputs["copyFromProject"] = args.CopyFromProject
inputs["countryCode"] = args.CountryCode
inputs["project"] = args.Project
inputs["technicalEmails"] = args.TechnicalEmails
}
s, err := ctx.RegisterResource("aiven:index/project:Project", name, true, inputs, opts...)
if err != nil {
return nil, err
}
return &Project{s: s}, nil
}
// GetProject gets an existing Project resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetProject(ctx *pulumi.Context,
name string, id pulumi.ID, state *ProjectState, opts ...pulumi.ResourceOpt) (*Project, error) {
inputs := make(map[string]interface{})
if state != nil {
inputs["billingAddress"] = state.BillingAddress
inputs["billingEmails"] = state.BillingEmails
inputs["caCert"] = state.CaCert
inputs["cardId"] = state.CardId
inputs["copyFromProject"] = state.CopyFromProject
inputs["countryCode"] = state.CountryCode
inputs["project"] = state.Project
inputs["technicalEmails"] = state.TechnicalEmails
}
s, err := ctx.ReadResource("aiven:index/project:Project", name, id, inputs, opts...)
if err != nil {
return nil, err
}
return &Project{s: s}, nil
}
// URN is this resource's unique name assigned by Pulumi.
func (r *Project) URN() pulumi.URNOutput {
return r.s.URN()
}
// ID is this resource's unique identifier assigned by its provider.
func (r *Project) ID() pulumi.IDOutput {
return r.s.ID()
}
// Billing name and address of the project
func (r *Project) BillingAddress() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["billingAddress"])
}
// Billing contact emails of the project
func (r *Project) BillingEmails() pulumi.ArrayOutput {
return (pulumi.ArrayOutput)(r.s.State["billingEmails"])
}
// Project root CA. This is used by some services like Kafka to sign service certificate
func (r *Project) CaCert() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["caCert"])
}
// Credit card ID
func (r *Project) CardId() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["cardId"])
}
// Copy properties from another project. Only has effect when a new project is created.
func (r *Project) CopyFromProject() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["copyFromProject"])
}
// Billing country code of the project
func (r *Project) CountryCode() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["countryCode"])
}
// Project name
func (r *Project) Project() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["project"])
}
// Technical contact emails of the project
func (r *Project) TechnicalEmails() pulumi.ArrayOutput {
return (pulumi.ArrayOutput)(r.s.State["technicalEmails"])
}
// Input properties used for looking up and filtering Project resources.
type ProjectState struct {
// Billing name and address of the project
BillingAddress interface{}
// Billing contact emails of the project
BillingEmails interface{}
// Project root CA. This is used by some services like Kafka to sign service certificate
CaCert interface{}
// Credit card ID
CardId interface{}
// Copy properties from another project. Only has effect when a new project is created.
CopyFromProject interface{}
// Billing country code of the project
CountryCode interface{}
// Project name
Project interface{}
// Technical contact emails of the project
TechnicalEmails interface{}
}
// The set of arguments for constructing a Project resource.
type ProjectArgs struct {
// Billing name and address of the project
BillingAddress interface{}
// Billing contact emails of the project
BillingEmails interface{}
// Project root CA. This is used by some services like Kafka to sign service certificate
CaCert interface{}
// Credit card ID
CardId interface{}
// Copy properties from another project. Only has effect when a new project is created.
CopyFromProject interface{}
// Billing country code of the project
CountryCode interface{}
// Project name
Project interface{}
// Technical contact emails of the project
TechnicalEmails interface{}
}