-
Notifications
You must be signed in to change notification settings - Fork 17
/
sourceApiAssociation.go
218 lines (181 loc) · 9.54 KB
/
sourceApiAssociation.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
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appsync
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource Type definition for AWS::AppSync::SourceApiAssociation
type SourceApiAssociation struct {
pulumi.CustomResourceState
// ARN of the SourceApiAssociation.
AssociationArn pulumi.StringOutput `pulumi:"associationArn"`
// Id of the SourceApiAssociation.
AssociationId pulumi.StringOutput `pulumi:"associationId"`
// Description of the SourceApiAssociation.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Date of last schema successful merge.
LastSuccessfulMergeDate pulumi.StringOutput `pulumi:"lastSuccessfulMergeDate"`
// ARN of the Merged API in the association.
MergedApiArn pulumi.StringOutput `pulumi:"mergedApiArn"`
// GraphQLApiId of the Merged API in the association.
MergedApiId pulumi.StringOutput `pulumi:"mergedApiId"`
// Identifier of the Merged GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
MergedApiIdentifier pulumi.StringPtrOutput `pulumi:"mergedApiIdentifier"`
// ARN of the source API in the association.
SourceApiArn pulumi.StringOutput `pulumi:"sourceApiArn"`
// Customized configuration for SourceApiAssociation.
SourceApiAssociationConfig SourceApiAssociationConfigPtrOutput `pulumi:"sourceApiAssociationConfig"`
// Current status of SourceApiAssociation.
SourceApiAssociationStatus SourceApiAssociationStatusOutput `pulumi:"sourceApiAssociationStatus"`
// Current SourceApiAssociation status details.
SourceApiAssociationStatusDetail pulumi.StringOutput `pulumi:"sourceApiAssociationStatusDetail"`
// GraphQLApiId of the source API in the association.
SourceApiId pulumi.StringOutput `pulumi:"sourceApiId"`
// Identifier of the Source GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
SourceApiIdentifier pulumi.StringPtrOutput `pulumi:"sourceApiIdentifier"`
}
// NewSourceApiAssociation registers a new resource with the given unique name, arguments, and options.
func NewSourceApiAssociation(ctx *pulumi.Context,
name string, args *SourceApiAssociationArgs, opts ...pulumi.ResourceOption) (*SourceApiAssociation, error) {
if args == nil {
args = &SourceApiAssociationArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"mergedApiIdentifier",
"sourceApiIdentifier",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SourceApiAssociation
err := ctx.RegisterResource("aws-native:appsync:SourceApiAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSourceApiAssociation gets an existing SourceApiAssociation 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 GetSourceApiAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SourceApiAssociationState, opts ...pulumi.ResourceOption) (*SourceApiAssociation, error) {
var resource SourceApiAssociation
err := ctx.ReadResource("aws-native:appsync:SourceApiAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SourceApiAssociation resources.
type sourceApiAssociationState struct {
}
type SourceApiAssociationState struct {
}
func (SourceApiAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*sourceApiAssociationState)(nil)).Elem()
}
type sourceApiAssociationArgs struct {
// Description of the SourceApiAssociation.
Description *string `pulumi:"description"`
// Identifier of the Merged GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
MergedApiIdentifier *string `pulumi:"mergedApiIdentifier"`
// Customized configuration for SourceApiAssociation.
SourceApiAssociationConfig *SourceApiAssociationConfig `pulumi:"sourceApiAssociationConfig"`
// Identifier of the Source GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
SourceApiIdentifier *string `pulumi:"sourceApiIdentifier"`
}
// The set of arguments for constructing a SourceApiAssociation resource.
type SourceApiAssociationArgs struct {
// Description of the SourceApiAssociation.
Description pulumi.StringPtrInput
// Identifier of the Merged GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
MergedApiIdentifier pulumi.StringPtrInput
// Customized configuration for SourceApiAssociation.
SourceApiAssociationConfig SourceApiAssociationConfigPtrInput
// Identifier of the Source GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
SourceApiIdentifier pulumi.StringPtrInput
}
func (SourceApiAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*sourceApiAssociationArgs)(nil)).Elem()
}
type SourceApiAssociationInput interface {
pulumi.Input
ToSourceApiAssociationOutput() SourceApiAssociationOutput
ToSourceApiAssociationOutputWithContext(ctx context.Context) SourceApiAssociationOutput
}
func (*SourceApiAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**SourceApiAssociation)(nil)).Elem()
}
func (i *SourceApiAssociation) ToSourceApiAssociationOutput() SourceApiAssociationOutput {
return i.ToSourceApiAssociationOutputWithContext(context.Background())
}
func (i *SourceApiAssociation) ToSourceApiAssociationOutputWithContext(ctx context.Context) SourceApiAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(SourceApiAssociationOutput)
}
type SourceApiAssociationOutput struct{ *pulumi.OutputState }
func (SourceApiAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SourceApiAssociation)(nil)).Elem()
}
func (o SourceApiAssociationOutput) ToSourceApiAssociationOutput() SourceApiAssociationOutput {
return o
}
func (o SourceApiAssociationOutput) ToSourceApiAssociationOutputWithContext(ctx context.Context) SourceApiAssociationOutput {
return o
}
// ARN of the SourceApiAssociation.
func (o SourceApiAssociationOutput) AssociationArn() pulumi.StringOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringOutput { return v.AssociationArn }).(pulumi.StringOutput)
}
// Id of the SourceApiAssociation.
func (o SourceApiAssociationOutput) AssociationId() pulumi.StringOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringOutput { return v.AssociationId }).(pulumi.StringOutput)
}
// Description of the SourceApiAssociation.
func (o SourceApiAssociationOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Date of last schema successful merge.
func (o SourceApiAssociationOutput) LastSuccessfulMergeDate() pulumi.StringOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringOutput { return v.LastSuccessfulMergeDate }).(pulumi.StringOutput)
}
// ARN of the Merged API in the association.
func (o SourceApiAssociationOutput) MergedApiArn() pulumi.StringOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringOutput { return v.MergedApiArn }).(pulumi.StringOutput)
}
// GraphQLApiId of the Merged API in the association.
func (o SourceApiAssociationOutput) MergedApiId() pulumi.StringOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringOutput { return v.MergedApiId }).(pulumi.StringOutput)
}
// Identifier of the Merged GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
func (o SourceApiAssociationOutput) MergedApiIdentifier() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringPtrOutput { return v.MergedApiIdentifier }).(pulumi.StringPtrOutput)
}
// ARN of the source API in the association.
func (o SourceApiAssociationOutput) SourceApiArn() pulumi.StringOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringOutput { return v.SourceApiArn }).(pulumi.StringOutput)
}
// Customized configuration for SourceApiAssociation.
func (o SourceApiAssociationOutput) SourceApiAssociationConfig() SourceApiAssociationConfigPtrOutput {
return o.ApplyT(func(v *SourceApiAssociation) SourceApiAssociationConfigPtrOutput { return v.SourceApiAssociationConfig }).(SourceApiAssociationConfigPtrOutput)
}
// Current status of SourceApiAssociation.
func (o SourceApiAssociationOutput) SourceApiAssociationStatus() SourceApiAssociationStatusOutput {
return o.ApplyT(func(v *SourceApiAssociation) SourceApiAssociationStatusOutput { return v.SourceApiAssociationStatus }).(SourceApiAssociationStatusOutput)
}
// Current SourceApiAssociation status details.
func (o SourceApiAssociationOutput) SourceApiAssociationStatusDetail() pulumi.StringOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringOutput { return v.SourceApiAssociationStatusDetail }).(pulumi.StringOutput)
}
// GraphQLApiId of the source API in the association.
func (o SourceApiAssociationOutput) SourceApiId() pulumi.StringOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringOutput { return v.SourceApiId }).(pulumi.StringOutput)
}
// Identifier of the Source GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
func (o SourceApiAssociationOutput) SourceApiIdentifier() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SourceApiAssociation) pulumi.StringPtrOutput { return v.SourceApiIdentifier }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SourceApiAssociationInput)(nil)).Elem(), &SourceApiAssociation{})
pulumi.RegisterOutputType(SourceApiAssociationOutput{})
}