DataTypeProperty Struct
An object that specifies the data type of a property.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iottwinmaker as iottwinmaker } from 'aws-cdk-lib';
declare const dataTypeProperty_: iottwinmaker.CfnComponentType.DataTypeProperty;
declare const dataValueProperty_: iottwinmaker.CfnComponentType.DataValueProperty;
declare const relationshipValue: any;
const dataTypeProperty: iottwinmaker.CfnComponentType.DataTypeProperty = {
type: 'type',
// the properties below are optional
allowedValues: [{
booleanValue: false,
doubleValue: 123,
expression: 'expression',
integerValue: 123,
listValue: [dataValueProperty_],
longValue: 123,
mapValue: {
mapValueKey: dataValueProperty_,
},
relationshipValue: relationshipValue,
stringValue: 'stringValue',
}],
nestedType: dataTypeProperty_,
relationship: {
relationshipType: 'relationshipType',
targetComponentTypeId: 'targetComponentTypeId',
},
unitOfMeasure: 'unitOfMeasure',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iottwinmaker as iottwinmaker
# data_type_property_: iottwinmaker.CfnComponentType.DataTypeProperty
# data_value_property_: iottwinmaker.CfnComponentType.DataValueProperty
# relationship_value: Any
data_type_property = iottwinmaker.CfnComponentType.DataTypeProperty(
type="type",
# the properties below are optional
allowed_values=[iottwinmaker.CfnComponentType.DataValueProperty(
boolean_value=False,
double_value=123,
expression="expression",
integer_value=123,
list_value=[data_value_property_],
long_value=123,
map_value={
"map_value_key": data_value_property_
},
relationship_value=relationship_value,
string_value="stringValue"
)],
nested_type=data_type_property_,
relationship=iottwinmaker.CfnComponentType.RelationshipProperty(
relationship_type="relationshipType",
target_component_type_id="targetComponentTypeId"
),
unit_of_measure="unitOfMeasure"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iottwinmaker.*;
DataTypeProperty dataTypeProperty_;
DataValueProperty dataValueProperty_;
Object relationshipValue;
DataTypeProperty dataTypeProperty = DataTypeProperty.builder()
.type("type")
// the properties below are optional
.allowedValues(List.of(DataValueProperty.builder()
.booleanValue(false)
.doubleValue(123)
.expression("expression")
.integerValue(123)
.listValue(List.of(dataValueProperty_))
.longValue(123)
.mapValue(Map.of(
"mapValueKey", dataValueProperty_))
.relationshipValue(relationshipValue)
.stringValue("stringValue")
.build()))
.nestedType(dataTypeProperty_)
.relationship(RelationshipProperty.builder()
.relationshipType("relationshipType")
.targetComponentTypeId("targetComponentTypeId")
.build())
.unitOfMeasure("unitOfMeasure")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoTTwinMaker;
DataTypeProperty dataTypeProperty_;
DataValueProperty dataValueProperty_;
var relationshipValue;
var dataTypeProperty = new DataTypeProperty {
Type = "type",
// the properties below are optional
AllowedValues = new [] { new DataValueProperty {
BooleanValue = false,
DoubleValue = 123,
Expression = "expression",
IntegerValue = 123,
ListValue = new [] { dataValueProperty_ },
LongValue = 123,
MapValue = new Dictionary<string, object> {
{ "mapValueKey", dataValueProperty_ }
},
RelationshipValue = relationshipValue,
StringValue = "stringValue"
} },
NestedType = dataTypeProperty_,
Relationship = new RelationshipProperty {
RelationshipType = "relationshipType",
TargetComponentTypeId = "targetComponentTypeId"
},
UnitOfMeasure = "unitOfMeasure"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var dataTypeProperty_ DataTypeProperty
var dataValueProperty_ DataValueProperty
var relationshipValue interface{}
dataTypeProperty := &DataTypeProperty{
Type: jsii.String("type"),
// the properties below are optional
AllowedValues: []interface{}{
&DataValueProperty{
BooleanValue: jsii.Boolean(false),
DoubleValue: jsii.Number(123),
Expression: jsii.String("expression"),
IntegerValue: jsii.Number(123),
ListValue: []interface{}{
dataValueProperty_,
},
LongValue: jsii.Number(123),
MapValue: map[string]interface{}{
"mapValueKey": dataValueProperty_,
},
RelationshipValue: relationshipValue,
StringValue: jsii.String("stringValue"),
},
},
NestedType: dataTypeProperty_,
Relationship: &RelationshipProperty{
RelationshipType: jsii.String("relationshipType"),
TargetComponentTypeId: jsii.String("targetComponentTypeId"),
},
UnitOfMeasure: jsii.String("unitOfMeasure"),
}
Properties
allowedValuesoptionalIResolvable | IResolvable | CfnComponentType.allowed_valuesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DataValueProperty]]]allowedValuesoptionalIResolvableAllowedValuesoptionalIResolvableAllowedValuesoptionalinterface{} #The allowed values for this data type.
nestedTypeoptionalIResolvable | CfnComponentType.nested_typeoptionaltyping.Union[IResolvable, DataTypeProperty]nestedTypeoptionalIResolvableNestedTypeoptionalIResolvableNestedTypeoptionalinterface{} #The nested type in the data type.
relationshipoptionalIResolvable | CfnComponentType.relationshipoptionaltyping.Union[IResolvable, RelationshipProperty]relationshipoptionalIResolvableRelationshipoptionalIResolvableRelationshipoptionalinterface{} #A relationship that associates a component with another component.
The underlying type of the data type.
Valid Values: RELATIONSHIP | STRING | LONG | BOOLEAN | INTEGER | DOUBLE | LIST | MAP
unitOfMeasureoptionalstringunit_of_measureoptionalstrunitOfMeasureoptionalStringUnitOfMeasureoptionalstringUnitOfMeasureoptional*string #The unit of measure used in this data type.