Returns a list of `DBParameterGroup` parameters.
    CLI example to description of parameters ::

        salt myminion boto_rds.describe_parameters parametergroupname\
            region=us-east-1
762284
def describe_parameters(name, Source=None, MaxRecords=None, Marker=None,
                        region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    res = __salt__['boto_rds.parameter_group_exists'](name, tags=None,
                                                      region=region, key=key,
                                                      keyid=keyid,
                                                      profile=profile)
    if not res.get('exists'):
        return {'result': False,
                'message': 'Parameter group {0} does not exist'.format(name)}

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        if not conn:
            return {'result': False,
                    'message': 'Could not establish a connection to RDS'}

        kwargs = {}
        kwargs.update({'DBParameterGroupName': name})
        for key in ('Marker', 'Source'):
            if locals()[key] is not None:
                kwargs[key] = str(locals()[key])  # future lint: disable=blacklisted-function

        if locals()['MaxRecords'] is not None:
            kwargs['MaxRecords'] = int(locals()['MaxRecords'])

        pag = conn.get_paginator('describe_db_parameters')
        pit = pag.paginate(**kwargs)

        keys = ['ParameterName', 'ParameterValue', 'Description',
                'Source', 'ApplyType', 'DataType', 'AllowedValues',
                'IsModifieable', 'MinimumEngineVersion', 'ApplyMethod']

        parameters = odict.OrderedDict()
        ret = {'result':  True}

        for p in pit:
            for result in p['Parameters']:
                data = odict.OrderedDict()
                for k in keys:
                    data[k] = result.get(k)

                parameters[result.get('ParameterName')] = data

        ret['parameters'] = parameters
        return ret
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
414643
def list_processed_parameter_groups(self):
        
        # Server does not do pagination on listings of this resource.
        # Return an iterator anyway for similarity with other API methods
        path = '/archive/{}/parameter-groups'.format(self._instance)
        response = self._client.get_proto(path=path)
        message = archive_pb2.ParameterGroupInfo()
        message.ParseFromString(response.content)
        groups = getattr(message, 'group')
        return iter(groups)
741005
def rectify_pgroups(self):
        
        # add any parameters groups
        pdata_groups = list(self.parameter_data.loc[:,"pargp"].\
            value_counts().keys())
        #print(pdata_groups)
        need_groups = []
        existing_groups = list(self.parameter_groups.pargpnme)
        for pg in pdata_groups:
            if pg not in existing_groups:
                need_groups.append(pg)
        if len(need_groups) > 0:
            #print(need_groups)
            defaults = copy.copy(pst_utils.pst_config["pargp_defaults"])
            for grp in need_groups:
                defaults["pargpnme"] = grp
                self.parameter_groups = \
                    self.parameter_groups.append(defaults,ignore_index=True)

        # now drop any left over groups that aren't needed
        for gp in self.parameter_groups.loc[:,"pargpnme"]:
            if gp in pdata_groups and gp not in need_groups:
                need_groups.append(gp)
        self.parameter_groups.index = self.parameter_groups.pargpnme
        self.parameter_groups = self.parameter_groups.loc[need_groups,:]
1358543
def getParameters(self):
        
        parameters = lock_and_call(
            lambda: self._impl.getParameters(),
            self._lock
        )
        return EntityMap(parameters, Parameter)
1295135
def update_resourcegroup(group,**kwargs):
    

    group_i                 = _get_group(group.id)
    group_i.name            = group.name
    group_i.description     = group.description
    group_i.status          = group.status

    db.DBSession.flush()

    return group_i
164495
public void setDBParameterGroups(java.util.Collection<DBParameterGroupStatus> dBParameterGroups) {
        if (dBParameterGroups == null) {
            this.dBParameterGroups = null;
            return;
        }

        this.dBParameterGroups = new java.util.ArrayList<DBParameterGroupStatus>(dBParameterGroups);
    }
134301
def group_perms_for_user(cls, instance, user, db_session=None):
        
        db_session = get_db_session(db_session, instance)
        perms = resource_permissions_for_users(
            cls.models_proxy,
            ANY_PERMISSION,
            resource_ids=[instance.resource_id],
            user_ids=[user.id],
            db_session=db_session,
        )
        perms = [p for p in perms if p.type == "group"]
        # include all perms if user is the owner of this resource
        groups_dict = dict([(g.id, g) for g in user.groups])
        if instance.owner_group_id in groups_dict:
            perms.append(
                PermissionTuple(
                    user,
                    ALL_PERMISSIONS,
                    "group",
                    groups_dict.get(instance.owner_group_id),
                    instance,
                    True,
                    True,
                )
            )
        return perms
1287790
def replica_present(name, source, db_instance_class=None,
                    availability_zone=None, port=None,
                    auto_minor_version_upgrade=None, iops=None,
                    option_group_name=None, publicly_accessible=None,
                    tags=None, region=None, key=None, keyid=None,
                    profile=None, db_parameter_group_name=None):
    '''
    
    '''
    ret = {'name': name,
           'result': True,
           'comment': '',
           'changes': {}
           }
    replica_exists = __salt__['boto_rds.exists'](name, tags, region, key,
                                                 keyid, profile)
    if not replica_exists.get('exists'):
        if __opts__['test']:
            ret['comment'] = 'RDS read replica {0} is set to be created '.format(name)
            ret['result'] = None
            return ret
        created = __salt__['boto_rds.create_read_replica'](name, source,
                                                           db_instance_class,
                                                           availability_zone, port,
                                                           auto_minor_version_upgrade,
                                                           iops, option_group_name,
                                                           publicly_accessible,
                                                           tags, region, key,
                                                           keyid, profile)
        if created:
            ret['comment'] = 'RDS replica {0} created.'.format(name)
            ret['changes']['old'] = {'instance': None}
            ret['changes']['new'] = {
                  'instance': __salt__['boto_rds.describe_db_instances'](
                  name=name, jmespath='DBInstances[0]', region=region,
                  key=key, keyid=keyid, profile=profile)}
        else:
            ret['result'] = False
            ret['comment'] = 'Failed to create RDS replica {0}.'.format(name)
    else:
        jmespath = 'DBInstances[0].DBParameterGroups[0].DBParameterGroupName'
        pmg_name = __salt__['boto_rds.describe_db_instances'](name=name,
              jmespath=jmespath, region=region, key=key, keyid=keyid,
              profile=profile)
        pmg_name = pmg_name[0] if pmg_name else None
        if pmg_name != db_parameter_group_name:
            modified = __salt__['boto_rds.modify_db_instance'](
                  name=name, db_parameter_group_name=db_parameter_group_name,
                  region=region, key=key, keyid=keyid, profile=profile)
            if not modified:
                ret['result'] = False
                ret['comment'] = ('Failed to update parameter group of {0} RDS '
                                  'instance.'.format(name))
            ret['changes']['old'] = pmg_name
            ret['changes']['new'] = db_parameter_group_name
        ret['result'] = True
        ret['comment'] = 'RDS replica {0} exists.'.format(name)
    return ret
1167102
def parse_security_group(self, global_params, region, security_group):
        
        name = security_group.pop('ClusterSecurityGroupName')
        security_group['name'] = name
        self.security_groups['name'] = security_group
1111786
def list_rds(region, filter_by_kwargs):
    """"""
    conn = boto.rds.connect_to_region(region)
    instances = conn.get_all_dbinstances()
    return lookup(instances, filter_by=filter_by_kwargs)
580080
def avail_locations(call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The avail_locations function must be called with '
            '-f or --function, or with the --list-locations option'
        )

    params = {
        'action': 'DescribeZones',
    }
    items = query(params=params)

    result = {}
    for region in items['zone_set']:
        result[region['zone_id']] = {}
        for key in region:
            result[region['zone_id']][key] = six.text_type(region[key])

    return result
683175
def describe_group(record, region):
    """"""
    account_id = record['account']
    group_name = cloudwatch.filter_request_parameters('groupName', record)
    vpc_id = cloudwatch.filter_request_parameters('vpcId', record)
    group_id = cloudwatch.filter_request_parameters('groupId', record, look_in_response=True)

    # Did this get collected already by the poller?
    if cloudwatch.get_collected_details(record):
        LOG.debug(f"[<--] Received already collected security group data: {record['detail']['collected']}")
        return [record['detail']['collected']]

    try:
        # Always depend on Group ID first:
        if group_id:  # pylint: disable=R1705
            return describe_security_groups(
                account_number=account_id,
                assume_role=HISTORICAL_ROLE,
                region=region,
                GroupIds=[group_id]
            )['SecurityGroups']

        elif vpc_id and group_name:
            return describe_security_groups(
                account_number=account_id,
                assume_role=HISTORICAL_ROLE,
                region=region,
                Filters=[
                    {
                        'Name': 'group-name',
                        'Values': [group_name]
                    },
                    {
                        'Name': 'vpc-id',
                        'Values': [vpc_id]
                    }
                ]
            )['SecurityGroups']

        else:
            raise Exception('[X] Did not receive Group ID or VPC/Group Name pairs. '
                            f'We got: ID: {group_id} VPC/Name: {vpc_id}/{group_name}.')
    except ClientError as exc:
        if exc.response['Error']['Code'] == 'InvalidGroup.NotFound':
            return []
        raise exc
880487
function buildRDSSubnetGroup(numZones = 0, { name = 'RDSSubnetGroup' } = {}) {
  if (numZones < 1) {
    return {};
  }

  const subnetIds = [];
  for (let i = 1; i <= numZones; i += 1) {
    subnetIds.push({ Ref: `${DB_SUBNET}Subnet${i}` });
  }

  return {
    [name]: {
      Type: 'AWS::RDS::DBSubnetGroup',
      Properties: {
        DBSubnetGroupName: {
          Ref: 'AWS::StackName',
        },
        DBSubnetGroupDescription: {
          Ref: 'AWS::StackName',
        },
        SubnetIds: subnetIds,
      },
    },
  };
}
556353
def parse_instance(self, global_params, region, dbi):
        
        vpc_id = dbi['DBSubnetGroup']['VpcId'] if 'DBSubnetGroup' in dbi and 'VpcId' in dbi['DBSubnetGroup'] and dbi['DBSubnetGroup']['VpcId'] else ec2_classic
        instance = {}
        instance['name'] = dbi.pop('DBInstanceIdentifier')
        for key in ['InstanceCreateTime', 'Engine', 'DBInstanceStatus', 'AutoMinorVersionUpgrade',
                    'DBInstanceClass', 'MultiAZ', 'Endpoint', 'BackupRetentionPeriod', 'PubliclyAccessible',
                    'StorageEncrypted', 'VpcSecurityGroups', 'DBSecurityGroups', 'DBParameterGroups',
                    'EnhancedMonitoringResourceArn', 'StorageEncrypted']:
                    # parameter_groups , security_groups, vpc_security_groups
            instance[key] = dbi[key] if key in dbi else None
        # If part of a cluster, multi AZ information is only available via cluster information
        if 'DBClusterIdentifier' in dbi:
            api_client = api_clients[region]
            cluster = api_client.describe_db_clusters(DBClusterIdentifier = dbi['DBClusterIdentifier'])['DBClusters'][0]
            instance['MultiAZ'] = cluster['MultiAZ']
        # Save
        manage_dictionary(self.vpcs, vpc_id, VPCConfig(self.vpc_resource_types))
        self.vpcs[vpc_id].instances[instance['name']] = instance
1098530
def describe_key_pairs():
    
    region_keys = {}
    for r in boto3.client('ec2', 'us-west-2').describe_regions()['Regions']:
        region = r['RegionName']
        client = boto3.client('ec2', region_name=region)
        try:
            pairs = client.describe_key_pairs()
            if pairs:
                region_keys[region] = pairs
        except Exception as e:
            app.logger.info(e)
    return region_keys
937919
def get_params_from_sqlalchemy_url(db_url):
        # type: (str) -> Dict[str,Any]
        
        result = urlsplit(db_url)
        return {'database': result.path[1:], 'host': result.hostname, 'port': result.port,
                'username': result.username, 'password': result.password, 'driver': result.scheme}
116178
def getLocalParameters(self):
        
        return RTCIceParameters(
            usernameFragment=self._connection.local_username,
            password=self._connection.local_password)