Skip to content

Commit 9f4786c

Browse files
authored
Merge pull request #7 from cPu1/resource/rest-api
Implement RestAPI resource
2 parents e0f0747 + 8d34d94 commit 9f4786c

38 files changed

+4387
-37
lines changed

apis/v1alpha1/ack-generate-metadata.yaml

100755100644
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2024-08-13T18:02:26Z"
3-
build_hash: 8b54e4295cb01d35cb83f4f10fcb700cd39dfa76
2+
build_date: "2024-08-27T13:04:03Z"
3+
build_hash: c30e0689877bfe2083e7b2f84e1c450d2ba9bf2e
44
go_version: go1.22.5
5-
version: v0.37.0
6-
api_directory_checksum: 32e6af78d724e0e9858849c91d8810441fac881b
5+
version: v0.38.0-2-gc30e068
6+
api_directory_checksum: 208cd7cf7ca8109cc239007c3a7a992a7fba7d8b
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.55.0
99
generator_config_info:
10-
file_checksum: b76b051143dc71c241b8f716f7868a927ee32057
10+
file_checksum: b8be6e7c7e6d6b64fe06c0caeb5d30cc5209b398
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,57 @@
11
ignore:
22
resource_names:
3-
- ApiKey
4-
- Authorizer
5-
- BasePathMapping
6-
- Deployment
7-
- DocumentationPart
8-
- DocumentationVersion
9-
- DomainName
10-
- Model
11-
- RequestValidator
12-
- Resource
13-
- RestApi
14-
- Stage
15-
- UsagePlan
16-
- UsagePlanKey
17-
- VpcLink
3+
- ApiKey
4+
- Authorizer
5+
- BasePathMapping
6+
- Deployment
7+
- DocumentationPart
8+
- DocumentationVersion
9+
- DomainName
10+
- Model
11+
- RequestValidator
12+
- Resource
13+
# - RestApi
14+
- Stage
15+
- UsagePlan
16+
- UsagePlanKey
17+
- VpcLink
18+
resources:
19+
# A PutRestApi call exists that allows updating an existing API with an input of external API definitions. Support for
20+
# this will be added based on customer interest.
21+
RestApi:
22+
fields:
23+
ID:
24+
is_primary_key: true
25+
EndpointConfiguration.VPCEndpointIDs:
26+
references:
27+
resource: VPCEndpoint
28+
service_name: ec2
29+
path: Status.VPCEndpointID
30+
CloneFrom:
31+
is_immutable: true
32+
Version:
33+
is_immutable: true
34+
renames:
35+
operations:
36+
GetRestApi:
37+
input_fields:
38+
RestApiId: Id
39+
UpdateRestApi:
40+
input_fields:
41+
RestApiId: Id
42+
DeleteRestApi:
43+
input_fields:
44+
RestApiId: Id
45+
hooks:
46+
sdk_update_pre_build_request:
47+
template_path: hooks/rest_api/sdk_update_pre_build_request.go.tpl
48+
sdk_update_post_build_request:
49+
template_path: hooks/rest_api/sdk_update_post_build_request.go.tpl
50+
delta_pre_compare:
51+
code: customPreCompare(a, b)
52+
exceptions:
53+
terminal_codes:
54+
- BadRequestException
55+
- ConflictException
56+
- NotFoundException
57+
- InvalidParameter

apis/v1alpha1/rest_api.go

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/types.go

Lines changed: 126 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)