Unable to filter the secrets-manager instances using sub_type from the list_resource_instances method
vamsigutta opened this issue · comments
Describe the bug
I was planning to list all the secrets-manager instances in my account as a part of this I have used the sdk to list all the resources and filter them based on the sub_type as "sm" or "secrets-manager". Nothing works I am even not able to find the relevant documentation to filter them
To Reproduce
from ibm_platform_services import ResourceControllerV2
resource_controller_service = ResourceControllerV2.new_instance()
print(resource_controller_service.list_resource_instances(type="service_instance",sub_type="secrets-manager"))
I have tried by changing the type
parameter as well
Expected behavior
Expected behaviour is to list on secrets-manager instance but it gives an empty response.
Must gather (please complete the following information):
- SDK Version [e.g. 1.2.1] : 0.40.1
- Python Version [e.g. 3.5] : 3.11.5
Were you able to avoid the problem by changing your application code slightly?
I am manually filtering it based on crn
@phanziii Could you please help diagnose this one?
@vamsigutta - looks like Secrets Manager instances don't have the sub_type
specified/set so you can't use that to filter out. You can try filtering based on the resource_id
with value ebc0cdb0-af2a-11ea-98c7-29e5db822649
since that's use for all SM instances.
@vamsigutta Have you tried Khoa's suggestion above?
My requirement was to filter out the secrets-manager from all the resources. But I understand I have manually filter from all the resources for now @padamstx and @phanziii . I see from the documentation only kms
is mentioned as an example forsub_type
. It would be great to know all the subtypes as well
@vamsigutta - if you filter resource_id with value ebc0cdb0-af2a-11ea-98c7-29e5db822649
then it should fit your requirement.
This issue seems to be resolved. Closing...