Delete a deployed REST API Gateway.
335764
def undeploy_api_gateway(self, lambda_name, domain_name=None, base_path=None):
        
        print("Deleting API Gateway..")

        api_id = self.get_api_id(lambda_name)

        if domain_name:

            # XXX - Remove Route53 smartly here?
            # XXX - This doesn't raise, but doesn't work either.

            try:
                self.apigateway_client.delete_base_path_mapping(
                    domainName=domain_name,
                    basePath='(none)' if base_path is None else base_path
                )
            except Exception as e:
                # We may not have actually set up the domain.
                pass

        was_deleted = self.delete_stack(lambda_name, wait=True)

        if not was_deleted:
            # try erasing it with the older method
            for api in self.get_rest_apis(lambda_name):
                self.apigateway_client.delete_rest_api(
                    restApiId=api['id']
                )
746217
def remove(self):

        '''
             
        '''

        # https://developer.couchbase.com/documentation/mobile/1.5/references/sync-gateway/admin-rest-api/index.html#/database/delete__db__

        title = '%s.remove' % self.__class__.__name__

    # validate admin access
        if not self.admin_access:
            raise Exception('%s requires admin access.' % title)

    # flush files on server
        if self.configs['server'].find('http:') > -1:
            flush_url = self.configs['server'] + '/pools/%s/buckets/%s/controller/doFlush' % (self.configs['pool'], self.bucket_name)
            response = requests.post(flush_url)
            try:
                print(response.json())
            except:
                print(response.status_code)
    
    # else (in dev) iterate over files and users and purge 
        elif self.configs['server'].find('walrus') > -1:
            for doc in self.list(purge_deleted=True):
                self.purge(doc['_id'])
            user_list = self.list_users()
            for uid in user_list:
                self.delete_user(uid)
            self.delete_view()

    # delete bucket from configs
        delete_url = self.bucket_url + '/'
        requests.delete(delete_url)
        
    # report outcome
        exit_msg = 'Bucket "%s" removed from database.' % self.bucket_name
        self.printer(exit_msg)
        
        return exit_msg
614183
def _delete(self, url):
        """"""
        r = requests.delete(self._api_prefix + url,
            headers=self.headers,
            auth=self.auth,
            allow_redirects=False,
        )
        return self._action(r)
1328495
def cli(env, account_id, origin_id):
    """"""

    manager = SoftLayer.CDNManager(env.client)
    manager.remove_origin(account_id, origin_id)
499934
def delete_api_method_response(restApiId, resourcePath, httpMethod, statusCode,
                               region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        resource = describe_api_resource(restApiId, resourcePath, region=region,
                                         key=key, keyid=keyid, profile=profile).get('resource')
        if resource:
            conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
            conn.delete_method_response(restApiId=restApiId, resourceId=resource['id'],
                                        httpMethod=httpMethod, statusCode=str(statusCode))  # future lint: disable=blacklisted-function
            return {'deleted': True}
        return {'deleted': False, 'error': 'no such resource'}
    except ClientError as e:
        return {'deleted': False, 'error': __utils__['boto3.get_error'](e)}
194148
def remove_router_from_hosting_device(self, client, hosting_device_id,
                                          router_id):
        """"""
        res_path = hostingdevice.HostingDevice.resource_path
        return client.delete((res_path + DEVICE_L3_ROUTERS + "/%s") % (
            hosting_device_id, router_id))
1025677
def disconnect_network_gateway(self, gateway_id, body=None):
        """"""
        base_uri = self.network_gateway_path % gateway_id
        return self.put("%s/disconnect_network" % base_uri, body=body)
386156
def delete(self):
        
        res = self.rest_client.session.delete(self.rest_self)
        _handle_http_errors(res)
640131
def delete_fallbackserver(self, serverid, data):
        """"""
        return self.api_call(
            ENDPOINTS['fallbackservers']['delete'],
            dict(serverid=serverid),
            body=data)
627747
def delete_client():
    """"""
    preserve_cache = request.args.get('preserve_cache', False)
    delete_client(g.client_id, preserve_cache)
    return jsonify({'Success': True})
380671
def remove(self, transport):
        
        if transport.uid in self.transports:
            del (self.transports[transport.uid])
1112641
def destroy(self):
        """"""

        r = self._h._http_resource(
            method='DELETE',
            resource=('apps', self.name)
        )
        return r.ok
455947
def delete(self) :
        """"""
        r = self.connection.session.delete(self.URL)
        data = r.json()
        if not r.status_code == 200 or data["error"] :
            raise DeletionError(data["errorMessage"], data)
1126630
def delete_api_integration_response(restApiId, resourcePath, httpMethod, statusCode,
                                    region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        resource = describe_api_resource(restApiId, resourcePath, region=region,
                                         key=key, keyid=keyid, profile=profile).get('resource')
        if resource:
            conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
            conn.delete_integration_response(restApiId=restApiId, resourceId=resource['id'],
                                             httpMethod=httpMethod, statusCode=statusCode)
            return {'deleted': True}
        return {'deleted': False, 'error': 'no such resource'}
    except ClientError as e:
        return {'deleted': False, 'error': __utils__['boto3.get_error'](e)}
1326530
def delete(method, hmc, uri, uri_parms, logon_required):
        """"""
        try:
            metrics_context = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        hmc.metrics_contexts.remove(metrics_context.oid)
23677
def endpoint_delete(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.delete_endpoint(**kwargs)
371522
def delete(self, data, *args):
        
        path = self.get_resource_name()
        result = self.perform_api_call(self.REST_DELETE, path, data=data)
        return result