[ZF-10089] Zend_Log
[zend.git] / documentation / manual / en / module_specs / Zend_Service_Amazon_Ec2-Keypair.xml
blob14bd182382b21f441084b347da39529e3b1f54c5
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect1 id="zend.service.amazon.ec2.keypairs">
4     <title>Zend_Service_Amazon_Ec2: Keypairs</title>
6     <para>
7         Keypairs are used to access instances.
8     </para>
10     <example id="zend.service.amazon.ec2.keypairs.create">
11         <title>Creating a new Amazon Keypair</title>
13         <para>
14             <code>create</code>, creates a new 2048 bit RSA key pair and
15             returns a unique ID that can be used to reference this key
16             pair when launching new instances.
17         </para>
19         <para>
20             <code>create</code> returns an array which contains the keyName,
21             keyFingerprint and keyMaterial.
22         </para>
24         <programlisting language="php"><![CDATA[
25 $ec2_kp = new Zend_Service_Amazon_Ec2_Keypair('aws_key','aws_secret_key');
26 $return = $ec2_kp->create('my-new-key');
27 ]]></programlisting>
28     </example>
30     <example id="zend.service.amazon.ec2.keypairs.delete">
31         <title>Deleting an Amazon Keypair</title>
33         <para>
34             <code>delete</code>, will delete the key pair. This will only
35             prevent it from being used with new instances. Instances currently
36             running with the keypair will still allow you to access them.
37         </para>
39         <para>
40             <code>delete</code> returns boolean <constant>TRUE</constant> or
41             <constant>FALSE</constant>
42         </para>
44         <programlisting language="php"><![CDATA[
45 $ec2_kp = new Zend_Service_Amazon_Ec2_Keypair('aws_key','aws_secret_key');
46 $return = $ec2_kp->delete('my-new-key');
47 ]]></programlisting>
48     </example>
50     <example id="zend.service.amazon.ec2.describe">
51         <title>Describe an Amazon Keypair</title>
53         <para>
54             <code>describe</code> returns information about key pairs available to you.
55             If you specify key pairs, information about those key pairs is returned. Otherwise,
56             information for all registered key pairs is returned.
57         </para>
59         <para>
60             <code>describe</code> returns an array which contains keyName and keyFingerprint
61         </para>
63         <programlisting language="php"><![CDATA[
64 $ec2_kp = new Zend_Service_Amazon_Ec2_Keypair('aws_key','aws_secret_key');
65 $return = $ec2_kp->describe('my-new-key');
66 ]]></programlisting>
67     </example>
68 </sect1>