@resources.command(use_fields_as_options=False)<EOL><INDENT>@click.argument('<STR_LIT>')<EOL>@click.argument('<STR_LIT:value>', default=None, required=False,<EOL>type=types.Variables())<EOL>def modify(self, setting, value):<DEDENT>
prev_value = new_value = self.get(setting)['<STR_LIT:value>']<EOL>answer = OrderedDict()<EOL>encrypted = '<STR_LIT>' in six.text_type(prev_value)<EOL>if encrypted or six.text_type(prev_value) != six.text_type(value):<EOL><INDENT>if setting == '<STR_LIT>':<EOL><INDENT>r = client.post('<STR_LIT>',<EOL>data=self.coerce_type(setting, value))<EOL>new_value = r.json()<EOL><DEDENT>else:<EOL><INDENT>r = client.patch(<EOL>self.endpoint,<EOL>data={setting: self.coerce_type(setting, value)}<EOL>)<EOL>new_value = r.json()[setting]<EOL><DEDENT>answer.update(r.json())<EOL><DEDENT>changed = encrypted or (prev_value != new_value)<EOL>answer.update({<EOL>'<STR_LIT>': changed,<EOL>'<STR_LIT:id>': setting,<EOL>'<STR_LIT:value>': new_value,<EOL>})<EOL>return answer<EOL>
Modify an already existing object.

        Positional argument SETTING is the setting name and VALUE is its value,
        which can be provided directly or obtained from a file name if prefixed with '@'.

        =====API DOCS=====
        Modify an already existing Tower setting.

        :param setting: The name of the Tower setting to be modified.
        :type setting: str
        :param value: The new value of the Tower setting.
        :type value: str
        :returns: A dictionary combining the JSON output of the modified resource, as well as two extra fields:
                  "changed", a flag indicating if the resource is successfully updated; "id", an integer which
                  is the primary key of the updated object.
        :rtype: dict

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