Skip to content

Not all OCI resources returned by ResourceSearchClient #688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lez-doit opened this issue May 15, 2025 · 0 comments
Open

Not all OCI resources returned by ResourceSearchClient #688

lez-doit opened this issue May 15, 2025 · 0 comments

Comments

@lez-doit
Copy link

I am trying to load the list of all resources that are present in specific OCI deployment:

AuthenticationDetailsProvider provider = SimpleAuthenticationDetailsProvider.builder()
                    .tenantId(credentials.getTenantId())
                    .userId(credentials.getUserId())
                    .fingerprint(credentials.getFingerprint())
                    .privateKeySupplier(new StringPrivateKeySupplier(credentials.getPrivateKey()))
                    .region(Region.valueOf(credentials.getRegion()))
                    .build();

            @Cleanup ResourceSearchClient searchClient = ResourceSearchClient.builder().build(provider);

            String query = "query all resources";

            SearchResourcesRequest request = SearchResourcesRequest.builder()
                    .searchDetails(
                            StructuredSearchDetails.builder()
                                    .query(query)
                                    .build()
                    )
                    .build();

            SearchResourcesResponse response = searchClient.searchResources(request);

            for (ResourceSummary resourceSummary : response.getResourceSummaryCollection().getItems()) {

the response contains a lot of resources from the OCI, but not all of them, because I fail to match some resources I can see in UI to the list of records from API. I wasn't yet able to define if there's any pattern between resources that are not retrieved from API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant