UpdateComponentType - Amazon IoT TwinMaker
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

UpdateComponentType

Updates information in a component type.

Request Syntax

PUT /workspaces/workspaceId/component-types/componentTypeId HTTP/1.1 Content-type: application/json { "componentTypeName": "string", "compositeComponentTypes": { "string" : { "componentTypeId": "string" } }, "description": "string", "extendsFrom": [ "string" ], "functions": { "string" : { "implementedBy": { "isNative": boolean, "lambda": { "arn": "string" } }, "requiredProperties": [ "string" ], "scope": "string" } }, "isSingleton": boolean, "propertyDefinitions": { "string" : { "configuration": { "string" : "string" }, "dataType": { "allowedValues": [ { "booleanValue": boolean, "doubleValue": number, "expression": "string", "integerValue": number, "listValue": [ "DataValue" ], "longValue": number, "mapValue": { "string" : "DataValue" }, "relationshipValue": { "targetComponentName": "string", "targetEntityId": "string" }, "stringValue": "string" } ], "nestedType": "DataType", "relationship": { "relationshipType": "string", "targetComponentTypeId": "string" }, "type": "string", "unitOfMeasure": "string" }, "defaultValue": { "booleanValue": boolean, "doubleValue": number, "expression": "string", "integerValue": number, "listValue": [ "DataValue" ], "longValue": number, "mapValue": { "string" : "DataValue" }, "relationshipValue": { "targetComponentName": "string", "targetEntityId": "string" }, "stringValue": "string" }, "displayName": "string", "isExternalId": boolean, "isRequiredInEntity": boolean, "isStoredExternally": boolean, "isTimeSeries": boolean } }, "propertyGroups": { "string" : { "groupType": "string", "propertyNames": [ "string" ] } } }

URI Request Parameters

The request uses the following URI parameters.

componentTypeId

The ID of the component type.

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [a-zA-Z_\.\-0-9:]+

Required: Yes

workspaceId

The ID of the workspace.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z_0-9][a-zA-Z_\-0-9]*[a-zA-Z0-9]+

Required: Yes

Request Body

The request accepts the following data in JSON format.

componentTypeName

The component type name.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: .*[^\u0000-\u001F\u007F]*.*

Required: No

compositeComponentTypes

This is an object that maps strings to compositeComponentTypes of the componentType. CompositeComponentType is referenced by componentTypeId.

Type: String to CompositeComponentTypeRequest object map

Key Length Constraints: Minimum length of 1. Maximum length of 256.

Key Pattern: [a-zA-Z_\-0-9]+

Required: No

description

The description of the component type.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 2048.

Pattern: .*

Required: No

extendsFrom

Specifies the component type that this component type extends.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [a-zA-Z_\.\-0-9:]+

Required: No

functions

An object that maps strings to the functions in the component type. Each string in the mapping must be unique to this object.

Type: String to FunctionRequest object map

Key Length Constraints: Minimum length of 1. Maximum length of 256.

Key Pattern: [a-zA-Z_\-0-9]+

Required: No

isSingleton

A Boolean value that specifies whether an entity can have more than one component of this type.

Type: Boolean

Required: No

propertyDefinitions

An object that maps strings to the property definitions in the component type. Each string in the mapping must be unique to this object.

Type: String to PropertyDefinitionRequest object map

Key Length Constraints: Minimum length of 1. Maximum length of 256.

Key Pattern: [a-zA-Z_\-0-9]+

Required: No

propertyGroups

The property groups.

Type: String to PropertyGroupRequest object map

Key Length Constraints: Minimum length of 1. Maximum length of 256.

Key Pattern: [a-zA-Z_\-0-9]+

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "arn": "string", "componentTypeId": "string", "state": "string", "workspaceId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn

The ARN of the component type.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:((aws)|(aws-cn)|(aws-us-gov)):iottwinmaker:[a-z0-9-]+:[0-9]{12}:[\/a-zA-Z0-9_\-\.:]+

componentTypeId

The ID of the component type.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [a-zA-Z_\.\-0-9:]+

state

The current state of the component type.

Type: String

Valid Values: CREATING | UPDATING | DELETING | ACTIVE | ERROR

workspaceId

The ID of the workspace that contains the component type.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z_0-9][a-zA-Z_\-0-9]*[a-zA-Z0-9]+

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

Access is denied.

HTTP Status Code: 403

InternalServerException

An unexpected error has occurred.

HTTP Status Code: 500

ResourceNotFoundException

The resource wasn't found.

HTTP Status Code: 404

ServiceQuotaExceededException

The service quota was exceeded.

HTTP Status Code: 402

ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 429

ValidationException

Failed

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: