aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
68 stars 12 forks source link

GetInventory API does not support result type `InstanceDetailedInformation` #640

Open bigdatasourav opened 8 months ago

bigdatasourav commented 8 months ago

Describe the bug

In the latest CLI, the result type InstanceDetailedInformation is supported in GetInventory.

aws ssm list-inventory-entries --instance-id i-00xyxxyzxyz --type-name AWS:InstanceDetailedInformation
--
{ 
  "TypeName": "AWS:InstanceDetailedInformation", "InstanceId": "i-0023112313cevwss", "SchemaVersion": "1.0", "CaptureTime": 
 "2023-08-22T15:01:28Z", "Entries": [ { "CPUCores": "1", "CPUHyperThreadEnabled": "true", "CPUModel": "Intel(R) Xeon(R) CPU 
 E5-2686 v4 @ 2.30GHz", "CPUSockets": "1", "CPUSpeedMHz": "2300", "CPUs": "2", "KernelVersion": "5.10.186- 179.751.amzn2.x86_64", "OSServicePack": "" } ] 
}

But in API, I am getting the below error -

Error: operation error SSM: GetInventory, https response error StatusCode: 400, RequestID: ac7b65c2-c644-4191-82fd-7789e06669d2, InvalidResultAttributeException: Result type name AWS:InstanceDetailedInformation is not supported. Supported type names are: AWS:InstanceInformation, AWS:PatchSummary. Default result type name is AWS:InstanceInformation. (SQLSTATE HV000)

Expected Behavior

The GetInventory API should support the result type InstanceDetailedInformation.

Current Behavior

Currently, the GetInventory API does not support the result type InstanceDetailedInformation.

Reproduction Steps

GetInventory API execution with result type InstanceDetailedInformation as input.

Possible Solution

No response

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

Compiler and Version used

1.21.3

Operating System and version

M1

RanVaknin commented 8 months ago

Hi @bigdatasourav ,

This looks like a bug with the service itself. I assume when you try to run aws ssm get-inventory with the CLI and those same arguments you are seeing the same behavior?

Thanks, Ran~

bigdatasourav commented 8 months ago

Hey @RanVaknin, Thanks for the quick response. Yes aws ssm get-inventory also returns the same error -

➜  steampipe ✗ aws ssm get-inventory \
    --filters "Key=AWS:InstanceInformation.InstanceId,Values=i-08f0d99*******3" \
    --result-attributes "TypeName=AWS:InstanceDetailedInformation"

An error occurred (InvalidResultAttributeException) when calling the GetInventory operation: Result type name AWS:InstanceDetailedInformation is not supported. Supported type names are: AWS:InstanceInformation, AWS:PatchSummary. Default result type name is AWS:InstanceInformation.
RanVaknin commented 7 months ago

Hi @bigdatasourav ,

Thanks for confirming. From the error and the fact that this is reproducible using both he SDK and CLI it's clear to me that this is a service related issue.

I have created an internal ticket with the service team P105125205. Please check back for more updates from the SSM service team.

Thanks, Ran~