Use this API to update netprofile.
340285
public static base_response update(nitro_service client, netprofile resource) throws Exception {
		netprofile updateresource = new netprofile();
		updateresource.name = resource.name;
		updateresource.srcip = resource.srcip;
		return updateresource.update_resource(client);
	}
241813
def update_profile(self, attrs, attr_map=None):
        
        user_attrs = dict_to_cognito(attrs,attr_map)
        self.client.update_user_attributes(
            UserAttributes=user_attrs,
            AccessToken=self.access_token
        )
1067656
def update(self, callback=None, errback=None, **kwargs):
        
        if not self.data:
            raise NetworkException('Network not loaded')

        def success(result, *args):
            self.data = result
            self.id = result['id']
            self.name = result['name']
            self.report = self._rest.report(self.id)
            if callback:
                return callback(self)
            else:
                return self

        return self._rest.update(self.id, callback=success, errback=errback,
                                 **kwargs)
531822
public function updateApiURL()
    {
        $this->apiURL  = $this->getEvidenceURL();
        $rowIdentifier = $this->getRecordID();
        if (empty($rowIdentifier)) {
            $rowIdentifier = $this->getRecordCode();
            if (empty($rowIdentifier)) {
                $rowIdentifier = $this->getExternalID();
            }
        }
        if (!empty($rowIdentifier)) {
            $this->apiURL .= '/'.self::urlEncode($rowIdentifier);
        }
        $this->apiURL .= '.'.$this->format;
    }
