/
serviceIntegration.go
161 lines (144 loc) · 5.93 KB
/
serviceIntegration.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
// *** 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 ServiceIntegration struct {
s *pulumi.ResourceState
}
// NewServiceIntegration registers a new resource with the given unique name, arguments, and options.
func NewServiceIntegration(ctx *pulumi.Context,
name string, args *ServiceIntegrationArgs, opts ...pulumi.ResourceOpt) (*ServiceIntegration, error) {
if args == nil || args.IntegrationType == nil {
return nil, errors.New("missing required argument 'IntegrationType'")
}
if args == nil || args.Project == nil {
return nil, errors.New("missing required argument 'Project'")
}
inputs := make(map[string]interface{})
if args == nil {
inputs["destinationEndpointId"] = nil
inputs["destinationServiceName"] = nil
inputs["integrationType"] = nil
inputs["logsUserConfig"] = nil
inputs["mirrormakerUserConfig"] = nil
inputs["project"] = nil
inputs["sourceEndpointId"] = nil
inputs["sourceServiceName"] = nil
} else {
inputs["destinationEndpointId"] = args.DestinationEndpointId
inputs["destinationServiceName"] = args.DestinationServiceName
inputs["integrationType"] = args.IntegrationType
inputs["logsUserConfig"] = args.LogsUserConfig
inputs["mirrormakerUserConfig"] = args.MirrormakerUserConfig
inputs["project"] = args.Project
inputs["sourceEndpointId"] = args.SourceEndpointId
inputs["sourceServiceName"] = args.SourceServiceName
}
s, err := ctx.RegisterResource("aiven:index/serviceIntegration:ServiceIntegration", name, true, inputs, opts...)
if err != nil {
return nil, err
}
return &ServiceIntegration{s: s}, nil
}
// GetServiceIntegration gets an existing ServiceIntegration 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 GetServiceIntegration(ctx *pulumi.Context,
name string, id pulumi.ID, state *ServiceIntegrationState, opts ...pulumi.ResourceOpt) (*ServiceIntegration, error) {
inputs := make(map[string]interface{})
if state != nil {
inputs["destinationEndpointId"] = state.DestinationEndpointId
inputs["destinationServiceName"] = state.DestinationServiceName
inputs["integrationType"] = state.IntegrationType
inputs["logsUserConfig"] = state.LogsUserConfig
inputs["mirrormakerUserConfig"] = state.MirrormakerUserConfig
inputs["project"] = state.Project
inputs["sourceEndpointId"] = state.SourceEndpointId
inputs["sourceServiceName"] = state.SourceServiceName
}
s, err := ctx.ReadResource("aiven:index/serviceIntegration:ServiceIntegration", name, id, inputs, opts...)
if err != nil {
return nil, err
}
return &ServiceIntegration{s: s}, nil
}
// URN is this resource's unique name assigned by Pulumi.
func (r *ServiceIntegration) URN() pulumi.URNOutput {
return r.s.URN()
}
// ID is this resource's unique identifier assigned by its provider.
func (r *ServiceIntegration) ID() pulumi.IDOutput {
return r.s.ID()
}
// Destination endpoint for the integration (if any)
func (r *ServiceIntegration) DestinationEndpointId() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["destinationEndpointId"])
}
// Destination service for the integration (if any)
func (r *ServiceIntegration) DestinationServiceName() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["destinationServiceName"])
}
// Type of the service integration
func (r *ServiceIntegration) IntegrationType() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["integrationType"])
}
// Log integration specific user configurable settings
func (r *ServiceIntegration) LogsUserConfig() pulumi.Output {
return r.s.State["logsUserConfig"]
}
// Mirrormaker integration specific user configurable settings
func (r *ServiceIntegration) MirrormakerUserConfig() pulumi.Output {
return r.s.State["mirrormakerUserConfig"]
}
// Project the integration belongs to
func (r *ServiceIntegration) Project() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["project"])
}
// Source endpoint for the integration (if any)
func (r *ServiceIntegration) SourceEndpointId() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["sourceEndpointId"])
}
// Source service for the integration (if any)
func (r *ServiceIntegration) SourceServiceName() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["sourceServiceName"])
}
// Input properties used for looking up and filtering ServiceIntegration resources.
type ServiceIntegrationState struct {
// Destination endpoint for the integration (if any)
DestinationEndpointId interface{}
// Destination service for the integration (if any)
DestinationServiceName interface{}
// Type of the service integration
IntegrationType interface{}
// Log integration specific user configurable settings
LogsUserConfig interface{}
// Mirrormaker integration specific user configurable settings
MirrormakerUserConfig interface{}
// Project the integration belongs to
Project interface{}
// Source endpoint for the integration (if any)
SourceEndpointId interface{}
// Source service for the integration (if any)
SourceServiceName interface{}
}
// The set of arguments for constructing a ServiceIntegration resource.
type ServiceIntegrationArgs struct {
// Destination endpoint for the integration (if any)
DestinationEndpointId interface{}
// Destination service for the integration (if any)
DestinationServiceName interface{}
// Type of the service integration
IntegrationType interface{}
// Log integration specific user configurable settings
LogsUserConfig interface{}
// Mirrormaker integration specific user configurable settings
MirrormakerUserConfig interface{}
// Project the integration belongs to
Project interface{}
// Source endpoint for the integration (if any)
SourceEndpointId interface{}
// Source service for the integration (if any)
SourceServiceName interface{}
}