Skip to main content

notes

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

Overview

Namenotes
TypeResource
Idgoogle.containeranalysis.notes

Fields

NameDatatypeDescription
namestringOutput only. The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
attestationobjectNote kind that represents a logical attestation "role" or "authority". For example, an organization might have one Authority for "QA" and one for "build". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project.
buildobjectNote holding the version of the provider's builder and the signature of the provenance message in the build details occurrence.
complianceobject
createTimestringOutput only. The time this note was created. This field can be used as a filter in list requests.
deploymentobjectAn artifact that can be deployed in some runtime.
discoveryobjectA note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A Discovery occurrence is created in a consumer's project at the start of analysis.
dsseAttestationobject
expirationTimestringTime of expiration for this note. Empty if note does not expire.
imageobjectBasis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g., a tag of the resource_url.
kindstringOutput only. The type of analysis. This field can be used as a filter in list requests.
longDescriptionstringA detailed description of this note.
packageobjectPackageNote represents a particular package version.
relatedNoteNamesarrayOther notes related to this note.
relatedUrlarrayURLs associated with this note.
sbomReferenceobjectThe note representing an SBOM reference.
shortDescriptionstringA one sentence description of this note.
updateTimestringOutput only. The time this note was last updated. This field can be used as a filter in list requests.
upgradeobjectAn Upgrade Note represents a potential upgrade of a package to a given version. For each package version combination (i.e. bash 4.0, bash 4.1, bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field represents the information related to the update.
vulnerabilityobjectA security vulnerability that can be found in resources.
vulnerabilityAssessmentobjectA single VulnerabilityAssessmentNote represents one particular product's vulnerability assessment for one CVE.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_notes_getSELECTlocationsId, notesId, projectsIdGets the specified note.
projects_locations_notes_listSELECTlocationsId, projectsIdLists notes for the specified project.
projects_notes_getSELECTnotesId, projectsIdGets the specified note.
projects_notes_listSELECTprojectsIdLists notes for the specified project.
projects_locations_notes_batch_createINSERTlocationsId, projectsIdCreates new notes in batch.
projects_locations_notes_createINSERTlocationsId, projectsIdCreates a new note.
projects_notes_batch_createINSERTprojectsIdCreates new notes in batch.
projects_notes_createINSERTprojectsIdCreates a new note.
projects_locations_notes_deleteDELETElocationsId, notesId, projectsIdDeletes the specified note.
projects_notes_deleteDELETEnotesId, projectsIdDeletes the specified note.
projects_locations_notes_patchUPDATElocationsId, notesId, projectsIdUpdates the specified note.
projects_notes_patchUPDATEnotesId, projectsIdUpdates the specified note.

SELECT examples

Lists notes for the specified project.

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

INSERT example

Use the following StackQL query and manifest file to create a new notes resource.

/*+ create */
INSERT INTO google.containeranalysis.notes (
projectsId,
notes
)
SELECT
'{{ projectsId }}',
'{{ notes }}'
;

UPDATE example

Updates a notes resource.

/*+ update */
UPDATE google.containeranalysis.notes
SET
image = '{{ image }}',
relatedNoteNames = '{{ relatedNoteNames }}',
deployment = '{{ deployment }}',
name = '{{ name }}',
dsseAttestation = '{{ dsseAttestation }}',
build = '{{ build }}',
expirationTime = '{{ expirationTime }}',
sbomReference = '{{ sbomReference }}',
package = '{{ package }}',
discovery = '{{ discovery }}',
vulnerability = '{{ vulnerability }}',
compliance = '{{ compliance }}',
longDescription = '{{ longDescription }}',
upgrade = '{{ upgrade }}',
vulnerabilityAssessment = '{{ vulnerabilityAssessment }}',
shortDescription = '{{ shortDescription }}',
attestation = '{{ attestation }}',
relatedUrl = '{{ relatedUrl }}'
WHERE
notesId = '{{ notesId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified notes resource.

/*+ delete */
DELETE FROM google.containeranalysis.notes
WHERE notesId = '{{ notesId }}'
AND projectsId = '{{ projectsId }}';