Skip to main content

labels

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

Overview

Namelabels
TypeResource
Idaws.lookoutequipment.labels

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The time at which the label was created.
end_timestring (date-time)The end time of the requested label.
equipmentstringIndicates that a label pertains to a particular piece of equipment. (pattern: <code>[\P{M}\p{M}]{1,200}</code>)
fault_codestringIndicates the type of anomaly associated with the label. Data in this field will be retained for service usage. Follow best practices for the security of your data. (pattern: <code>[\P{M}\p{M}]{1,100}</code>)
label_group_arnstringThe Amazon Resource Name (ARN) of the requested label group. (pattern: <code>arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9-]*:[0-9]{12}:label-group/.+</code>)
label_group_namestringThe name of the requested label group. (pattern: <code>^[0-9a-zA-Z_-]{1,200}$</code>)
label_idstringThe ID of the requested label. (pattern: <code>[A-Fa-f0-9]{0,32}</code>)
notesstringMetadata providing additional information about the label. Data in this field will be retained for service usage. Follow best practices for the security of your data. (pattern: <code>[\P{M}\p{M}]{1,2560}</code>)
ratingstringIndicates whether a labeled event represents an anomaly. (ANOMALY, NO_ANOMALY, NEUTRAL)
start_timestring (date-time)The start time of the requested label.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_labelselectregionReturns the name of the label.
list_labelsselectregionProvides a list of labels.
create_labelinsertregion, LabelGroupName, StartTime, EndTime, ClientTokenCreates a label for an event.
delete_labeldeleteregionDeletes a label.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the name of the label.

SELECT
created_at,
end_time,
equipment,
fault_code,
label_group_arn,
label_group_name,
label_id,
notes,
rating,
start_time
FROM aws.lookoutequipment.labels
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a label for an event.

INSERT INTO aws.lookoutequipment.labels (
LabelGroupName,
StartTime,
EndTime,
Rating,
FaultCode,
Notes,
Equipment,
ClientToken,
region
)
SELECT
'{{ LabelGroupName }}' /* required */,
'{{ StartTime }}' /* required */,
'{{ EndTime }}' /* required */,
'{{ Rating }}',
'{{ FaultCode }}',
'{{ Notes }}',
'{{ Equipment }}',
'{{ ClientToken }}' /* required */,
'{{ region }}'
RETURNING
label_id
;

DELETE examples

Deletes a label.

DELETE FROM aws.lookoutequipment.labels
WHERE region = '{{ region }}' --required
;