try_remove_child on a ScalableTarget not working #19619
Answered
by
automartin5000
automartin5000
asked this question in
Q&A
-
I'm trying to use children = queue_service.service.node.find_all()
for child in children:
if child.__class__ == aws_cdk.aws_applicationautoscaling.ScalableTarget:
queue_service.service.node.try_remove_child(child.node.id) I've also tried variations of: queue_service.service.node.try_remove_child("CpuScaling") |
Beta Was this translation helpful? Give feedback.
Answered by
automartin5000
Mar 30, 2022
Replies: 2 comments
-
Figured it out, although I had to loop over the children and couldn't figure out to get the child directly by id ( children = queue_service.service.node.find_all()
for child in children:
if child.__class__ in [aws_cdk.aws_applicationautoscaling.ScalableTarget]:
child.node.try_remove_child("CpuScaling") |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
automartin5000
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Figured it out, although I had to loop over the children and couldn't figure out to get the child directly by id (
Target
)