Skip to content

Commit 6ac4ed4

Browse files
a-hilalyNicholas Thomson
authored andcommitted
Add primary identifiers for ReadMany operations (aws-controllers-k8s#116)
Related to aws-controllers-k8s#115 For some controllers we use `ReadMany` operations to read resource current state. For these operations we need to lookup for identifiers ending with `Names` and not `Name`. e.g `RepositoryNames` in `DescribeRepositories` operation. Description of changes: - Add primary identifiers for `ReadMany` operations By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 7237f6d commit 6ac4ed4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/generate/code/set_resource.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,11 @@ func SetResourceIdentifiers(
860860
if primaryIdentifier == "" {
861861
primaryIdentifierLookup := []string{
862862
"Name",
863+
"Names",
863864
r.Names.Original + "Name",
865+
r.Names.Original + "Names",
864866
r.Names.Original + "Id",
867+
r.Names.Original + "Ids",
865868
}
866869

867870
for _, memberName := range inputShape.MemberNames() {

0 commit comments

Comments
 (0)