Skip to main content

instructions

Creates, updates, deletes, gets or lists an instructions resource.

Overview

Nameinstructions
TypeResource
Idgoogle.datalabeling.instructions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
blockingResourcesarrayOutput only. The names of any related resources that are blocking changes to the instruction.
createTimestring (google-datetime)Output only. Creation time of instruction.
csvInstructionobjectDeprecated: this instruction format is not supported any more. Instruction from a CSV file, such as for classification task. The CSV file should have exact two columns, in the following format: * The first column is labeled data, such as an image reference, text. * The second column is comma separated labels associated with data. (id: GoogleCloudDatalabelingV1beta1CsvInstruction)
dataTypestringRequired. The data type of this instruction.
descriptionstringOptional. User-provided description of the instruction. The description can be up to 10000 characters long.
displayNamestringRequired. The display name of the instruction. Maximum of 64 characters.
pdfInstructionobjectInstruction from a PDF document. The PDF should be in a Cloud Storage bucket. (id: GoogleCloudDatalabelingV1beta1PdfInstruction)
updateTimestring (google-datetime)Output only. Last update time of instruction.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_instructions_getselectprojectsId, instructionsIdGets an instruction by resource name.
projects_instructions_listselectprojectsIdfilter, pageSize, pageTokenLists instructions for a project. Pagination is supported.
projects_instructions_createinsertprojectsIdCreates an instruction for how data should be labeled.
projects_instructions_deletedeleteprojectsId, instructionsIdDeletes an instruction object by resource name.

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
instructionsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets an instruction by resource name.

SELECT
name,
blockingResources,
createTime,
csvInstruction,
dataType,
description,
displayName,
pdfInstruction,
updateTime
FROM google.datalabeling.instructions
WHERE projectsId = '{{ projectsId }}' -- required
AND instructionsId = '{{ instructionsId }}' -- required;

INSERT examples

Creates an instruction for how data should be labeled.

INSERT INTO google.datalabeling.instructions (
data__instruction,
projectsId
)
SELECT
'{{ instruction }}',
'{{ projectsId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples

Deletes an instruction object by resource name.

DELETE FROM google.datalabeling.instructions
WHERE projectsId = '{{ projectsId }}' --required
AND instructionsId = '{{ instructionsId }}' --required;