Before running the samples, make sure you've followed the steps outlined in Using the client library.
cd samples
npm install
cd ..
Create Feed.
View the source code.
Usage:
node createFeed <FEED_ID> "storage.googleapis.com/<BUCKET_NAME>", projects/<PROJECT_ID>/topics/<TOPIC_ID>
Delete Feed.
View the source code.
Usage:
node deleteFeed "project/<PROJECT_NUMBER>/feeds/<FEED_ID>"
Export asserts to specified dump file path.
View the source code.
Usage:
node exportAssets.js <gs:my-bucket/my-assets.txt>
Batch get history of assets.
View the source code.
Usage:
node getBatchAssetHistory "storage.googleapis.com/<BUCKET_NAME>"
Get Feed.
View the source code.
Usage:
node getFeed "project/<PROJECT_NUMBER>/feeds/<FEED_ID>"
List Feeds.
View the source code.
Usage:
node listFeeds
Batch get history of assets.
View the source code.
Usage:
node getBatchAssetHistory "storage.googleapis.com/<BUCKET_NAME>"
Search All Iam Policies.
View the source code.
Usage:
node searchAllIamPolicies <SCOPE> <QUERY> <PAGE_SIZE> <PAGE_TOKEN>
Search All Resources.
View the source code.
Usage:
node searchAllResources <SCOPE> <QUERY> <ASSET_TYPES> <PAGE_SIZE> <PAGE_TOKEN> <ORDER_BY>
Update Feed.
View the source code.
Usage:
node updateFeed "project/<PROJECT_NUMBER>/feeds/<FEED_ID>" projects/<PROJECT_ID>/topics/<TOPIC_ID>
