Flushes cache for the stage identified by stageName from API identified by restApiId

    CLI Example:

    .. code-block:: bash

        salt myminion boto_apigateway.flush_api_stage_cache restApiId stageName
493603
def flush_api_stage_cache(restApiId, stageName, region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        conn.flush_stage_cache(restApiId=restApiId, stageName=stageName)
        return {'flushed': True}
    except ClientError as e:
        return {'flushed': False, 'error': __utils__['boto3.get_error'](e)}
1179570
def disassociate_api_key_stagekeys(apiKey, stagekeyslist, region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        pvlist = [('/stages', stagekey) for stagekey in stagekeyslist]
        response = _api_key_patch_remove(conn, apiKey, pvlist)
        return {'disassociated': True}
    except ClientError as e:
        return {'disassociated': False, 'error': __utils__['boto3.get_error'](e)}
233333
def _flush(self):
        
        # Initialize multi-part upload
        if 'UploadId' not in self._upload_args:
            with _handle_client_error():
                self._upload_args[
                    'UploadId'] = self._client.create_multipart_upload(
                    **self._client_kwargs)['UploadId']

        # Upload part with workers
        response = self._workers.submit(
            self._client.upload_part, Body=self._get_buffer().tobytes(),
            PartNumber=self._seek, **self._upload_args)

        # Save part information
        self._write_futures.append(
            dict(response=response, PartNumber=self._seek))
1155368
public function flush()
    {
        IlluminateCache::forget($this->key(Constants::BUILD_CACHE_KEY));

        IlluminateCache::forget($this->key(Constants::VERSION_CACHE_KEY));
    }
1314903
def _cleanup_api(self):
        '''
        
        '''
        resources = __salt__['boto_apigateway.describe_api_resources'](restApiId=self.restApiId,
                                                                       **self._common_aws_args)
        if resources.get('resources'):
            res = resources.get('resources')[1:]
            res.reverse()
            for resource in res:
                delres = __salt__['boto_apigateway.delete_api_resources'](restApiId=self.restApiId,
                                                                          path=resource.get('path'),
                                                                          **self._common_aws_args)
                if not delres.get('deleted'):
                    return delres

        models = __salt__['boto_apigateway.describe_api_models'](restApiId=self.restApiId, **self._common_aws_args)
        if models.get('models'):
            for model in models.get('models'):
                delres = __salt__['boto_apigateway.delete_api_model'](restApiId=self.restApiId,
                                                                      modelName=model.get('name'),
                                                                      **self._common_aws_args)
                if not delres.get('deleted'):
                    return delres

        return {'deleted': True}
1274241
private void flushSinkAtInterval() {
    Object flushIntervalObj = sinkConfig.get(MetricsSinksConfig.CONFIG_KEY_FLUSH_FREQUENCY_MS);

    // If the config is not set, we consider the flush() would never be invoked
    if (flushIntervalObj != null) {
      final Duration flushInterval = TypeUtils.getDuration(flushIntervalObj, ChronoUnit.MILLIS);

      Runnable flushSink = new Runnable() {
        @Override
        public void run() {
          metricsSink.flush();
          //Plan itself in future
          slaveLooper.registerTimerEvent(flushInterval, this);
        }
      };

      // Plan the runnable explicitly at the first time
      slaveLooper.registerTimerEvent(flushInterval, flushSink);
    }
  }
230794
def flush(self):
        """"""
        self.stages = []
        self.stagenames = []

        if not self.queue:
            return

        if self.print_statistics:#pragma: no cover
            print("LEN OF QUENE", len(self))
            t = time()

        if self._chain._collect_compiler_artifacts:
            self._compile(debug=True, stages=self.stages,
                          stagenames=self.stagenames)
        else:
            self._compile()

        if self.debug:
            print("ABOUT TO EXEC", self.queue)#pragma: no cover

        if self.print_statistics:#pragma: no cover
            print("COMPILE TIME", time()-t)
            print("TOTAL BITS OF ALL PRIMS", sum(
                (p.count for p in self.queue if hasattr(p, 'count'))))
            t = time()

        self._chain._controller._execute_primitives(self.queue)

        if self.print_statistics:
            print("EXECUTE TIME", time()-t)#pragma: no cover

        self.queue = []
        self._chain._sm.state = self._fsm.state
251891
def _flush(self, commit=True, using=None):
        
        if commit:
            # XXX: multi-set?
            if self._uses_savepoints():
                self._commit_all_savepoints(using)
            c = self.local.mget('%s_%s_*' %
                                (self.prefix, self._trunc_using(using)))
            for key, value in c.items():
                self.cache_backend.set(key, value, self.timeout)
        else:
            if self._uses_savepoints():
                self._rollback_all_savepoints(using)
        self._clear(using)
        self._clear_sid_stack(using)
282459
private static void apiReady() {

        loadingApi = false;
        for (Command callback : onApiReady) {
            callback.execute();
        }
        onApiReady.clear();
    }
726895
def flush(self, safe=None):
		''' '''
		result = None
		for index, op in enumerate(self.queue):
			try:
				result = op.execute()
			except:
				self.clear_queue()
				self.clear_cache()
				raise
		self.clear_queue()
		return result
783087
def update_stage_config(    self,
                                project_name,
                                stage_name,
                                cloudwatch_log_level,
                                cloudwatch_data_trace,
                                cloudwatch_metrics_enabled
                            ):
        
        if cloudwatch_log_level not in self.cloudwatch_log_levels:
            cloudwatch_log_level = 'OFF'

        for api in self.get_rest_apis(project_name):
            self.apigateway_client.update_stage(
                restApiId=api['id'],
                stageName=stage_name,
                patchOperations=[
                    self.get_patch_op('logging/loglevel', cloudwatch_log_level),
                    self.get_patch_op('logging/dataTrace', cloudwatch_data_trace),
                    self.get_patch_op('metrics/enabled', cloudwatch_metrics_enabled),
                ]
            )
710776
def remove_api_key(self, api_id, stage_name):
        
        response = self.apigateway_client.get_api_keys(
            limit=1,
            nameQuery='{}_{}'.format(stage_name, api_id)
        )
        for api_key in response.get('items'):
            self.apigateway_client.delete_api_key(
                apiKey="{}".format(api_key['id'])
            )
1246442
def caching_jobs(&blk)
      _was_caching = caching_jobs?
      cache_jobs
      blk.call
      flush_jobs
      self.is_caching_jobs = _was_caching
      self
    end
341324
def flush(self, queue_name):
        
        for name in (queue_name, dq_name(queue_name), xq_name(queue_name)):
            self.channel.queue_purge(name)
195417
def describe_api_stages(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        stages = conn.get_stages(restApiId=restApiId, deploymentId=deploymentId)
        return {'stages': [_convert_datetime_str(stage) for stage in stages['item']]}
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
1004017
public function flush()
    {
        /** @var Cache $cache */
        $cache = $this->app['phraseanet.cache-service'];
        $flushOK = $cache->flushAll() ? 'ok' : 'ko';

        return $this->app->redirectPath('admin_dashboard', ['flush_cache' => $flushOK]);
    }
1064213
def stage_http_request(self, conn_id, version, url, target, method, headers,
                           payload):
        """"""
        # pylint: disable=attribute-defined-outside-init
        self._http_request_version = version
        self._http_request_conn_id = conn_id
        self._http_request_url = url
        self._http_request_target = target
        self._http_request_method = method
        self._http_request_headers = headers
        self._http_request_payload = payload