MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / DecodeApiCache

Function DecodeApiCache

internal/pulumi/resources/aws/appsync.go:82–103  ·  view source on GitHub ↗

DecodeApiCache decodes an AppSync ApiCache resource. The cache instance type maps to a cachememorysize pricing attribute.

(record resources.ResourceRecord, region, inputsJSON string)

Source from the content-addressed store, hash-verified

80// DecodeApiCache decodes an AppSync ApiCache resource.
81// The cache instance type maps to a cachememorysize pricing attribute.
82func 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:

Callers

nothing calls this directly

Calls 3

ExtractInputFunction · 0.85
cacheTypeToMemorySizeFunction · 0.85
appSyncEntryFunction · 0.85

Tested by

no test coverage detected