Skip to main content

notes

Creates, updates, deletes, gets or lists a notes resource.

Overview

Namenotes
TypeResource
Idgoogle.containeranalysis.notes

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
attestationobjectA note describing an attestation role. (id: AttestationNote)
buildobjectA note describing build provenance for a verifiable build. (id: BuildNote)
complianceobjectA note describing a compliance check. (id: ComplianceNote)
createTimestring (google-datetime)Output only. The time this note was created. This field can be used as a filter in list requests.
deploymentobjectA note describing something that can be deployed. (id: DeploymentNote)
discoveryobjectA note describing the initial analysis of a resource. (id: DiscoveryNote)
dsseAttestationobjectA note describing a dsse attestation note. (id: DSSEAttestationNote)
expirationTimestring (google-datetime)Time of expiration for this note. Empty if note does not expire.
imageobjectA note describing a base image. (id: ImageNote)
kindstringOutput only. The type of analysis. This field can be used as a filter in list requests.
longDescriptionstringA detailed description of this note.
packageobjectA note describing a package hosted by various package managers. (id: PackageNote)
relatedNoteNamesarrayOther notes related to this note.
relatedUrlarrayURLs associated with this note.
sbomReferenceobjectA note describing an SBOM reference. (id: SBOMReferenceNote)
secretobjectA note describing a secret. (id: SecretNote)
shortDescriptionstringA one sentence description of this note.
updateTimestring (google-datetime)Output only. The time this note was last updated. This field can be used as a filter in list requests.
upgradeobjectA note describing available package upgrades. (id: UpgradeNote)
vulnerabilityobjectA note describing a package vulnerability. (id: VulnerabilityNote)
vulnerabilityAssessmentobjectA note describing a vulnerability assessment. (id: VulnerabilityAssessmentNote)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_notes_getselectprojectsId, locationsId, notesIdGets the specified note.
projects_locations_notes_listselectprojectsId, locationsIdfilter, pageSize, pageToken, returnPartialSuccessLists notes for the specified project.
projects_notes_getselectprojectsId, notesIdGets the specified note.
projects_notes_listselectprojectsIdfilter, pageSize, pageToken, returnPartialSuccessLists notes for the specified project.
projects_locations_notes_createinsertprojectsId, locationsIdnoteIdCreates a new note.
projects_locations_notes_batch_createinsertprojectsId, locationsIdCreates new notes in batch.
projects_notes_createinsertprojectsIdnoteIdCreates a new note.
projects_notes_batch_createinsertprojectsIdCreates new notes in batch.
projects_locations_notes_patchupdateprojectsId, locationsId, notesIdupdateMaskUpdates the specified note.
projects_notes_patchupdateprojectsId, notesIdupdateMaskUpdates the specified note.
projects_locations_notes_deletedeleteprojectsId, locationsId, notesIdDeletes the specified note.
projects_notes_deletedeleteprojectsId, notesIdDeletes the specified note.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
notesIdstring
projectsIdstring
filterstring
noteIdstring
pageSizeinteger (int32)
pageTokenstring
returnPartialSuccessboolean
updateMaskstring (google-fieldmask)

SELECT examples

Gets the specified note.

SELECT
name,
attestation,
build,
compliance,
createTime,
deployment,
discovery,
dsseAttestation,
expirationTime,
image,
kind,
longDescription,
package,
relatedNoteNames,
relatedUrl,
sbomReference,
secret,
shortDescription,
updateTime,
upgrade,
vulnerability,
vulnerabilityAssessment
FROM google.containeranalysis.notes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND notesId = '{{ notesId }}' -- required;

INSERT examples

Creates a new note.

INSERT INTO google.containeranalysis.notes (
data__name,
data__shortDescription,
data__longDescription,
data__kind,
data__relatedUrl,
data__expirationTime,
data__createTime,
data__updateTime,
data__relatedNoteNames,
data__vulnerability,
data__build,
data__image,
data__package,
data__deployment,
data__discovery,
data__attestation,
data__upgrade,
data__compliance,
data__dsseAttestation,
data__vulnerabilityAssessment,
data__sbomReference,
data__secret,
projectsId,
locationsId,
noteId
)
SELECT
'{{ name }}',
'{{ shortDescription }}',
'{{ longDescription }}',
'{{ kind }}',
'{{ relatedUrl }}',
'{{ expirationTime }}',
'{{ createTime }}',
'{{ updateTime }}',
'{{ relatedNoteNames }}',
'{{ vulnerability }}',
'{{ build }}',
'{{ image }}',
'{{ package }}',
'{{ deployment }}',
'{{ discovery }}',
'{{ attestation }}',
'{{ upgrade }}',
'{{ compliance }}',
'{{ dsseAttestation }}',
'{{ vulnerabilityAssessment }}',
'{{ sbomReference }}',
'{{ secret }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ noteId }}'
RETURNING
name,
attestation,
build,
compliance,
createTime,
deployment,
discovery,
dsseAttestation,
expirationTime,
image,
kind,
longDescription,
package,
relatedNoteNames,
relatedUrl,
sbomReference,
secret,
shortDescription,
updateTime,
upgrade,
vulnerability,
vulnerabilityAssessment
;

UPDATE examples

Updates the specified note.

UPDATE google.containeranalysis.notes
SET
data__name = '{{ name }}',
data__shortDescription = '{{ shortDescription }}',
data__longDescription = '{{ longDescription }}',
data__kind = '{{ kind }}',
data__relatedUrl = '{{ relatedUrl }}',
data__expirationTime = '{{ expirationTime }}',
data__createTime = '{{ createTime }}',
data__updateTime = '{{ updateTime }}',
data__relatedNoteNames = '{{ relatedNoteNames }}',
data__vulnerability = '{{ vulnerability }}',
data__build = '{{ build }}',
data__image = '{{ image }}',
data__package = '{{ package }}',
data__deployment = '{{ deployment }}',
data__discovery = '{{ discovery }}',
data__attestation = '{{ attestation }}',
data__upgrade = '{{ upgrade }}',
data__compliance = '{{ compliance }}',
data__dsseAttestation = '{{ dsseAttestation }}',
data__vulnerabilityAssessment = '{{ vulnerabilityAssessment }}',
data__sbomReference = '{{ sbomReference }}',
data__secret = '{{ secret }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND notesId = '{{ notesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
attestation,
build,
compliance,
createTime,
deployment,
discovery,
dsseAttestation,
expirationTime,
image,
kind,
longDescription,
package,
relatedNoteNames,
relatedUrl,
sbomReference,
secret,
shortDescription,
updateTime,
upgrade,
vulnerability,
vulnerabilityAssessment;

DELETE examples

Deletes the specified note.

DELETE FROM google.containeranalysis.notes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND notesId = '{{ notesId }}' --required;