Skip to content

Implement resource Template #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2024-10-10T04:11:56Z"
build_hash: 36c2d234498c2bc4f60773ab8df632af4067f43b
go_version: go1.23.2
version: v0.39.1
api_directory_checksum: e6e32cdfd8eea9dc8ced5c64c857335c872e49e2
build_date: "2024-11-15T11:47:38Z"
build_hash: 9715a2a715317a76ae83825294ca50cde9afd97b
go_version: go1.22.5
version: v0.39.1-4-g9715a2a
api_directory_checksum: 67d89a73243311741c0e2212ee7d58a873740194
api_version: v1alpha1
aws_sdk_go_version: v1.55.5
generator_config_info:
file_checksum: fc6b419506aa1e1e3d52fc1512129f10ffbc9b6a
file_checksum: 83acbeaf92972bb59e3dd0b095cdc200cfc6c184
original_file_name: generator.yaml
last_modification:
reason: API generation
70 changes: 70 additions & 0 deletions apis/v1alpha1/configuration_set.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

125 changes: 121 additions & 4 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,127 @@
ignore:
resource_names:
- ConfigurationSet
# - ConfigurationSet
- ConfigurationSetEventDestination
- CustomVerificationEmailTemplate
- ReceiptFilter
- ReceiptRule
- ReceiptRuleSet
- Template
# - ReceiptRule
# - ReceiptRuleSet
# - Template

field_paths:
- CreateConfigurationSetInput.ConfigurationSet
- CreateTemplateInput.Template
model_name: email

resources:
ConfigurationSet:
fields:
Name:
is_primary_key: true
is_immutable: true
type: string
list_operation:
match_fields:
- Name
update_operation:
custom_method_name: customUpdate
renames:
operations:
DescribeConfigurationSet:
input_fields:
ConfigurationSetName: Name
DeleteConfigurationSet:
input_fields:
ConfigurationSetName: Name
tags:
ignore: true
exceptions:
terminal_codes:
- ConfigurationSetAlreadyExists
- InvalidConfigurationSet
hooks:
sdk_create_post_build_request:
template_path: hooks/configuration_set/sdk_create_post_build_request.go.tpl
sdk_read_one_post_request:
template_path: hooks/configuration_set/sdk_read_one_post_request.go.tpl

ReceiptRuleSet:
fields:
RuleSetName:
is_primary_key: true
is_immutable: true
update_operation:
custom_method_name: customUpdate
tags:
ignore: true
exceptions:
terminal_codes:
- AlreadyExists
hooks:
sdk_read_one_post_request:
template_path: hooks/receipt_rule_set/sdk_read_one_post_request.go.tpl

ReceiptRule:
find_operation:
custom_method_name: customFind
fields:
Rule.Name:
is_immutable: true
is_required: true
RuleSetName:
is_primary_key: true
is_immutable: true
is_required: true
references:
resource: ReceiptRuleSet
path: Spec.RuleSetName
tags:
ignore: true
exceptions:
terminal_codes:
- AlreadyExists
- InvalidLambdaFunction
- InvalidS3Configuration
- InvalidSnsTopic
- RuleSetDoesNotExist
hooks:
sdk_file_end:
template_path: hooks/receipt_rule/sdk_file_end.go.tpl
sdk_delete_post_build_request:
template_path: hooks/receipt_rule/sdk_delete_post_build_request.go.tpl

Template:
fields:
Name:
type: string
is_primary_key: true
is_immutable: true
HTMLPart:
type: string
SubjectPart:
type: string
TextPart:
type: string
tags:
ignore: true
exceptions:
terminal_codes:
- AlreadyExists
- InvalidTemplate
renames:
operations:
GetTemplate:
input_fields:
TemplateName: Name
output_fields:
HtmlPart: HTMLPart
DeleteTemplate:
input_fields:
TemplateName: Name
hooks:
sdk_create_post_build_request:
template_path: hooks/template/sdk_create_post_build_request.go.tpl
sdk_read_one_post_request:
template_path: hooks/template/sdk_read_one_post_request.go.tpl
sdk_update_post_build_request:
template_path: hooks/template/sdk_update_post_build_request.go.tpl
86 changes: 86 additions & 0 deletions apis/v1alpha1/receipt_rule.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions apis/v1alpha1/receipt_rule_set.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading