@click.argument('<STR_LIT>', type=types.Related('<STR_LIT>'))<EOL><INDENT>@click.option('<STR_LIT>', is_flag=True, default=False,<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>')<EOL>@click.option('<STR_LIT>', is_flag=True, default=False,<EOL>help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', required=False, type=int,<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL>@resources.command(use_fields_as_options=False, no_args_is_help=True)<EOL>def update(self, inventory_source, monitor=False, wait=False,<EOL>timeout=None, **kwargs):<DEDENT>
<EOL>debug.log('<STR_LIT>', header='<STR_LIT>')<EOL>r = client.get('<STR_LIT>' % (self.endpoint, inventory_source))<EOL>if not r.json()['<STR_LIT>']:<EOL><INDENT>raise exc.BadRequest('<STR_LIT>')<EOL><DEDENT>debug.log('<STR_LIT>', header='<STR_LIT>')<EOL>r = client.post('<STR_LIT>' % (self.endpoint, inventory_source), data={})<EOL>inventory_update_id = r.json()['<STR_LIT>']<EOL>if monitor or wait:<EOL><INDENT>if monitor:<EOL><INDENT>result = self.monitor(inventory_update_id, parent_pk=inventory_source, timeout=timeout)<EOL><DEDENT>elif wait:<EOL><INDENT>result = self.wait(inventory_update_id, parent_pk=inventory_source, timeout=timeout)<EOL><DEDENT>inventory = client.get('<STR_LIT>' % result['<STR_LIT>']).json()['<STR_LIT>']<EOL>result['<STR_LIT>'] = int(inventory)<EOL>return result<EOL><DEDENT>return {<EOL>'<STR_LIT:id>': inventory_update_id,<EOL>'<STR_LIT:status>': '<STR_LIT>'<EOL>}<EOL>
Update the given inventory source.

        =====API DOCS=====
        Update the given inventory source.

        :param inventory_source: Primary key or name of the inventory source to be updated.
        :type inventory_source: str
        :param monitor: Flag that if set, immediately calls ``monitor`` on the newly launched inventory update
                        rather than exiting with a success.
        :type monitor: bool
        :param wait: Flag that if set, monitor the status of the inventory update, but do not print while it is
                     in progress.
        :type wait: bool
        :param timeout: If provided with ``monitor`` flag set, this attempt will time out after the given number
                        of seconds.
        :type timeout: int
        :param `**kwargs`: Fields used to override underlyingl inventory source fields when creating and launching
                           an inventory update.
        :returns: Result of subsequent ``monitor`` call if ``monitor`` flag is on; Result of subsequent ``wait``
                  call if ``wait`` flag is on; dictionary of "status" if none of the two flags are on.
        :rtype: dict
        :raises tower_cli.exceptions.BadRequest: When the inventory source cannot be updated.

        =====API DOCS=====