Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit aeeca02

Browse files
authored
Merge pull request #4608 from sbiscigl/fix-codegen-accountid
Fixes codegen for multiple account ids
2 parents 13e3d77 + fbad6e2 commit aeeca02

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

private/model/api/endpoint_arn.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,15 @@ const accountIDWithARNShapeTmplDef = `
7676
{{ range $_, $name := $.MemberNames -}}
7777
{{ $elem := index $.MemberRefs $name -}}
7878
{{ if $elem.AccountIDMemberWithARN -}}
79-
// updateAccountID returns a pointer to a modified copy of input,
79+
{{ $FunctionName := $name }}
80+
{{ if eq $name "AccountId" }}
81+
{{ $FunctionName = "AccountID" }}
82+
{{ end }}
83+
// update{{ $FunctionName }} returns a pointer to a modified copy of input,
8084
// if account id is not provided, we update the account id in modified input
8185
// if account id is provided, but doesn't match with the one in ARN, we throw an error
8286
// if account id is not updated, we return nil. Note that original input is not modified.
83-
func (s {{ $.ShapeName }}) updateAccountID(accountId string) (interface{}, error) {
87+
func (s {{ $.ShapeName }}) update{{ $FunctionName }}(accountId string) (interface{}, error) {
8488
if s.{{ $name }} == nil {
8589
s.{{ $name }} = aws.String(accountId)
8690
return &s, nil

0 commit comments

Comments
 (0)