DecodeApiCache decodes an AppSync ApiCache resource. The cache instance type maps to a cachememorysize pricing attribute.
(record resources.ResourceRecord, region, inputsJSON string)
| 80 | // DecodeApiCache decodes an AppSync ApiCache resource. |
| 81 | // The cache instance type maps to a cachememorysize pricing attribute. |
| 82 | func DecodeApiCache(record resources.ResourceRecord, region, inputsJSON string) []resources.DecodedResource { |
| 83 | cacheType := ExtractInput(record.Inputs, "type") |
| 84 | memorySize := cacheTypeToMemorySize(cacheType) |
| 85 | |
| 86 | props := map[string]string{"type": record.Type} |
| 87 | if cacheType != "" { |
| 88 | props["cacheType"] = cacheType |
| 89 | props["cachememorysize"] = memorySize |
| 90 | } |
| 91 | if v := ExtractInput(record.Inputs, "apiCachingBehavior"); v != "" { |
| 92 | props["apiCachingBehavior"] = v |
| 93 | } |
| 94 | |
| 95 | return []resources.DecodedResource{ |
| 96 | appSyncEntry(record, region, inputsJSON, "", |
| 97 | map[string]string{ |
| 98 | "productFamily": "API Calls", |
| 99 | "cachememorysize": memorySize, |
| 100 | }, |
| 101 | props), |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | // DecodeAppSyncApi decodes an AppSync Event API (aws:appsync/api:Api) resource. |
| 106 | // The Event API produces 4 pricing dimensions: |
nothing calls this directly
no test coverage detected