ddbEntry is a helper to build a DecodedResource for DynamoDB pricing queries.
(record resources.ResourceRecord, region, inputsJSON, subLabel, productFamily string, attrs, props map[string]string)
| 16 | |
| 17 | // ddbEntry is a helper to build a DecodedResource for DynamoDB pricing queries. |
| 18 | func ddbEntry(record resources.ResourceRecord, region, inputsJSON, subLabel, productFamily string, attrs, props map[string]string) resources.DecodedResource { |
| 19 | a := map[string]string{"productFamily": productFamily, "servicecode": dynamoServiceCode} |
| 20 | for k, v := range attrs { |
| 21 | a[k] = v |
| 22 | } |
| 23 | return resources.DecodedResource{ |
| 24 | Provider: "aws", |
| 25 | Region: region, |
| 26 | Service: dynamoService, |
| 27 | Name: record.Name, |
| 28 | SubLabel: subLabel, |
| 29 | RawType: record.Type, |
| 30 | Attrs: a, |
| 31 | Props: props, |
| 32 | InputsJSON: inputsJSON, |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | // tableClass returns "STANDARD" or "STANDARD_IA" from inputs, defaulting to STANDARD. |
| 37 | func tableClass(record resources.ResourceRecord) string { |
no outgoing calls
no test coverage detected