Git Product home page Git Product logo

Comments (4)

sunnixx avatar sunnixx commented on June 12, 2024

okay so I was able to get the API working, now I'm facing another issue.
When I pass this
assetTypes: ["sqladmin.googleapis.com/Instance"],

I'm getting the following error

{ Error: 3 INVALID_ARGUMENT: Unsupported asset type: sqladmin.googleapis.com/Instance. See https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types for supported asset types.
    at Object.callErrorFromStatus (/Users/macbook/Google Drive/Cloudnosys/functions/node_modules/@google-cloud/asset/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/Users/macbook/Google Drive/Cloudnosys/functions/node_modules/@google-cloud/asset/node_modules/@grpc/grpc-js/build/src/client.js:176:52)
    at Object.onReceiveStatus (/Users/macbook/Google Drive/Cloudnosys/functions/node_modules/@google-cloud/asset/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:342:141)
    at Object.onReceiveStatus (/Users/macbook/Google Drive/Cloudnosys/functions/node_modules/@google-cloud/asset/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:305:181)
    at Http2CallStream.outputStatus (/Users/macbook/Google Drive/Cloudnosys/functions/node_modules/@google-cloud/asset/node_modules/@grpc/grpc-js/build/src/call-stream.js:117:74)
    at Http2CallStream.maybeOutputStatus (/Users/macbook/Google Drive/Cloudnosys/functions/node_modules/@google-cloud/asset/node_modules/@grpc/grpc-js/build/src/call-stream.js:156:22)
    at Http2CallStream.endCall (/Users/macbook/Google Drive/Cloudnosys/functions/node_modules/@google-cloud/asset/node_modules/@grpc/grpc-js/build/src/call-stream.js:142:18)
    at Http2CallStream.handleTrailers (/Users/macbook/Google Drive/Cloudnosys/functions/node_modules/@google-cloud/asset/node_modules/@grpc/grpc-js/build/src/call-stream.js:274:14)
    at ClientHttp2Stream.emit (events.js:198:13)
    at emit (internal/http2/core.js:265:8)
  code: 3,
  details:
   'Unsupported asset type: sqladmin.googleapis.com/Instance. See https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types for supported asset types.',
  metadata:
   Metadata {
     internalRepr: Map { 'grpc-server-stats-bin' => [Array] },
     options: {} },
  note:
   'Exception occurred in retry method that was not classified as transient' }

This is a supported assetType in the docs.
https://cloud.google.com/asset-inventory/docs/resource-name-format
But not sure why isn't it working here, I've tried other assetTypes and they return fine except for the SQL one.

from nodejs-asset.

bcoe avatar bcoe commented on June 12, 2024

@sunnixx did you end up having any luck setting an asset type?

What if you provide an empty [], I wonder if this returns the all asset types?

from nodejs-asset.

andreassantoro avatar andreassantoro commented on June 12, 2024

okay so I was able to get the API working, now

Hi, what was the issue now?

from nodejs-asset.

sofisl avatar sofisl commented on June 12, 2024

Hi @sunnixx, it seems that there is a distinction between the assets that are supported and searchable, see here. (@bcoe, I've confirmed it works well without setting any parameters).

@andreassantoro, have you confirmed that you have authenticated your project? (export GOOGLE_APPLICATION_CREDENTIALS=<path/to/your/service/account?)

Will close for now, feel free to reopen if this doesn't fix your issues!

from nodejs-asset.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.