Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitewise: Custom component models failing #29461

Closed
trevransom opened this issue Mar 12, 2024 · 1 comment
Closed

Sitewise: Custom component models failing #29461

trevransom opened this issue Mar 12, 2024 · 1 comment
Labels
bug This issue is a bug. p3 package/tools Related to AWS CDK Tools or CLI

Comments

@trevransom
Copy link

trevransom commented Mar 12, 2024

Describe the bug

When trying to implement a custom component model in the AWS CDK for Sitewise in Python it gives the error "Custom composite model must have either id, externalId, or path"

Expected Behavior

That it would work directly

Current Behavior

Gives the error "Custom composite model must have either id, externalId, or path"

Reproduction Steps

class equipmentUnitModel(Construct):
    def __init__(self, scope: Construct, id: str, model_id: str, **kwargs) -> None:
        super().__init__(scope, id, **kwargs)
        [self.my](http://self.my/)_sitewise_model = sitewise.CfnAssetModel(
            self,
            "equipment_unit_model",
            asset_model_name="equipment_unit_model",
            asset_model_description="equipment unit model",
            asset_model_composite_models=[
                sitewise.CfnAssetModel.AssetModelCompositeModelProperty(
                    name="demo",
                    type="CUSTOM"
                ),
            ]
        )

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.131.0 (build 92b912d)

Framework Version

No response

Node.js Version

v21.6.2

OS

Mac

Language

Python

Language Version

No response

Other information

No response

@trevransom trevransom added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 12, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Mar 12, 2024
@pahud
Copy link
Contributor

pahud commented Mar 12, 2024

Gives the error "Custom composite model must have either id, externalId, or path"

This seems to be a cloudformation error? Can you share the cdk synth output of the AWS::IoTSiteWise::AssetModel resource? Looks like some property is required but missing. This doesn't seem to be a CDK bug we just need to figure out what was missing though.

@pahud pahud removed the needs-triage This issue or PR still needs to be triaged. label Mar 12, 2024
@aws aws locked and limited conversation to collaborators Mar 12, 2024
@pahud pahud converted this issue into discussion #29463 Mar 12, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug This issue is a bug. p3 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

3 participants