returns an Api Id that matches the given api_name and the hardcoded _Swagger.AWS_API_DESCRIPTION
        as the api description
181982
def _resolve_api_id(self):
        '''
        
        '''
        apis = __salt__['boto_apigateway.describe_apis'](name=self.rest_api_name,
                                                         description=_Swagger.AWS_API_DESCRIPTION,
                                                         **self._common_aws_args).get('restapi')
        if apis:
            if len(apis) == 1:
                self.restApiId = apis[0].get('id')
            else:
                raise ValueError('Multiple APIs matching given name {0} and '
                                 'description {1}'.format(self.rest_api_name, self.info_json))
59671
private Api getApiInternal(String apiOrgId, String apiId, String apiVersion) {
        String key = getApiIndex(apiOrgId, apiId, apiVersion);
        Api api;
        synchronized (mutex) {
            api = (Api) getMap().get(key);
        }
        return api;
    }
633793
def describe(Name,
             region=None, key=None, keyid=None, profile=None):
    '''
    

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        trails = conn.describe_trails(trailNameList=[Name])
        if trails and trails.get('trailList'):
            keys = ('Name', 'S3BucketName', 'S3KeyPrefix',
                    'SnsTopicName', 'IncludeGlobalServiceEvents',
                    'IsMultiRegionTrail',
                    'HomeRegion', 'TrailARN',
                    'LogFileValidationEnabled', 'CloudWatchLogsLogGroupArn',
                    'CloudWatchLogsRoleArn', 'KmsKeyId')
            trail = trails['trailList'].pop()
            return {'trail': dict([(k, trail.get(k)) for k in keys])}
        else:
            return {'trail': None}
    except ClientError as e:
        err = __utils__['boto3.get_error'](e)
        if e.response.get('Error', {}).get('Code') == 'TrailNotFoundException':
            return {'trail': None}
        return {'error': __utils__['boto3.get_error'](e)}
23735
def get_id(name=None, tags=None, region=None, key=None,
           keyid=None, profile=None, in_states=None, filters=None):

    '''
    

    '''
    instance_ids = find_instances(name=name, tags=tags, region=region, key=key,
                                  keyid=keyid, profile=profile, in_states=in_states,
                                  filters=filters)
    if instance_ids:
        log.info("Instance ids: %s", " ".join(instance_ids))
        if len(instance_ids) == 1:
            return instance_ids[0]
        else:
            raise CommandExecutionError('Found more than one instance '
                                        'matching the criteria.')
    else:
        log.warning('Could not find instance.')
        return None
730592
def get_package_id(self, name):
        
        json_scheme = self.gen_def_json_scheme('GetPreConfiguredPackages', dict(HypervisorType=4))
        json_obj = self.call_method_post(method='GetPreConfiguredPackages ', json_scheme=json_scheme)
        for package in json_obj['Value']:
            packageId  = package['PackageID']
            for description in package['Descriptions']:
                languageID = description['LanguageID']
                packageName = description['Text']
                if languageID == 2 and packageName.lower() == name.lower():
                    return packageId
183408
def description_set(id, description)
      wf_source_id?(id)
      api.post([id, 'description'].uri_concat, description,
               'application/json')
    end
1057135
def api():
    
    # the template context
    context = {
        'name': 'api',
        'secret_key': random_string(32)
    }

    render_template(template='common', context=context)
    render_template(template='api', context=context)
151439
private String getApiId(Api api) {
        return getApiId(api.getOrganizationId(), api.getApiId(), api.getVersion());
    }
242336
def describe_api_model(restApiId, modelName, flatten=True, region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        model = conn.get_model(restApiId=restApiId, modelName=modelName, flatten=flatten)
        return {'model': _convert_datetime_str(model)}
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
313800
function getRequestId(req) {
  const id = uuid.v1();
  req.id = id;
  return {
    req_id: id,
  };
}
940193
def django_api(
            self,
            name,
            introduced_at,
            undocumented=False,
            deprecated_at=None,
            title=None,
            **options):
        
        from acceptable.djangoutil import DjangoAPI
        location = get_callsite_location()
        api = DjangoAPI(
            self,
            name,
            introduced_at,
            options,
            location=location,
            undocumented=undocumented,
            deprecated_at=deprecated_at,
            title=title,
        )
        self.metadata.register_api(self.name, self.group, api)
        return api
568465
def describe_api_resources(restApiId, region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        resources = sorted(_multi_call(conn.get_resources, 'items', restApiId=restApiId),
                           key=lambda k: k['path'])

        return {'resources': resources}
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
654100
def _get_id(self, id_, pkg_name):
        
        collection = JSONClientValidated('id',
                                         collection=pkg_name + 'Ids',
                                         runtime=self._runtime)
        try:
            result = collection.find_one({'aliasIds': {'$in': [str(id_)]}})
        except errors.NotFound:
            return id_
        else:
            return Id(result['_id'])
999037
def _get_api_id(self, event_properties):
        
        api_id = event_properties.get("RestApiId")
        if isinstance(api_id, dict) and "Ref" in api_id:
            api_id = api_id["Ref"]
        return api_id
271010
def describe_api_keys(region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        apikeys = _multi_call(conn.get_api_keys, 'items')

        return {'apiKeys': [_convert_datetime_str(apikey) for apikey in apikeys]}
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
1165430
def get_id(name=None, cidr=None, tags=None, region=None, key=None, keyid=None,
           profile=None):
    '''
    

    '''

    try:
        return {'id': _get_id(vpc_name=name, cidr=cidr, tags=tags, region=region,
                              key=key, keyid=keyid, profile=profile)}
    except BotoServerError as e:
        return {'error': __utils__['boto.get_error'](e)}
150228
def _get_key_id(alias, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    key_metadata = describe_key(
        alias, region, key, keyid, profile
    )['key_metadata']
    return key_metadata['KeyId']