This message was deleted.
# general
s
This message was deleted.
e
The engine always passes resource IDs around as strings currently. If you know it should be a number you can parse that in the resource provider. I don't think there's anyway to generate SDK code where the ID is a different type.
r
Thanks for your reply, so is ok if I just do this with the
ID
?
Copy code
group.id.apply(id => parseInt(id)
e
Yes. I think some resource also allow taking the
Group
object and auto-resolving to it's id instead of taking a plain id value. I'll see if I can dig out an example.
r
Would be great, thank you!
e
So if you look at BucketObjects in TypeScript it's bucket input can be a string or a Bucket object. Looks like this is done by just having the input property schema set to:
Copy code
"oneOf": [
  {
    "type": "string"
  },
  {
    "type": "string",
    "$ref": "#/types/aws:s3/bucket:Bucket"
  }
],
r
Ok, will dive more on this. Thanks again!