{"record":{"id":"1239592e859d955a","repo":"kubernetes/kops","slug":"describing-instance-type-q-in-region-q-w-123959","errorCode":null,"errorMessage":"describing instance type %q in region %q: %w","messagePattern":"describing instance type %q in region %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/awsup/machine_types.go","lineNumber":48,"sourceCode":"\tGPU               bool\n\tInstanceENIs      int32\n\tInstanceIPsPerENI int32\n}\n\n// GetMachineTypeInfo calls ec2.DescribeInstanceTypes to get information for a particular instance type, caching the result.\nfunc (c *Cloud) GetMachineTypeInfo(ctx context.Context, machineType ec2types.InstanceType) (*MachineTypeInfo, error) {\n\tclients.mutex.Lock()\n\tdefer clients.mutex.Unlock()\n\n\tif info, ok := clients.machineTypes[machineType]; ok {\n\t\treturn info, nil\n\t}\n\n\tresp, err := clients.ec2.DescribeInstanceTypes(ctx, &ec2.DescribeInstanceTypesInput{\n\t\tInstanceTypes: []ec2types.InstanceType{machineType},\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"describing instance type %q in region %q: %w\", machineType, c.region, err)\n\t}\n\tif len(resp.InstanceTypes) != 1 {\n\t\treturn nil, fmt.Errorf(\"instance type %q not found in region %q\", machineType, c.region)\n\t}\n\tinfo := resp.InstanceTypes[0]\n\n\tmachine := &MachineTypeInfo{\n\t\tGPU:               info.GpuInfo != nil,\n\t\tInstanceENIs:      aws.ToInt32(info.NetworkInfo.MaximumNetworkInterfaces),\n\t\tInstanceIPsPerENI: aws.ToInt32(info.NetworkInfo.Ipv4AddressesPerInterface),\n\t}\n\n\tif clients.machineTypes == nil {\n\t\tclients.machineTypes = make(map[ec2types.InstanceType]*MachineTypeInfo)\n\t}\n\tclients.machineTypes[machineType] = machine\n\n\treturn machine, nil","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/awsup/machine_types.go#L30-L66","documentation":"Error \"describing instance type %q in region %q: %w\" thrown in kubernetes/kops.","triggerScenarios":"Thrown at upup/pkg/fi/nodeup/awsup/machine_types.go:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}