Skip to main content

attestors

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

Overview

Nameattestors
TypeResource
Idgoogle.binaryauthorization.attestors

Fields

NameDatatypeDescription
namestringRequired. The resource name, in the format: projects/*/attestors/*. This field may not be updated.
descriptionstringOptional. A descriptive comment. This field may be updated. The field may be displayed in chooser dialogs.
etagstringOptional. A checksum, returned by the server, that can be sent on update requests to ensure the attestor has an up-to-date value before attempting to update it. See https://google.aip.dev/154.
updateTimestringOutput only. Time when the attestor was last updated.
userOwnedGrafeasNoteobjectAn user owned Grafeas note references a Grafeas Attestation.Authority Note created by the user.

Methods

NameAccessible byRequired ParamsDescription
getSELECTattestorsId, projectsIdGets an attestor. Returns NOT_FOUND if the attestor does not exist.
listSELECTprojectsIdLists attestors. Returns INVALID_ARGUMENT if the project does not exist.
createINSERTprojectsIdCreates an attestor, and returns a copy of the new attestor. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the attestor already exists.
deleteDELETEattestorsId, projectsIdDeletes an attestor. Returns NOT_FOUND if the attestor does not exist.
updateREPLACEattestorsId, projectsIdUpdates an attestor. Returns NOT_FOUND if the attestor does not exist.
validate_attestation_occurrenceEXECattestorsId, projectsIdReturns whether the given Attestation for the given image URI was signed by the given Attestor

SELECT examples

Lists attestors. Returns INVALID_ARGUMENT if the project does not exist.

SELECT
name,
description,
etag,
updateTime,
userOwnedGrafeasNote
FROM google.binaryauthorization.attestors
WHERE projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.binaryauthorization.attestors (
projectsId,
name,
description,
userOwnedGrafeasNote,
etag
)
SELECT
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ userOwnedGrafeasNote }}',
'{{ etag }}'
;

REPLACE example

Replaces all fields in the specified attestors resource.

/*+ update */
REPLACE google.binaryauthorization.attestors
SET
name = '{{ name }}',
description = '{{ description }}',
userOwnedGrafeasNote = '{{ userOwnedGrafeasNote }}',
etag = '{{ etag }}'
WHERE
attestorsId = '{{ attestorsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified attestors resource.

/*+ delete */
DELETE FROM google.binaryauthorization.attestors
WHERE attestorsId = '{{ attestorsId }}'
AND projectsId = '{{ projectsId }}';