Permalink
Browse files

Merge pull request #1177 from katzj/emr-job-visibility

Add support for jobflow visibility
  • Loading branch information...
2 parents 55645de + 798e8eb commit adf654bba435c1f8c0350b84462a1ed59b5975a6 @garnaat garnaat committed Jan 8, 2013
Showing with 19 additions and 0 deletions.
  1. +18 −0 boto/emr/connection.py
  2. +1 −0 boto/emr/emrobject.py
View
@@ -372,6 +372,24 @@ def set_termination_protection(self, jobflow_id,
return self.get_status('SetTerminationProtection', params, verb='POST')
+ def set_visible_to_all_users(self, jobflow_id, visibility):
+ """
+ Set whether specified Elastic Map Reduce job flows are visible to all IAM users
+
+ :type jobflow_ids: list or str
+ :param jobflow_ids: A list of job flow IDs
+
+ :type visibility: bool
+ :param visibility: Visibility
+ """
+ assert visibility in (True, False)
+
+ params = {}
+ params['VisibleToAllUsers'] = (visibility and "true") or "false"
+ self.build_list_params(params, [jobflow_id], 'JobFlowIds.member')
+
+ return self.get_status('SetVisibleToAllUsers', params, verb='POST')
+
def _build_bootstrap_action_args(self, bootstrap_action):
bootstrap_action_params = {}
bootstrap_action_params['ScriptBootstrapAction.Path'] = bootstrap_action.path
View
@@ -153,6 +153,7 @@ class JobFlow(EmrObject):
'TerminationProtected',
'Type',
'Value',
+ 'VisibleToAllUsers',
])
def __init__(self, connection=None):

0 comments on commit adf654b

Please sign in to comment.