Create an asset mapping

async AsyncCogniteClient.three_d.asset_mappings.create(
model_id: int,
revision_id: int,
asset_mapping: ThreeDAssetMapping | ThreeDAssetMappingWrite | Sequence[ThreeDAssetMapping] | Sequence[ThreeDAssetMappingWrite],
) ThreeDAssetMapping | ThreeDAssetMappingList

Create 3d node asset mappings.

Parameters:
Returns:

The created asset mapping(s).

Return type:

ThreeDAssetMapping | ThreeDAssetMappingList

Example

Create new 3d node asset mapping:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes import ThreeDAssetMappingWrite
>>> my_mapping = ThreeDAssetMappingWrite(node_id=1, asset_id=1)
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> res = client.three_d.asset_mappings.create(
...     model_id=1, revision_id=1, asset_mapping=my_mapping
... )