Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for jobflow visibility

EMR jobflows now support the concept of visibility to be visible to
all IAM users within an account.  Expose the ability to query and
set this visible on a jobflow
  • Loading branch information...
commit 798e8ebcb167566e7c1b9fbae9eea89ee34172d2 1 parent ad983a9
Jeremy Katz authored committed
Showing with 19 additions and 0 deletions.
  1. +18 −0 boto/emr/connection.py
  2. +1 −0  boto/emr/emrobject.py
18 boto/emr/connection.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
1  boto/emr/emrobject.py
View
@@ -153,6 +153,7 @@ class JobFlow(EmrObject):
'TerminationProtected',
'Type',
'Value',
+ 'VisibleToAllUsers',
])
def __init__(self, connection=None):
Please sign in to comment.
Something went wrong with that request. Please try again.