-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.ts
318 lines (296 loc) · 11.2 KB
/
index.ts
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
// https://www.terraform.io/docs/providers/aws/r/api_gateway_method
// generated from terraform resource schema
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
// Configuration
export interface ApiGatewayMethodConfig extends cdktf.TerraformMetaArguments {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#api_key_required ApiGatewayMethod#api_key_required}
*/
readonly apiKeyRequired?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#authorization ApiGatewayMethod#authorization}
*/
readonly authorization: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#authorization_scopes ApiGatewayMethod#authorization_scopes}
*/
readonly authorizationScopes?: string[];
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#authorizer_id ApiGatewayMethod#authorizer_id}
*/
readonly authorizerId?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#http_method ApiGatewayMethod#http_method}
*/
readonly httpMethod: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#id ApiGatewayMethod#id}
*
* Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2.
* If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.
*/
readonly id?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#operation_name ApiGatewayMethod#operation_name}
*/
readonly operationName?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#request_models ApiGatewayMethod#request_models}
*/
readonly requestModels?: { [key: string]: string };
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#request_parameters ApiGatewayMethod#request_parameters}
*/
readonly requestParameters?: { [key: string]: (boolean | cdktf.IResolvable) };
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#request_validator_id ApiGatewayMethod#request_validator_id}
*/
readonly requestValidatorId?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#resource_id ApiGatewayMethod#resource_id}
*/
readonly resourceId: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method#rest_api_id ApiGatewayMethod#rest_api_id}
*/
readonly restApiId: string;
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method aws_api_gateway_method}
*/
export class ApiGatewayMethod extends cdktf.TerraformResource {
// =================
// STATIC PROPERTIES
// =================
public static readonly tfResourceType = "aws_api_gateway_method";
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_method aws_api_gateway_method} Resource
*
* @param scope The scope in which to define this construct
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
* @param options ApiGatewayMethodConfig
*/
public constructor(scope: Construct, id: string, config: ApiGatewayMethodConfig) {
super(scope, id, {
terraformResourceType: 'aws_api_gateway_method',
terraformGeneratorMetadata: {
providerName: 'aws',
providerVersion: '4.46.0',
providerVersionConstraint: '~> 4.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
this._apiKeyRequired = config.apiKeyRequired;
this._authorization = config.authorization;
this._authorizationScopes = config.authorizationScopes;
this._authorizerId = config.authorizerId;
this._httpMethod = config.httpMethod;
this._id = config.id;
this._operationName = config.operationName;
this._requestModels = config.requestModels;
this._requestParameters = config.requestParameters;
this._requestValidatorId = config.requestValidatorId;
this._resourceId = config.resourceId;
this._restApiId = config.restApiId;
}
// ==========
// ATTRIBUTES
// ==========
// api_key_required - computed: false, optional: true, required: false
private _apiKeyRequired?: boolean | cdktf.IResolvable;
public get apiKeyRequired() {
return this.getBooleanAttribute('api_key_required');
}
public set apiKeyRequired(value: boolean | cdktf.IResolvable) {
this._apiKeyRequired = value;
}
public resetApiKeyRequired() {
this._apiKeyRequired = undefined;
}
// Temporarily expose input value. Use with caution.
public get apiKeyRequiredInput() {
return this._apiKeyRequired;
}
// authorization - computed: false, optional: false, required: true
private _authorization?: string;
public get authorization() {
return this.getStringAttribute('authorization');
}
public set authorization(value: string) {
this._authorization = value;
}
// Temporarily expose input value. Use with caution.
public get authorizationInput() {
return this._authorization;
}
// authorization_scopes - computed: false, optional: true, required: false
private _authorizationScopes?: string[];
public get authorizationScopes() {
return cdktf.Fn.tolist(this.getListAttribute('authorization_scopes'));
}
public set authorizationScopes(value: string[]) {
this._authorizationScopes = value;
}
public resetAuthorizationScopes() {
this._authorizationScopes = undefined;
}
// Temporarily expose input value. Use with caution.
public get authorizationScopesInput() {
return this._authorizationScopes;
}
// authorizer_id - computed: false, optional: true, required: false
private _authorizerId?: string;
public get authorizerId() {
return this.getStringAttribute('authorizer_id');
}
public set authorizerId(value: string) {
this._authorizerId = value;
}
public resetAuthorizerId() {
this._authorizerId = undefined;
}
// Temporarily expose input value. Use with caution.
public get authorizerIdInput() {
return this._authorizerId;
}
// http_method - computed: false, optional: false, required: true
private _httpMethod?: string;
public get httpMethod() {
return this.getStringAttribute('http_method');
}
public set httpMethod(value: string) {
this._httpMethod = value;
}
// Temporarily expose input value. Use with caution.
public get httpMethodInput() {
return this._httpMethod;
}
// id - computed: true, optional: true, required: false
private _id?: string;
public get id() {
return this.getStringAttribute('id');
}
public set id(value: string) {
this._id = value;
}
public resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
public get idInput() {
return this._id;
}
// operation_name - computed: false, optional: true, required: false
private _operationName?: string;
public get operationName() {
return this.getStringAttribute('operation_name');
}
public set operationName(value: string) {
this._operationName = value;
}
public resetOperationName() {
this._operationName = undefined;
}
// Temporarily expose input value. Use with caution.
public get operationNameInput() {
return this._operationName;
}
// request_models - computed: false, optional: true, required: false
private _requestModels?: { [key: string]: string };
public get requestModels() {
return this.getStringMapAttribute('request_models');
}
public set requestModels(value: { [key: string]: string }) {
this._requestModels = value;
}
public resetRequestModels() {
this._requestModels = undefined;
}
// Temporarily expose input value. Use with caution.
public get requestModelsInput() {
return this._requestModels;
}
// request_parameters - computed: false, optional: true, required: false
private _requestParameters?: { [key: string]: (boolean | cdktf.IResolvable) };
public get requestParameters() {
return this.getBooleanMapAttribute('request_parameters');
}
public set requestParameters(value: { [key: string]: (boolean | cdktf.IResolvable) }) {
this._requestParameters = value;
}
public resetRequestParameters() {
this._requestParameters = undefined;
}
// Temporarily expose input value. Use with caution.
public get requestParametersInput() {
return this._requestParameters;
}
// request_validator_id - computed: false, optional: true, required: false
private _requestValidatorId?: string;
public get requestValidatorId() {
return this.getStringAttribute('request_validator_id');
}
public set requestValidatorId(value: string) {
this._requestValidatorId = value;
}
public resetRequestValidatorId() {
this._requestValidatorId = undefined;
}
// Temporarily expose input value. Use with caution.
public get requestValidatorIdInput() {
return this._requestValidatorId;
}
// resource_id - computed: false, optional: false, required: true
private _resourceId?: string;
public get resourceId() {
return this.getStringAttribute('resource_id');
}
public set resourceId(value: string) {
this._resourceId = value;
}
// Temporarily expose input value. Use with caution.
public get resourceIdInput() {
return this._resourceId;
}
// rest_api_id - computed: false, optional: false, required: true
private _restApiId?: string;
public get restApiId() {
return this.getStringAttribute('rest_api_id');
}
public set restApiId(value: string) {
this._restApiId = value;
}
// Temporarily expose input value. Use with caution.
public get restApiIdInput() {
return this._restApiId;
}
// =========
// SYNTHESIS
// =========
protected synthesizeAttributes(): { [name: string]: any } {
return {
api_key_required: cdktf.booleanToTerraform(this._apiKeyRequired),
authorization: cdktf.stringToTerraform(this._authorization),
authorization_scopes: cdktf.listMapper(cdktf.stringToTerraform, false)(this._authorizationScopes),
authorizer_id: cdktf.stringToTerraform(this._authorizerId),
http_method: cdktf.stringToTerraform(this._httpMethod),
id: cdktf.stringToTerraform(this._id),
operation_name: cdktf.stringToTerraform(this._operationName),
request_models: cdktf.hashMapper(cdktf.stringToTerraform)(this._requestModels),
request_parameters: cdktf.hashMapper(cdktf.booleanToTerraform)(this._requestParameters),
request_validator_id: cdktf.stringToTerraform(this._requestValidatorId),
resource_id: cdktf.stringToTerraform(this._resourceId),
rest_api_id: cdktf.stringToTerraform(this._restApiId),
};
}
}