Modify Instance Attribute operation


The Modify Instance Attribute operation enables you to modify an attribute of an instance. You can modify only one attribute per call.

The following figure shows a sample <items> XML element for the Modify Instance Attribute operation. 

Sample <items> XML element for the Modify Instance Attribute operation

<items>
    <item>
        <parameters>
            <instance-id></instance-id>
            <instance-type>
                <value></value>
            </instance-type>
            <kernel>
                <value></value>
            </kernel>
            <ramdisk>
                <value></value>
            </ramdisk>
            <user-data>
                <value></value>
            </user-data>
            <instance-initiated-shutdown-behavior>
                <value></value>
            </instance-initiated-shutdown-behavior>
            <block-device-mapping>
                <!--Zero or more repetition-->
                <item>
                    <device-name></device-name>
                    <!--You have a CHOICE of the next 3 items at this level-->
                    <virtual-name></virtual-name>
                    <ebs>
                        <volume-id></volume-id>
                        <!--Optional:-->
                        <delete-on-termination></delete-on-termination>
                    </ebs>
                    <no-device/>
                </item>
            </block-device-mapping>
        </parameters>
    </item>
</items>

The following table describes the elements for this adapter request. 

Adapter request elements for the Modify Instance Attribute operation

Element

Definition

Required

<wsdl-location>

Specifies the target Web Service Description Language (WSDL) URL for Amazon EC2

Examples:

Conditional:

  • Required if not specified in the request
  • If specified in the configuration and request, the value in the request overrides the value in the configuration
<endpoint-address>

Specifies the web service endpoint for the adapter to use while performing operations on Amazon EC2 instances across different regions
Default value: US East region: http://us-east-1.ec2.amazonaws.com/

No

<signature-properties>

Specifies the mode for signing the adapter request

Conditional:

  • Required if not specified in the configuration
  • If <signature-properties mode = "key-files">, requires <private-key-file>
     and <certificate-file>
  • If <signature-properties mode = "key-data">, requires <private-key-data> and <certificate-data>
<operation-name>

Contains the name of the operation: modify-instance-attribute

Yes

<instance-id>

Specifies the instance ID for the instance whose attribute information is to be retrieved

Yes

<instance-type>

Specifies the type of the instance

No

<kernel>

Specifies the kernel ID for the instance

No

<ramdisk>

Specifies the RAM disk ID for the instance

No

<user-data>

Specifies the user data for the instance

No

<instance-initiated-shutdown-behavior>

Specifies whether the Amazon EBS volumes for the instances are stopped or terminated when the instance is shut down

No

<block-device-mapping>

Specifies the Block device mapping set

No

The following figure shows a sample adapter request for the Modify Instance Attribute operation. 

Sample adapter request for the Modify Instance Attribute operation

<amazon-ec2-request>
    <wsdl-location>http://ec2.amazonaws.com/doc/2009-11-30/</wsdl-location>
    <endpoint-address>http://us-east-1.ec2.amazonaws.com/</endpoint-address>
    <signature-properties mode = "key-files">
        <private-key-file>C:\Security\
pk-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</private-key-file>
        <certificate-file>C:\Security\
cert-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</certificate-file>
    </signature-properties>
    <operation-name>modify-instance-attribute</operation-name>
    <parameters>
        <instance-id>i-bc6c52d4</instance-id>
        <instance-type>
            <value>c1.medium</value>
        </instance-type>
    </parameters>
</amazon-ec2-request>

The following figure shows the response for the sample Modify Instance Attribute operation. 

Sample adapter response for the Modify Instance Attribute operation

<amazon-ec2-response>
    <metadata>
        <status>success</status>
    </metadata>
    <ModifyInstanceAttributeResponse>
        <requestId>b2544b9e-65e1-4fd2-b5b4-0e47fbadf6d3</requestId>
        <return>true</return>
    </ModifyInstanceAttributeResponse>
</amazon-ec2-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 20.19.01