IoTTwinMaker.Client.
create_entity
(**kwargs)¶Creates an entity.
See also: AWS API Documentation
Request Syntax
response = client.create_entity(
workspaceId='string',
entityId='string',
entityName='string',
description='string',
components={
'string': {
'description': 'string',
'componentTypeId': 'string',
'properties': {
'string': {
'definition': {
'dataType': {
'type': 'RELATIONSHIP'|'STRING'|'LONG'|'BOOLEAN'|'INTEGER'|'DOUBLE'|'LIST'|'MAP',
'nestedType': {'... recursive ...'},
'allowedValues': [
{
'booleanValue': True|False,
'doubleValue': 123.0,
'integerValue': 123,
'longValue': 123,
'stringValue': 'string',
'listValue': {'... recursive ...'},
'mapValue': {
'string': {'... recursive ...'}
},
'relationshipValue': {
'targetEntityId': 'string',
'targetComponentName': 'string'
},
'expression': 'string'
},
],
'unitOfMeasure': 'string',
'relationship': {
'targetComponentTypeId': 'string',
'relationshipType': 'string'
}
},
'isRequiredInEntity': True|False,
'isExternalId': True|False,
'isStoredExternally': True|False,
'isTimeSeries': True|False,
'defaultValue': {
'booleanValue': True|False,
'doubleValue': 123.0,
'integerValue': 123,
'longValue': 123,
'stringValue': 'string',
'listValue': [
{'... recursive ...'},
],
'mapValue': {
'string': {'... recursive ...'}
},
'relationshipValue': {
'targetEntityId': 'string',
'targetComponentName': 'string'
},
'expression': 'string'
},
'configuration': {
'string': 'string'
},
'displayName': 'string'
},
'value': {
'booleanValue': True|False,
'doubleValue': 123.0,
'integerValue': 123,
'longValue': 123,
'stringValue': 'string',
'listValue': [
{'... recursive ...'},
],
'mapValue': {
'string': {'... recursive ...'}
},
'relationshipValue': {
'targetEntityId': 'string',
'targetComponentName': 'string'
},
'expression': 'string'
},
'updateType': 'UPDATE'|'DELETE'|'CREATE'
}
},
'propertyGroups': {
'string': {
'groupType': 'TABULAR',
'propertyNames': [
'string',
],
'updateType': 'UPDATE'|'DELETE'|'CREATE'
}
}
}
},
parentEntityId='string',
tags={
'string': 'string'
}
)
[REQUIRED]
The ID of the workspace that contains the entity.
[REQUIRED]
The name of the entity.
An object that maps strings to the components in the entity. Each string in the mapping must be unique to this object.
An object that sets information about a component type create or update request.
The description of the component request.
The ID of the component type.
An object that maps strings to the properties to set in the component type. Each string in the mapping must be unique to this object.
An object that sets information about a property.
An object that specifies information about a property.
An object that contains information about the data type.
The underlying type of the data type.
The nested type in the data type.
The allowed values for this data type.
An object that specifies a value for a property.
A Boolean value.
A double value.
An integer value.
A long value.
A string value.
A list of multiple values.
An object that maps strings to multiple DataValue
objects.
An object that specifies a value for a property.
A value that relates a component to another component.
The ID of the target entity associated with this relationship value.
The name of the target component associated with the relationship value.
An expression that produces the value.
The unit of measure used in this data type.
A relationship that associates a component with another component.
The ID of the target component type associated with this relationship.
The type of the relationship.
A Boolean value that specifies whether the property is required.
A Boolean value that specifies whether the property ID comes from an external data store.
A Boolean value that specifies whether the property is stored externally.
A Boolean value that specifies whether the property consists of time series data.
An object that contains the default value.
A Boolean value.
A double value.
An integer value.
A long value.
A string value.
A list of multiple values.
An object that specifies a value for a property.
An object that maps strings to multiple DataValue
objects.
An object that specifies a value for a property.
A value that relates a component to another component.
The ID of the target entity associated with this relationship value.
The name of the target component associated with the relationship value.
An expression that produces the value.
A mapping that specifies configuration information about the property. Use this field to specify information that you read from and write to an external source.
A friendly name for the property.
The value of the property.
A Boolean value.
A double value.
An integer value.
A long value.
A string value.
A list of multiple values.
An object that specifies a value for a property.
An object that maps strings to multiple DataValue
objects.
An object that specifies a value for a property.
A value that relates a component to another component.
The ID of the target entity associated with this relationship value.
The name of the target component associated with the relationship value.
An expression that produces the value.
The update type of the update property request.
The property groups.
The group type.
The property names.
The update type.
Metadata that you can use to manage the entity.
dict
Response Syntax
{
'entityId': 'string',
'arn': 'string',
'creationDateTime': datetime(2015, 1, 1),
'state': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'ERROR'
}
Response Structure
(dict) --
entityId (string) --
The ID of the entity.
arn (string) --
The ARN of the entity.
creationDateTime (datetime) --
The date and time when the entity was created.
state (string) --
The current state of the entity.
Exceptions
IoTTwinMaker.Client.exceptions.InternalServerException
IoTTwinMaker.Client.exceptions.AccessDeniedException
IoTTwinMaker.Client.exceptions.ThrottlingException
IoTTwinMaker.Client.exceptions.ValidationException
IoTTwinMaker.Client.exceptions.ConflictException
IoTTwinMaker.Client.exceptions.ServiceQuotaExceededException