Authorize Security Group Ingress operation
The Authorize Security Group Ingress operation enables you to add permissions for a security group in Amazon EC2.
The following figure shows the sample <items> XML element for the Authorize Security Group Ingress operation.
Sample <items> XML element for the Authorize Security Group Ingress operation
<item>
<parameters>
<user-id></user-id>
<group-name></group-name>
<ip-permissions>
<!--Zero or more repetition-->
<item>
<ip-protocol></ip-protocol>
<from-port></from-port>
<to-port></to-port>
<groups>
<!--Zero or more repetition-->
<item>
<user-id></user-id>
<group-name></group-name>
</item>
</groups>
<ip-ranges>
<!--Zero or more repetition-->
<item>
<cidr-ip></cidr-ip>
</item>
</ip-ranges>
</item>
</ip-permissions>
</parameters>
</item>
</items>
The following table shows the adapter request elements for the Authorize Security Group Ingress operation.
Adapter request elements for the Authorize Security Group Ingress operation
Element | Definition | Required |
---|---|---|
<wsdl-location> | Specifies the target Web Service Description Language (WSDL) URL for Amazon EC2 | Conditional:
|
<endpoint-address> | Specifies the web service endpoint for the adapter to use while performing operations on Amazon EC2 instances across different regions | No |
<signature-properties> | Specifies the mode for signing the adapter request | Conditional:
|
<operation-name> | Contains the name of the operation: authorize-security-group-ingress | Yes |
<user-id> | Specifies the Access Key ID for the Amazon web services | No |
<group-name> | Specifies the name of the security group to modify | Yes |
<ip-permissions> | Specifies the set of permissions for the security group
| Yes |
<ip-protocol> | Specifies the protocol to be used to revoke permissions from the specified security group | Yes |
<from-port> | Specifies the start of the port range for the TCP and UDP protocols, or an ICMP type number | Yes |
<to-port> | Specifies the end of the port range for the TCP and UDP protocols, or an ICMP type number | Yes |
<groups> | Specifies the list of security group and user-id pairs | Yes |
<ip-ranges> | Specifies the list of CIDR IP ranges | Yes |
The following figure shows a sample adapter request for the Authorize Security Group Ingress operation.
Sample adapter request for the Authorize Security Group Ingress operation
<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>authorize-security-group-ingress</operation-name>
<parameters>
<user-id>AKIAJC5TEHAOKCDCZQ</user-id>
<group-name>test1</group-name>
<ip-permissions>
<item>
<ip-protocol>tcp</ip-protocol>
<from-port>80</from-port>
<to-port>80</to-port>
<groups>
<item>
<user-id>122872856587</user-id>
<group-name>sec1</group-name>
</item>
</groups>
<ip-ranges/>
</item>
<item>
<ip-protocol>tcp</ip-protocol>
<from-port>10</from-port>
<to-port>100</to-port>
<ip-ranges>
<item>
<cidr-ip>205.192.0.0/16</cidr-ip>
</item>
<item>
<cidr-ip>205.10.10.0/8</cidr-ip>
</item>
</ip-ranges>
</item>
</ip-permissions>
</parameters>
</amazon-ec2-request>
The following figure shows the response for the sample adapter request for the Authorize Security Group Ingress operation.
Sample adapter response for the Authorize Security Group Ingress operation
<metadata>
<status>success</status>
</metadata>
<AuthorizeSecurityGroupIngressResponse>
<requestId>9f5082d8-a54c-4ca3-833d-e19e5b6e4eae</requestId>
<return>true</return>
</AuthorizeSecurityGroupIngressResponse>
</amazon-ec2-response>