我正在处理这个文档:http ://docs.amazonwebservices.com/AWSSDKforPHP/latest/#m=AmazonEC2/modify_instance_attribute
这是我能理解的最好的文档:
$instance_id = 'i-XXXXXXXX';
$volume_id = 'vol-XXXXXXXX';
$ec2->modify_instance_attribute ( $instance_id, array(
'Attribute' => 'blockDeviceMapping',
'BlockDeviceMapping' => array(
array(
'DeviceName' => '/dev/sdh',
'Ebs' => array(
array(
'VolumeId' => $volume_id,
'DeleteOnTermination' => true
)
)
)
)
));
但是调用返回
[Error] => CFSimpleXML Object
(
[Code] => InvalidParameterCombination
[Message] => No attributes specified.
)