def update_registry(self, registry, registry_user, registry_pass, insecure=False, registry_type="<STR_LIT>", validate=True):
if self._registry_string_is_valid(registry):<EOL><INDENT>return [False, "<STR_LIT>"]<EOL><DEDENT>payload = {<EOL>'<STR_LIT>': registry,<EOL>'<STR_LIT>': registry_user,<EOL>'<STR_LIT>': registry_pass,<EOL>'<STR_LIT>': registry_type,<EOL>'<STR_LIT>': not insecure}<EOL>url = "<STR_LIT>".format(<EOL>base_url=self.url,<EOL>registry=registry,<EOL>validate=validate)<EOL>res = requests.put(url, data=json.dumps(payload), headers=self.hdrs, verify=self.ssl_verify)<EOL>if not self._checkResponse(res):<EOL><INDENT>return [False, self.lasterr]<EOL><DEDENT>return [True, res.json()]<EOL>
**Description**
            Update an existing image registry.

        **Arguments**
            - registry: Full hostname/port of registry. Eg. myrepo.example.com:5000
            - registry_user: Username
            - registry_pass: Password
            - insecure: Allow connection to registry without SSL cert checks (ex: if registry uses a self-signed SSL certificate)
            - registry_type: Specify the registry type. 'docker_v2' and 'awsecr' are supported (default='docker_v2')
            - validate: If set to 'False' will not attempt to validate registry/creds on registry add

        **Success Return Value**
            A JSON object representing the registry.