labels
Creates, updates, deletes, gets or lists a labels resource.
Overview
| Name | labels |
| Type | Resource |
| Id | aws.lookoutequipment.labels |
Fields
The following fields are returned by SELECT queries:
- describe_label
- list_labels
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The time at which the label was created. |
end_time | string (date-time) | The end time of the requested label. |
equipment | string | Indicates that a label pertains to a particular piece of equipment. (pattern: <code>[\P{M}\p{M}]{1,200}</code>) |
fault_code | string | Indicates 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_arn | string | The 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_name | string | The name of the requested label group. (pattern: <code>^[0-9a-zA-Z_-]{1,200}$</code>) |
label_id | string | The ID of the requested label. (pattern: <code>[A-Fa-f0-9]{0,32}</code>) |
notes | string | Metadata 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>) |
rating | string | Indicates whether a labeled event represents an anomaly. (ANOMALY, NO_ANOMALY, NEUTRAL) |
start_time | string (date-time) | The start time of the requested label. |
| Name | Datatype | Description |
|---|---|---|
label_summaries | array | A summary of the items in the label group. If you don't supply the LabelGroupName request parameter, or if you supply the name of a label group that doesn't exist, ListLabels returns an empty array in LabelSummaries. |
next_token | string | An opaque pagination token indicating where to continue the listing of datasets. (pattern: <code>\p{ASCII}{0,8192}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_label | select | region | Returns the name of the label. | |
list_labels | select | region | Provides a list of labels. | |
create_label | insert | region, LabelGroupName, StartTime, EndTime, ClientToken | Creates a label for an event. | |
delete_label | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_label
- list_labels
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
;
Provides a list of labels.
SELECT
label_summaries,
next_token
FROM aws.lookoutequipment.labels
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_label
- Manifest
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
;
# Description fields are for documentation purposes
- name: labels
props:
- name: region
value: "{{ region }}"
description: Required parameter for the labels resource.
- name: LabelGroupName
value: "{{ LabelGroupName }}"
description: |
The name of a group of labels. Data in this field will be retained for service usage. Follow best practices for the security of your data.
- name: StartTime
value: "{{ StartTime }}"
description: |
The start time of the labeled event.
- name: EndTime
value: "{{ EndTime }}"
description: |
The end time of the labeled event.
- name: Rating
value: "{{ Rating }}"
description: |
Indicates whether a labeled event represents an anomaly.
valid_values: ['ANOMALY', 'NO_ANOMALY', 'NEUTRAL']
- name: FaultCode
value: "{{ FaultCode }}"
description: |
Provides additional information about the label. The fault code must be defined in the FaultCodes attribute of the label group. Data in this field will be retained for service usage. Follow best practices for the security of your data.
- name: Notes
value: "{{ Notes }}"
description: |
Metadata 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.
- name: Equipment
value: "{{ Equipment }}"
description: |
Indicates that a label pertains to a particular piece of equipment. Data in this field will be retained for service usage. Follow best practices for the security of your data.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
A unique identifier for the request to create a label. If you do not set the client request token, Lookout for Equipment generates one.
DELETE examples
- delete_label
Deletes a label.
DELETE FROM aws.lookoutequipment.labels
WHERE region = '{{ region }}' --required
;