summaryrefslogtreecommitdiff
path: root/boto/iam
diff options
context:
space:
mode:
authorShaun Brady <shaun.brady@nimbisservices.com>2015-08-07 00:03:16 -0400
committerShaun Brady <shaun.brady@nimbisservices.com>2015-08-07 00:03:16 -0400
commit068534d5c099e847a356e5475684e669d494af77 (patch)
tree13d74722c975806c1d6b230b212f72c5531f60be /boto/iam
parentb6e82c2b54f85c762b43026a2088973db86f2eef (diff)
downloadboto-068534d5c099e847a356e5475684e669d494af77.tar.gz
Adding Description parameter to CreatePolicy and to GetPolicy test
Diffstat (limited to 'boto/iam')
-rw-r--r--boto/iam/connection.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/boto/iam/connection.py b/boto/iam/connection.py
index ceaf5935..f66931f4 100644
--- a/boto/iam/connection.py
+++ b/boto/iam/connection.py
@@ -1641,7 +1641,8 @@ class IAMConnection(AWSQueryConnection):
params['RequireUppercaseCharacters'] = str(require_uppercase_characters).lower()
return self.get_response('UpdateAccountPasswordPolicy', params)
- def create_policy(self, policy_name, policy_document, path='/'):
+ def create_policy(self, policy_name, policy_document, path='/',
+ description=None):
"""
Create a policy.
@@ -1655,10 +1656,16 @@ class IAMConnection(AWSQueryConnection):
:param path: The path in which the policy will be created.
Defaults to /.
+ :type description: string
+ :param path: A description of the new policy.
+
"""
params = {'PolicyName': policy_name,
'PolicyDocument': policy_document,
'Path': path}
+ if description is not None:
+ params['Description'] = str(description)
+
return self.get_response('CreatePolicy', params)
def create_policy_version(