decodeExternalService produces a pricing query for an EXTERNAL-launched service. External instances are registered from on-premises or other environments.
( record resources.ResourceRecord, region, inputsJSON string, props map[string]string, )
| 302 | // decodeExternalService produces a pricing query for an EXTERNAL-launched service. |
| 303 | // External instances are registered from on-premises or other environments. |
| 304 | func decodeExternalService( |
| 305 | record resources.ResourceRecord, |
| 306 | region, inputsJSON string, |
| 307 | props map[string]string, |
| 308 | ) []resources.DecodedResource { |
| 309 | externalInstanceType := mockedProp(record, "externalInstanceType") |
| 310 | if externalInstanceType == "" { |
| 311 | // Fall back to a generic external instance type when not specified. |
| 312 | externalInstanceType = "external" |
| 313 | } |
| 314 | |
| 315 | attrs := map[string]string{ |
| 316 | "operation": "AddExternalInstance", |
| 317 | "externalInstanceType": externalInstanceType, |
| 318 | } |
| 319 | |
| 320 | p := copyProps(props) |
| 321 | p["externalInstanceType"] = externalInstanceType |
| 322 | |
| 323 | return []resources.DecodedResource{ |
| 324 | ecsEntry(record, region, inputsJSON, "External Instance", "Compute", attrs, p), |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | // decodeEC2LaunchTypeService produces a vCPU pricing query for an EC2-launched |
| 329 | // ECS service. AWS charges per vCPU hour under productFamily "Compute Metering" |
no test coverage detected