amazon web services - Properly setting DeleteOnTermination on an existing EBS volume using boto -
Digging through the code (for example, consider), I have found that I read using this feature I can: ... and toggle using it: But it is one-symmetric and I think I'm missing some high level functionality . It should not be more like: ? You set this setting on and off formatted string Switch to I verified after every attempt to change the setting using the change outside of the Python Done: I walk through the whole process here:
example.block_device_mapping ['/ dev / sdz']. Delete_on_termination
example.modify_attribute ('Blockdevicemapping', ['/ dev / sdz = 1'] ) #Toggles for example Modify_attribute ('blockdevicemapping', ['/ dev / sdz']) # Toggle Off
block_device_type = instance.block_device_mapping ['/ dev / sdz'] block_device_type.delete_on_termination = True block_device_type.save () # I This API
'% s =% d' list.
& gt; & Gt; & Gt; & Gt; & Gt; & Gt; Inst.modify_attribute ('blockDeviceMapping', ['/ dev / sda1 = 0'])
$ aws ec2 Description-Example-Attribute - Instance-ID-7890 BCD - Block Block Exception Mapping
inst.modify_attribute ('BlockDeviceMapping', ['/ dev / sda1']) (lack of
= 0 in the string) did not make any changes.
.block_device_mapping ['/ dev / sda1'] to perform the installation. Delete_on_termination also did not make any changes. After calling
modify_attribute , the value is unchanged at
delete_on_termination on the local block device objects.
Comments
Post a Comment