Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (76 sloc) 2.98 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--This work by Eucalyptus Systems is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. See the accompanying LICENSE file for more information.-->
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference outputclass="docs one-sidebar sidebar-first" id="euare-useraddpolicy">
<title>euare-useraddpolicy</title>
<shortdesc>Adds a new policy for a user.</shortdesc>
<refbody>
<section>
<title>Syntax</title>
<codeblock>euare-useraddpolicy -p POLICY_NAME -e {Allow,Deny} -u USER -a ACTION [-r RESOURCE]</codeblock>
</section>
<section>
<title>Options</title>
<table>
<tgroup cols="3">
<colspec colwidth="25*"/>
<colspec colwidth="60*"/>
<colspec colwidth="15*"/>
<thead>
<row>
<entry>Option</entry>
<entry>Description</entry>
<entry>Required</entry>
</row>
</thead>
<tbody>
<row>
<entry><codeph>-u, --user-name <i>user_name</i></codeph></entry>
<entry>Name of the user to associate the policy with</entry>
<entry align="center">Yes</entry>
</row>
<row>
<entry><codeph>-p, --policy-name <i>policy_name</i></codeph></entry>
<entry>Name of the policy document</entry>
<entry align="center">Yes</entry>
</row>
<row>
<entry><codeph>-e, --effect <i>effect</i></codeph></entry>
<entry>The value for the policy's <codeph>Effect</codeph> element. <p>Valid values:
<codeph>Allow</codeph> | <codeph>Deny</codeph></p></entry>
<entry align="center">Yes</entry>
</row>
<row>
<entry><codeph>-a, --action <i>action</i></codeph></entry>
<entry>The value for the policy's <codeph>Action</codeph> element. This value
specifies both the service and action you want to allow or deny permission to. For
example: <codeph>-a iam:ListAccessKeys</codeph>. </entry>
<entry align="center">Yes</entry>
</row>
<row>
<entry><codeph>-o</codeph></entry>
<entry>This option tells Eucalyptus to output the JSON policy document that <codeph>euare-useraddpolicy</codeph> created for
you.</entry>
<entry align="center">No</entry>
</row>
</tbody>
</tgroup>
</table>
</section>
<section conref="../shared/euare-common.dita#euare-common/euare_common_options"/>
<section>
<title>Output</title>
<p>Eucalyptus returns the policy</p>
</section>
<section>
<title>Example</title>
<p>The following policy allows myuser all actions in EC2.</p>
<codeblock>euare-useraddpolicy -u myuser -p mypolicy -e Allow -a 'ec2:*' -r '*'</codeblock>
<p>The following policy allows myuser all actions in EC2 and outputs the generated JSON
policy.</p>
<codeblock>euare-useraddpolicy -u myuser -p mypolicy -e Allow -a 'ec2:*' -r '*' -o
{"Version":"2008-10-17","Statement":[{"Effect":"Allow",
"Action":["ec2:*"], "Resource":["*"]}]}</codeblock>
</section>
</refbody>
</reference>
Jump to Line
Something went wrong with that request. Please try again.