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

Function decodeExternalService

internal/pulumi/resources/aws/ecs.go:304–326  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

302// decodeExternalService produces a pricing query for an EXTERNAL-launched service.
303// External instances are registered from on-premises or other environments.
304func 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"

Callers 1

DecodeECSServiceFunction · 0.85

Calls 3

mockedPropFunction · 0.85
copyPropsFunction · 0.85
ecsEntryFunction · 0.85

Tested by

no test coverage detected