You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API documentation for tag operations for managed nodes explicitly states that hybrid nodes have a resource id prefix of "mi", while EC2 instances use "i", and it also states that this is equally valid for either node type:
However, taking InstanceId properties from InstanceInformation for EC2 instances produces the expected "i" resource id form, but using this as the ResourceId in a list_tags_for_resource call, using ResourceType "ManagedInstance", results in throwing a ValidationError, indicating that the InstanceId can only use the "mi" resource id form.
Expected Behavior
Client validates the call, makes API call.
Current Behavior
ClientError: An error occurred (ValidationException) when calling the ListTagsForResource operation: resourceId should be in format mi-[0-9a-f]{17} for resource type ManagedInstance
Reproduction Steps
I was generating test samples, but it's fundamentally taking InstanceId properties from the InstanceInformationList for an EC2-only account, using that to iterate through list_tags_for_resources() calls, as in:
Accept both resource id forms documented as valid, with any further stipulations (the uid component of the resource id is different lengths for each type).
Additional Information/Context
No response
SDK version used
1.35.15
Environment details (OS name and version, etc.)
MacOS, python 3.12.1
The text was updated successfully, but these errors were encountered:
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Describe the bug
The API documentation for tag operations for managed nodes explicitly states that hybrid nodes have a resource id prefix of "mi", while EC2 instances use "i", and it also states that this is equally valid for either node type:
https://docs.aws.amazon.com/systems-manager/latest/userguide/tagging-managed-instances.html#tagging-managed-instances-update
However, taking InstanceId properties from InstanceInformation for EC2 instances produces the expected "i" resource id form, but using this as the ResourceId in a list_tags_for_resource call, using ResourceType "ManagedInstance", results in throwing a ValidationError, indicating that the InstanceId can only use the "mi" resource id form.
Expected Behavior
Client validates the call, makes API call.
Current Behavior
ClientError: An error occurred (ValidationException) when calling the ListTagsForResource operation: resourceId should be in format mi-[0-9a-f]{17} for resource type ManagedInstance
Reproduction Steps
I was generating test samples, but it's fundamentally taking InstanceId properties from the InstanceInformationList for an EC2-only account, using that to iterate through list_tags_for_resources() calls, as in:
response = client.list_tags_for_resource(ResourceId=inst["InstanceId"], ResourceType="ManagedInstance")
Possible Solution
Accept both resource id forms documented as valid, with any further stipulations (the uid component of the resource id is different lengths for each type).
Additional Information/Context
No response
SDK version used
1.35.15
Environment details (OS name and version, etc.)
MacOS, python 3.12.1
The text was updated successfully, but these errors were encountered: