I'm trying to suspend ASG processes during a CodePipeline deployment using the Ruby SDK. I can get the AutoScaling Client but I can't seem to be able to convert that group to an object.
client = Aws::AutoScaling::Client.new
asg = client.describe_auto_scaling_groups({auto_scaling_group_names:['MyASG']})[:auto_scaling_groups].first
asg.suspend_processes({scaling_processes:['AZRebalance','AlarmNotification']})
I get the auto-scaling group that I want to work with but when I try to call a function on it, I get this error:
undefined method `restore_processes' for #<Aws::AutoScaling::Types::AutoScalingGroup:0x00007fa3e18f8b30>
I understand why I'm getting the error (asg is a 'Type' and not an object) but I don't know how to turn it into an object. I know I'm missing something silly but I just don't know what it is.