333208
public static base_responses update(nitro_service client, dbdbprofile resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			dbdbprofile updateresources[] = new dbdbprofile[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new dbdbprofile();
				updateresources[i].name = resources[i].name;
				updateresources[i].interpretquery = resources[i].interpretquery;
				updateresources[i].stickiness = resources[i].stickiness;
				updateresources[i].kcdaccount = resources[i].kcdaccount;
				updateresources[i].conmultiplex = resources[i].conmultiplex;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
1042664
def update_network(self, network, body=None):
        """"""
        return self.put(self.network_path % (network), body=body)
1108717
def update_subnetpool(self, subnetpool, body=None):
        """"""
        return self.put(self.subnetpool_path % (subnetpool), body=body)
115900
def modify(self, **params):
        """"""
        data = self.api_client.update_account(self.id, **params)
        self.update(data)
        return data
1213047
def update(self):
        
        # Init new stats
        stats = self.get_init_value()

        if self.input_method == 'local':
            # Update stats using the standard system lib

            # Grab network interface stat using the psutil net_io_counter method
            try:
                netiocounters = psutil.net_io_counters(pernic=True)
            except UnicodeDecodeError as e:
                logger.debug('Can not get network interface counters ({})'.format(e))
                return self.stats

            # Grab interface's status (issue #765)
            # Grab interface's speed (issue #718)
            netstatus = {}
            try:
                netstatus = psutil.net_if_stats()
            except OSError as e:
                # see psutil #797/glances #1106
                logger.debug('Can not get network interface status ({})'.format(e))

            # Previous network interface stats are stored in the network_old variable
            if not hasattr(self, 'network_old'):
                # First call, we init the network_old var
                try:
                    self.network_old = netiocounters
                except (IOError, UnboundLocalError):
                    pass
                return self.stats

            # By storing time data we enable Rx/s and Tx/s calculations in the
            # XML/RPC API, which would otherwise be overly difficult work
            # for users of the API
            time_since_update = getTimeSinceLastUpdate('net')

            # Loop over interfaces
            network_new = netiocounters
            for net in network_new:
                # Do not take hidden interface into account
                # or KeyError: 'eth0' when interface is not connected #1348
                if self.is_hide(net) or net not in netstatus:
                    continue
                try:
                    cumulative_rx = network_new[net].bytes_recv
                    cumulative_tx = network_new[net].bytes_sent
                    cumulative_cx = cumulative_rx + cumulative_tx
                    rx = cumulative_rx - self.network_old[net].bytes_recv
                    tx = cumulative_tx - self.network_old[net].bytes_sent
                    cx = rx + tx
                    netstat = {'interface_name': n(net),
                               'time_since_update': time_since_update,
                               'cumulative_rx': cumulative_rx,
                               'rx': rx,
                               'cumulative_tx': cumulative_tx,
                               'tx': tx,
                               'cumulative_cx': cumulative_cx,
                               'cx': cx,
                               # Interface status
                               'is_up': netstatus[net].isup,
                               # Interface speed in Mbps, convert it to bps
                               # Can be always 0 on some OSes
                               'speed': netstatus[net].speed * 1048576,
                               # Set the key for the dict
                               'key': self.get_key()
                               }
                except KeyError:
                    continue
                else:
                    # Append the interface stats to the list
                    stats.append(netstat)

            # Save stats to compute next bitrate
            self.network_old = network_new

        elif self.input_method == 'snmp':
            # Update stats using SNMP

            # SNMP bulk command to get all network interface in one shot
            try:
                netiocounters = self.get_stats_snmp(snmp_oid=snmp_oid[self.short_system_name],
                                                    bulk=True)
            except KeyError:
                netiocounters = self.get_stats_snmp(snmp_oid=snmp_oid['default'],
                                                    bulk=True)

            # Previous network interface stats are stored in the network_old variable
            if not hasattr(self, 'network_old'):
                # First call, we init the network_old var
                try:
                    self.network_old = netiocounters
                except (IOError, UnboundLocalError):
                    pass
            else:
                # See description in the 'local' block
                time_since_update = getTimeSinceLastUpdate('net')

                # Loop over interfaces
                network_new = netiocounters

                for net in network_new:
                    # Do not take hidden interface into account
                    if self.is_hide(net):
                        continue

                    try:
                        # Windows: a tips is needed to convert HEX to TXT
                        # http://blogs.technet.com/b/networking/archive/2009/12/18/how-to-query-the-list-of-network-interfaces-using-snmp-via-the-ifdescr-counter.aspx
                        if self.short_system_name == 'windows':
                            try:
                                interface_name = str(base64.b16decode(net[2:-2].upper()))
                            except TypeError:
                                interface_name = net
                        else:
                            interface_name = net

                        cumulative_rx = float(network_new[net]['cumulative_rx'])
                        cumulative_tx = float(network_new[net]['cumulative_tx'])
                        cumulative_cx = cumulative_rx + cumulative_tx
                        rx = cumulative_rx - float(self.network_old[net]['cumulative_rx'])
                        tx = cumulative_tx - float(self.network_old[net]['cumulative_tx'])
                        cx = rx + tx
                        netstat = {
                            'interface_name': interface_name,
                            'time_since_update': time_since_update,
                            'cumulative_rx': cumulative_rx,
                            'rx': rx,
                            'cumulative_tx': cumulative_tx,
                            'tx': tx,
                            'cumulative_cx': cumulative_cx,
                            'cx': cx}
                    except KeyError:
                        continue
                    else:
                        netstat['key'] = self.get_key()
                        stats.append(netstat)

                # Save stats to compute next bitrate
                self.network_old = network_new

        # Update the stats
        self.stats = stats

        return self.stats
90853
def _update_from_api_repr(self, resource):
        """"""
        self.destination = resource["destination"]
        self.filter_ = resource.get("filter")
        self._writer_identity = resource.get("writerIdentity")
261173
def updateNetwork(self, data, id, headers=None, query_params=None, content_type="application/json"):
        
        uri = self.client.base_url + "/network/"+id
        return self.client.post(uri, data, headers, query_params, content_type)
682873
def reload(self):
        """"""

        app_profile_pb = self.instance_admin_client.get_app_profile(self.name)

        # NOTE: _update_from_pb does not check that the project and
        #       app_profile ID on the response match the request.
        self._update_from_pb(app_profile_pb)
237677
def update(self, update):
        

        params = shlex.split(update)
        if params[0] in self.addr:
            self.addr[params[0]].update(*params)

        else:
            a = Addr(self)
            # add both name and IP address
            self.addr[params[0]] = a
            self.addr[params[1]] = a
            a.update(*params)
            self.notify("addrmap_added", *[a], **{})
283304
@Override
    public void patchProfile(@NonNull final String profileId, @NonNull Map<String, Object> profileDetails, String eTag, @Nullable Callback<ComapiResult<Map<String, Object>>> callback) {
        adapter.adapt(patchProfile(profileId, profileDetails, eTag), callback);
    }
540850
def add_network_profile(self, obj, params):
        """"""

        network_id = self._send_cmd_to_wpas(obj['name'], 'ADD_NETWORK', True)
        network_id = network_id.strip()

        params.process_akm()

        self._send_cmd_to_wpas(
                obj['name'],
                'SET_NETWORK {} ssid \"{}\"'.format(network_id, params.ssid))

        key_mgmt = ''
        if params.akm[-1] in [AKM_TYPE_WPAPSK, AKM_TYPE_WPA2PSK]:
            key_mgmt = 'WPA-PSK'
        elif params.akm[-1] in [AKM_TYPE_WPA, AKM_TYPE_WPA2]:
            key_mgmt = 'WPA-EAP'
        else:
            key_mgmt = 'NONE'

        if key_mgmt:
            self._send_cmd_to_wpas(
                    obj['name'],
                    'SET_NETWORK {} key_mgmt {}'.format(
                        network_id,
                        key_mgmt))

        proto = ''
        if params.akm[-1] in [AKM_TYPE_WPAPSK, AKM_TYPE_WPA]:
            proto = 'WPA'
        elif params.akm[-1] in [AKM_TYPE_WPA2PSK, AKM_TYPE_WPA2]:
            proto = 'RSN'

        if proto:
            self._send_cmd_to_wpas(
                    obj['name'],
                    'SET_NETWORK {} proto {}'.format(
                        network_id,
                        proto))

        if params.akm[-1] in [AKM_TYPE_WPAPSK, AKM_TYPE_WPA2PSK]:
            self._send_cmd_to_wpas(
                    obj['name'],
                    'SET_NETWORK {} psk \"{}\"'.format(network_id, params.key))

        return params
5872
@RequestMapping(value = "api/edit/activate", method = RequestMethod.POST)
    public
    @ResponseBody
    String activateProfile(Model model,
                           @RequestParam int profileId,
                           @RequestParam(defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUID) throws Exception {
        clientService.updateActive(profileId, clientUUID, true);
        return null;
    }
28976
public static base_response update(nitro_service client, autoscaleprofile resource) throws Exception {
		autoscaleprofile updateresource = new autoscaleprofile();
		updateresource.name = resource.name;
		updateresource.url = resource.url;
		updateresource.apikey = resource.apikey;
		updateresource.sharedsecret = resource.sharedsecret;
		return updateresource.update_resource(client);
	}