Skip to content

Not all OCI resources returned by ResourceSearchClient #688

@lez-doit

Description

@lez-doit

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions