Skip to content

Commit

Permalink
added params to sample-metadata usage
Browse files Browse the repository at this point in the history
  • Loading branch information
murog committed May 29, 2019
1 parent a71693d commit 4d32bdf
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion container-analysis/snippets/createNote.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Create Note
// description: Creates a Note with specified ID
// usage: node createNote.js
// usage: node createNote.js "project-id" "note-id"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
noteId = 'my-note-id' // Id of the note
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/createOccurrence.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Create Occurrence
// description: Creates an Occurrence of a Note and attaches it as a metadata to an image
// usage: node createOccurrence.js
// usage: node createOccurrence.js "note-project-id" "note-id" "occurrence-project-id" "image url"
async function main(
noteProjectId = 'your-project-id', // Your GCP Project Id
noteId = 'my-note-id', // Id of the note
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/deleteNote.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Delete Note
// description: Deletes a specified Note
// usage: node deleteNote.js
// usage: node deleteNote.js "project-id" "note-id"
async function main(
projectId = 'your-project-id', // Your GCP Project Id
noteId = 'my-note-id' // Id of the note
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/deleteOccurrence.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Delete Occurrence
// description: Deletes a specified Occurrence
// usage: node deleteOccurrence.js
// usage: node deleteOccurrence.js "project-id" "occurrence-id"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
occurrenceId = 'my-occurrence' // The API-generated identifier associated with the occurrence
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/getDiscoveryInfo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Get Discovery Info
// description: Gets all Discovery Occurrences attached to specified image
// usage: node getDiscoveryInfo.js
// usage: node getDiscoveryInfo.js "project-id" "image-url"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
imageUrl = 'https://gcr.io/my-project/my-image:123' // Image to attach metadata to
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/getNote.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Get Note
// description: Retrieves and prints a specified note
// usage: node getNote.js
// usage: node getNote.js "project-id" "note-id"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
noteId = 'my-note-id' // Id of the note
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/getOccurrence.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Get Occurrence
// description: Retrieves and prints a specified Occurrence
// usage: node getOccurrence.js
// usage: node getOccurrence.js "project-id" "occurrence-id"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
occurrenceId = 'my-occurrence' // The API-generated identifier associated with the occurrence
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/highVulnerabilitiesForImage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Get High Vulnerabilities for Image
// description: Retrieves all Vulnerability Occurrences of High Severity from Specified Image
// usage: node highVulnerabilitiesForImage.js
// usage: node highVulnerabilitiesForImage.js "project-id" "image-url"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
imageUrl = 'https://gcr.io/my-project/my-image:123' // Image to attach metadata to
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/occurrencePubSub.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Occurrence PubSub
// description: Polls a specified PubSub subscription for Occurrences. Requires a subscription to a topic named 'container-analysis-occurrences-v1beta'
// usage: node occurrencePubSub.js
// usage: node occurrencePubSub.js "project-id" "subscription-id" "timeout-in-seconds"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
subscriptionId = 'my-sub-id', // A user-specified subscription to the 'container-analysis-occurrences-v1beta' topic
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/occurrencesForImage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Occurrences for Image
// description: Retrieves all Occurrences attached to the metadata of a specified image
// usage: node occurrencesForImage.js
// usage: node occurrencesForImage.js "project-id" "image-url"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
imageUrl = 'https://gcr.io/my-project/my-image:123' // Image to attach metadata to
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/occurrencesForNote.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Occurrences for Note
// description: Retrieves all Occurrences of a specified Note
// usage: node occurrencesForNote.js
// usage: node occurrencesForNote.js "project-id" "note-id"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
noteId = 'my-note-id' // Id of the note
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// sample-metadata:
// title: Vulnerability Occurrences for Image
// description: Retrieves all Vulnerability Occurrences attached to a specified image
// usage: node exportAssets.js <gs://my-bucket/my-assets.txt>
// usage: node vulnerabilityOccurrencesForImage.js "project-id" "image-url"
async function main(
projectId = 'your-project-id', // Your GCP Project ID
imageUrl = 'https://gcr.io/my-project/my-image:123' // Image to attach metadata to
Expand Down

0 comments on commit 4d32bdf

Please sign in to comment.