2016-12-17 62 views

回答

0

我刚刚得到了答案,这里是例子:

ec2_instance.create_image({ 
    dry_run: false, 
    name: "String", # required 
    description: "String", 
    no_reboot: false, 
    block_device_mappings: [ 
    { 
     virtual_name: "String", 
     device_name: "String", 
     ebs: { 
     snapshot_id: "String", 
     volume_size: 1, 
     delete_on_termination: false, 
     volume_type: "standard", # accepts standard, io1, gp2, sc1, st1 
     iops: 1, 
     encrypted: false, 
     }, 
     no_device: "String", 
    }, 
    ], 
})