/
sfdcInstance.go
225 lines (189 loc) · 8.85 KB
/
sfdcInstance.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
215
216
217
218
219
220
221
222
223
224
225
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1alpha
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates an sfdc instance record. Store the sfdc instance in Spanner. Returns the sfdc instance.
// Auto-naming is currently not supported for this resource.
type SfdcInstance struct {
pulumi.CustomResourceState
// A list of AuthConfigs that can be tried to open the channel to SFDC
AuthConfigId pulumi.StringArrayOutput `pulumi:"authConfigId"`
// Time when the instance is created
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// Time when the instance was deleted. Empty if not deleted.
DeleteTime pulumi.StringOutput `pulumi:"deleteTime"`
// A description of the sfdc instance.
Description pulumi.StringOutput `pulumi:"description"`
// User selected unique name/alias to easily reference an instance.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
Location pulumi.StringOutput `pulumi:"location"`
// Resource name of the SFDC instance projects/{project}/locations/{location}/sfdcInstances/{sfdcInstance}.
Name pulumi.StringOutput `pulumi:"name"`
ProductId pulumi.StringOutput `pulumi:"productId"`
Project pulumi.StringOutput `pulumi:"project"`
// URL used for API calls after authentication (the login authority is configured within the referenced AuthConfig).
ServiceAuthority pulumi.StringOutput `pulumi:"serviceAuthority"`
// The SFDC Org Id. This is defined in salesforce.
SfdcOrgId pulumi.StringOutput `pulumi:"sfdcOrgId"`
// Time when the instance was last updated
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
}
// NewSfdcInstance registers a new resource with the given unique name, arguments, and options.
func NewSfdcInstance(ctx *pulumi.Context,
name string, args *SfdcInstanceArgs, opts ...pulumi.ResourceOption) (*SfdcInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ProductId == nil {
return nil, errors.New("invalid value for required argument 'ProductId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"location",
"productId",
"project",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SfdcInstance
err := ctx.RegisterResource("google-native:integrations/v1alpha:SfdcInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSfdcInstance gets an existing SfdcInstance 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 GetSfdcInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SfdcInstanceState, opts ...pulumi.ResourceOption) (*SfdcInstance, error) {
var resource SfdcInstance
err := ctx.ReadResource("google-native:integrations/v1alpha:SfdcInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SfdcInstance resources.
type sfdcInstanceState struct {
}
type SfdcInstanceState struct {
}
func (SfdcInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*sfdcInstanceState)(nil)).Elem()
}
type sfdcInstanceArgs struct {
// A list of AuthConfigs that can be tried to open the channel to SFDC
AuthConfigId []string `pulumi:"authConfigId"`
// A description of the sfdc instance.
Description *string `pulumi:"description"`
// User selected unique name/alias to easily reference an instance.
DisplayName *string `pulumi:"displayName"`
Location *string `pulumi:"location"`
// Resource name of the SFDC instance projects/{project}/locations/{location}/sfdcInstances/{sfdcInstance}.
Name *string `pulumi:"name"`
ProductId string `pulumi:"productId"`
Project *string `pulumi:"project"`
// URL used for API calls after authentication (the login authority is configured within the referenced AuthConfig).
ServiceAuthority *string `pulumi:"serviceAuthority"`
// The SFDC Org Id. This is defined in salesforce.
SfdcOrgId *string `pulumi:"sfdcOrgId"`
}
// The set of arguments for constructing a SfdcInstance resource.
type SfdcInstanceArgs struct {
// A list of AuthConfigs that can be tried to open the channel to SFDC
AuthConfigId pulumi.StringArrayInput
// A description of the sfdc instance.
Description pulumi.StringPtrInput
// User selected unique name/alias to easily reference an instance.
DisplayName pulumi.StringPtrInput
Location pulumi.StringPtrInput
// Resource name of the SFDC instance projects/{project}/locations/{location}/sfdcInstances/{sfdcInstance}.
Name pulumi.StringPtrInput
ProductId pulumi.StringInput
Project pulumi.StringPtrInput
// URL used for API calls after authentication (the login authority is configured within the referenced AuthConfig).
ServiceAuthority pulumi.StringPtrInput
// The SFDC Org Id. This is defined in salesforce.
SfdcOrgId pulumi.StringPtrInput
}
func (SfdcInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*sfdcInstanceArgs)(nil)).Elem()
}
type SfdcInstanceInput interface {
pulumi.Input
ToSfdcInstanceOutput() SfdcInstanceOutput
ToSfdcInstanceOutputWithContext(ctx context.Context) SfdcInstanceOutput
}
func (*SfdcInstance) ElementType() reflect.Type {
return reflect.TypeOf((**SfdcInstance)(nil)).Elem()
}
func (i *SfdcInstance) ToSfdcInstanceOutput() SfdcInstanceOutput {
return i.ToSfdcInstanceOutputWithContext(context.Background())
}
func (i *SfdcInstance) ToSfdcInstanceOutputWithContext(ctx context.Context) SfdcInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(SfdcInstanceOutput)
}
type SfdcInstanceOutput struct{ *pulumi.OutputState }
func (SfdcInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SfdcInstance)(nil)).Elem()
}
func (o SfdcInstanceOutput) ToSfdcInstanceOutput() SfdcInstanceOutput {
return o
}
func (o SfdcInstanceOutput) ToSfdcInstanceOutputWithContext(ctx context.Context) SfdcInstanceOutput {
return o
}
// A list of AuthConfigs that can be tried to open the channel to SFDC
func (o SfdcInstanceOutput) AuthConfigId() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringArrayOutput { return v.AuthConfigId }).(pulumi.StringArrayOutput)
}
// Time when the instance is created
func (o SfdcInstanceOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// Time when the instance was deleted. Empty if not deleted.
func (o SfdcInstanceOutput) DeleteTime() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.DeleteTime }).(pulumi.StringOutput)
}
// A description of the sfdc instance.
func (o SfdcInstanceOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// User selected unique name/alias to easily reference an instance.
func (o SfdcInstanceOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
func (o SfdcInstanceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Resource name of the SFDC instance projects/{project}/locations/{location}/sfdcInstances/{sfdcInstance}.
func (o SfdcInstanceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o SfdcInstanceOutput) ProductId() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.ProductId }).(pulumi.StringOutput)
}
func (o SfdcInstanceOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// URL used for API calls after authentication (the login authority is configured within the referenced AuthConfig).
func (o SfdcInstanceOutput) ServiceAuthority() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.ServiceAuthority }).(pulumi.StringOutput)
}
// The SFDC Org Id. This is defined in salesforce.
func (o SfdcInstanceOutput) SfdcOrgId() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.SfdcOrgId }).(pulumi.StringOutput)
}
// Time when the instance was last updated
func (o SfdcInstanceOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *SfdcInstance) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SfdcInstanceInput)(nil)).Elem(), &SfdcInstance{})
pulumi.RegisterOutputType(SfdcInstanceOutput{})
}