Skip to content
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

(iot_sitewise): (python model asset creation causes enum error) #26841

Closed
awspiv opened this issue Aug 22, 2023 · 3 comments
Closed

(iot_sitewise): (python model asset creation causes enum error) #26841

awspiv opened this issue Aug 22, 2023 · 3 comments
Labels
@aws-cdk/aws-iotsitewise Related to AWS IoT SiteWise bug This issue is a bug. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@awspiv
Copy link

awspiv commented Aug 22, 2023

Describe the bug

Running the following in cdk. The cdk synth works as expected, but cdk deploy results in enum error. Looking through all documentation including copy and pasting example codes always results in "Measruement" types resulting in this error.

Expected Behavior

Both a sitewise model and asset generated within the account.

Current Behavior

Following error appears:

image

Reproduction Steps


class MyStack(Stack):

    def __init__(self, scope: Construct, id: str,  **kwargs) -> None:
        super().__init__(scope, id, **kwargs)
    
        asset_model = iotsitewise.CfnAssetModel(
                    self,
                    "MyAssetModel",
                    asset_model_name="TestMyAssetModel",
                    asset_model_properties=[iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
                            data_type="DOUBLE",
                            logical_id="mylogid",
                            name="volts",  
                            unit="V",
                            type=iotsitewise.CfnAssetModel.PropertyTypeProperty(type_name="Measurment")                            
                            )                        
                            ]
                )
                 
        cfn_asset = iotsitewise.CfnAsset(self, "MyCfnAsset",
            asset_model_id=asset_model.ref,
            asset_name="assetName",
        )

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.92.0 (build bf62e55)

Framework Version

No response

Node.js Version

v20.5.1

OS

Ubuntu 22.04.3 LTS

Language

Python

Language Version

3.10.x

Other information

No response

@awspiv awspiv added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 22, 2023
@github-actions github-actions bot added the @aws-cdk/aws-iotsitewise Related to AWS IoT SiteWise label Aug 22, 2023
@peterwoodworth
Copy link
Contributor

Hm, this looks like it's a service error since the template looks to me like it's synthesizing properly from what you've given it

Resources:
  MyAssetModel:
    Type: AWS::IoTSiteWise::AssetModel
    Properties:
      AssetModelName: TestMyAssetModel
      AssetModelProperties:
        - DataType: DOUBLE
          LogicalId: mylogid
          Name: volts
          Type:
            TypeName: Measurment
          Unit: V
    Metadata:
      aws:cdk:path: BucketPolicyStack/MyAssetModel

It looks like you misspelled Measurement actually (dropped the second e)

@peterwoodworth peterwoodworth added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 22, 2023
@awspiv
Copy link
Author

awspiv commented Aug 22, 2023

Yup, typo was the problem. Sigh, wasted some time trying to get this work. Haha, ok thanks!!!!!

@awspiv awspiv closed this as completed Aug 22, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-iotsitewise Related to AWS IoT SiteWise bug This issue is a bug. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants