-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgenerator.yaml
More file actions
217 lines (215 loc) · 6.48 KB
/
generator.yaml
File metadata and controls
217 lines (215 loc) · 6.48 KB
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
operations:
CreateBackupPlan:
input_wrapper_field_path: BackupPlan
UpdateBackupPlan:
input_wrapper_field_path: BackupPlan
GetBackupPlan:
output_wrapper_field_path: BackupPlan
CreateBackupSelection:
input_wrapper_field_path: BackupSelection
GetBackupSelection:
output_wrapper_field_path: BackupSelection
ignore:
resource_names:
- Framework
- LegalHold
- LogicallyAirGappedBackupVault
- ReportPlan
- RestoreAccessBackupVault
- RestoreTestingPlan
- RestoreTestingSelection
- TieringConfiguration
field_paths: []
resources:
BackupVault:
ignore_idempotency_token: true
fields:
Name:
is_primary_key: true
is_immutable: true
# Cross-resource reference to KMS Key for encryption.
# Set at vault creation time and cannot be changed afterward.
EncryptionKeyARN:
is_immutable: true
references:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
# Read-only status fields from DescribeBackupVault
EncryptionKeyType:
is_read_only: true
from:
operation: DescribeBackupVault
path: EncryptionKeyType
LockDate:
is_read_only: true
from:
operation: DescribeBackupVault
path: LockDate
Locked:
is_read_only: true
from:
operation: DescribeBackupVault
path: Locked
MaxRetentionDays:
is_read_only: true
from:
operation: DescribeBackupVault
path: MaxRetentionDays
MinRetentionDays:
is_read_only: true
from:
operation: DescribeBackupVault
path: MinRetentionDays
NumberOfRecoveryPoints:
is_read_only: true
from:
operation: DescribeBackupVault
path: NumberOfRecoveryPoints
# NOTE: VaultState is intentionally excluded. The DescribeBackupVault
# API only returns it for logically air-gapped vaults (which are in the
# ignore list). For standard BACKUP_VAULT types it is always empty.
VaultType:
is_read_only: true
from:
operation: DescribeBackupVault
path: VaultType
# There is no UpdateBackupVault API. Fields must be updated via separate APIs.
update_operation:
custom_method_name: customUpdateBackupVault
hooks:
sdk_read_one_post_set_output:
template_path: hooks/backup_vault/sdk_read_one_post_set_output.go.tpl
renames:
operations:
CreateBackupVault:
input_fields:
BackupVaultName: Name
BackupVaultTags: Tags
DeleteBackupVault:
input_fields:
BackupVaultName: Name
DescribeBackupVault:
input_fields:
BackupVaultName: Name
output_fields:
BackupVaultName: Name
exceptions:
errors:
404:
code: AccessDeniedException
terminal_codes:
- InvalidParameterValueException
- MissingParameterValueException
- InvalidRequestException
BackupPlan:
ignore_idempotency_token: true
hooks:
sdk_create_post_build_request:
template_path: hooks/backup_plan/sdk_create_post_build_request.go.tpl
sdk_read_one_post_set_output:
template_path: hooks/backup_plan/sdk_read_one_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/backup_plan/sdk_update_pre_build_request.go.tpl
sdk_update_post_build_request:
template_path: hooks/backup_plan/sdk_update_post_build_request.go.tpl
fields:
ID:
is_primary_key: true
is_immutable: true
LastExecutionDate:
is_read_only: true
from:
operation: GetBackupPlan
path: LastExecutionDate
Tags:
type: "map[string]*string"
Rules.TargetBackupVaultName:
references:
resource: BackupVault
path: Spec.Name
Rules.CopyActions.DestinationBackupVaultARN:
references:
resource: BackupVault
path: Status.ACKResourceMetadata.ARN
renames:
operations:
CreateBackupPlan:
input_fields:
BackupPlanName: Name
BackupPlanTags: Tags
output_fields:
BackupPlanId: ID
UpdateBackupPlan:
input_fields:
BackupPlanName: Name
BackupPlanId: ID
GetBackupPlan:
input_fields:
BackupPlanId: ID
output_fields:
BackupPlanName: Name
BackupPlanId: ID
DeleteBackupPlan:
input_fields:
BackupPlanId: ID
exceptions:
errors:
404:
code: ResourceNotFoundException
terminal_codes:
- InvalidParameterValueException
- MissingParameterValueException
BackupSelection:
ignore_idempotency_token: true
# No UpdateBackupSelection API — selections are immutable (create/delete only)
update_operation:
custom_method_name: customUpdateBackupSelection
hooks:
sdk_create_post_build_request:
template_path: hooks/backup_selection/sdk_create_post_build_request.go.tpl
sdk_delete_post_build_request:
template_path: hooks/backup_selection/sdk_delete_post_build_request.go.tpl
sdk_read_one_post_set_output:
template_path: hooks/backup_selection/sdk_read_one_post_set_output.go.tpl
fields:
ID:
is_primary_key: true
# BackupPlanId is outside the input_wrapper_field_path (BackupSelection),
# so it's not automatically flattened into the spec. Define as a custom
# field with type so it appears in the spec.
BackupPlanID:
is_immutable: true
is_required: true
type: string
references:
resource: BackupPlan
path: Status.ID
IamRoleARN:
references:
resource: Role
service_name: iam
path: Status.ACKResourceMetadata.ARN
Conditions:
late_initialize:
skip_incomplete_check: {}
renames:
operations:
CreateBackupSelection:
input_fields:
SelectionName: Name
output_fields:
SelectionId: ID
GetBackupSelection:
output_fields:
SelectionName: Name
SelectionId: ID
exceptions:
errors:
404:
code: ResourceNotFoundException
terminal_codes:
- InvalidParameterValueException
- MissingParameterValueException
tags:
ignore: true