Skip to content
This repository

Add support for jobflow visibility #1177

Merged
merged 1 commit into from over 1 year ago

2 participants

Jeremy Katz Mitch Garnaat
Jeremy Katz

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 visibility on a jobflow

Jeremy Katz katzj 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
798e8eb
Mitch Garnaat garnaat merged commit adf654b into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 2 authors.

Dec 11, 2012
Jeremy Katz katzj 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
798e8eb
This page is out of date. Refresh to see the latest.

Showing 2 changed files with 19 additions and 0 deletions. Show diff stats Hide diff stats

  1. +18 0 boto/emr/connection.py
  2. +1 0  boto/emr/emrobject.py
18 boto/emr/connection.py
@@ -372,6 +372,24 @@ def set_termination_protection(self, jobflow_id,
372 372
373 373 return self.get_status('SetTerminationProtection', params, verb='POST')
374 374
  375 + def set_visible_to_all_users(self, jobflow_id, visibility):
  376 + """
  377 + Set whether specified Elastic Map Reduce job flows are visible to all IAM users
  378 +
  379 + :type jobflow_ids: list or str
  380 + :param jobflow_ids: A list of job flow IDs
  381 +
  382 + :type visibility: bool
  383 + :param visibility: Visibility
  384 + """
  385 + assert visibility in (True, False)
  386 +
  387 + params = {}
  388 + params['VisibleToAllUsers'] = (visibility and "true") or "false"
  389 + self.build_list_params(params, [jobflow_id], 'JobFlowIds.member')
  390 +
  391 + return self.get_status('SetVisibleToAllUsers', params, verb='POST')
  392 +
375 393 def _build_bootstrap_action_args(self, bootstrap_action):
376 394 bootstrap_action_params = {}
377 395 bootstrap_action_params['ScriptBootstrapAction.Path'] = bootstrap_action.path
1  boto/emr/emrobject.py
@@ -153,6 +153,7 @@ class JobFlow(EmrObject):
153 153 'TerminationProtected',
154 154 'Type',
155 155 'Value',
  156 + 'VisibleToAllUsers',
156 157 ])
157 158
158 159 def __init__(self, connection=None):

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.