Delete an ACL by ID belonging to the instance specified by name.

        :param str instance: The name of the instance on which the ACL exists.
        :param str acll: The ID of the ACL to delete.
183703
def delete(self, instance, acl):
        
        base_url = self._url.format(instance=instance)
        url = '{base}{aclid}/'.format(base=base_url, aclid=acl)
        response = requests.delete(url, **self._default_request_kwargs)

        if response.status_code == 200:
            logger.info('Successfully deleted ACL {}'.format(acl))
        else:
            logger.info('Failed to delete ACL {}'.format(acl))
            logger.info('Response: [{0}] {1}'.format(response.status_code, response.content))
            raise errors.ObjectRocketException('Failed to delete ACL.')
248282
def delete_one(self, id_):
                
        url = "https://api.knackhq.com/v1/objects/%s/records/%s" % (
            self.key, id_)
        res = self.delete(url)
        return res
877186
def do_terminateInstance(self,args):
        """"""
        parser = CommandArgumentParser("terminateInstance")
        parser.add_argument(dest='instance',help='instance index or name');
        args = vars(parser.parse_args(args))

        instanceId = args['instance']
        try:
            index = int(instanceId)
            instances = self.scalingGroupDescription['AutoScalingGroups'][0]['Instances']
            instanceId = instances[index]
        except ValueError:
            pass

        client = AwsConnectionFactory.getEc2Client()
        client.terminate_instances(InstanceIds=[instanceId['InstanceId']])
        self.do_printInstances("-r")
1284057
def remove_by_id(class_name, *ids)
      ids.flatten!
      @connection.delete_by_id(
        ids.map { |id| Adapters::InstanceAdapter.index_id_for(class_name, id) }
      )
    end
52266
def all(self, instance):
        
        url = self._url.format(instance=instance)
        response = requests.get(url, **self._default_request_kwargs)
        data = self._get_response_data(response)
        return self._concrete_acl_list(data)
287452
def db_aws_delete_instance(self, instance_id):
        '''  '''
        interactive = False
        if instance_id is None:
            interactive = True

        instances = self.db_services.get_db_instances()
        instance_list = [dbinst.id for dbinst in instances]

        if interactive:
            valid = False
            if len(instances) == 0:
                print("There are no instances you can delete currently.  Use "
                      "`db aws_create_instance` to make one.")
                return
            print "Here are the available instances you can delete:"
            for inst in instances:
                print "\t ", inst.id, "(", inst.status, ")"
            while not valid:
                instance_id = raw_input('Enter the instance identity you would '
                                        'like to delete: ')
                res = self.db_services.validate_instance_id(instance_id)
                if res is True:
                    valid = True
                else:
                    print(res + " Try again, instance name not valid.  Check " \
                        "for typos.")
                if instance_id in instance_list:
                    valid = True
                else:
                    valid = False
                    print("Try again, instance not present in this account.  "
                          "Try again checking for typos.")
        else:
            res = self.db_services.validate_instance_id(instance_id)
            if res is not True:
                print("*** Error, instance name either not valid.  Try again "
                     "checking for typos.")
                return
            if instance_id not in instance_list:
                print("*** Error, This instance not present in this account.  "
                     "Try again checking for typos.  Run `db aws_list_instances` to "
                     "see valid list.")
                return

        user_input = raw_input(
            "Deleting an instance will erase all your data associated with the "
            "database in that instance.  Really quit? y or n:"
        )
        if user_input == 'y':
            res = self.db_services.delete_db_instance(instance_id)
            if res:
                print("AWS RDS database instance %s deleted.  Run `db " \
                    "aws_list_instances` for current status." % instance_id)
            else:
                print("*** Error deleting database instance %s.  " \
                    "It maybe because it is still being created, deleted, or is " \
                    "being backed up.  Run `db aws_list_instances` for current " \
                    "status." % instance_id)
        else:
            return
968354
function(name, acl) {
      if (_.isString(name) && (acl instanceof Parse.ACL)) {
        Parse.Object.prototype.constructor.call(this, null, null);
        this.setName(name);
        this.setACL(acl);
      } else {
        Parse.Object.prototype.constructor.call(this, name, acl);
      }
    }
1128865
public static base_responses delete(nitro_service client, String acl6name[]) throws Exception {
		base_responses result = null;
		if (acl6name != null && acl6name.length > 0) {
			nsacl6 deleteresources[] = new nsacl6[acl6name.length];
			for (int i=0;i<acl6name.length;i++){
				deleteresources[i] = new nsacl6();
				deleteresources[i].acl6name = acl6name[i];
			}
			result = delete_bulk_request(client, deleteresources);
		}
		return result;
	}
442045
def delete_instance(self, instance_id):

        '''
            
        '''

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

    # validate inputs
        input_fields = {
            'instance_id': instance_id
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)

    # report query
        self.iam.printer('Removing instance %s from AWS region %s.' % (instance_id, self.iam.region_name))

    # retrieve state
        old_state = self.check_instance_state(instance_id)

    # discover tags associated with instance id
        tag_list = []
        try:
            response = self.connection.describe_tags(
                Filters=[ { 'Name': 'resource-id', 'Values': [ instance_id ] } ]
            )
            import re
            aws_tag_pattern = re.compile('aws:')
            for i in range(0, len(response['Tags'])):
                if not aws_tag_pattern.findall(response['Tags'][i]['Key']):
                    tag = {}
                    tag['Key'] = response['Tags'][i]['Key']
                    tag['Value'] = response['Tags'][i]['Value']
                    tag_list.append(tag)
        except:
            raise AWSConnectionError(title)

    # remove tags from instance
        try:
            self.connection.delete_tags(
                Resources=[ instance_id ],
                Tags=tag_list
            )
            self.iam.printer('Tags have been deleted from %s.' % instance_id)
        except:
            raise AWSConnectionError(title)

    # stop instance
        try:
            self.connection.stop_instances(
                InstanceIds=[ instance_id ]
            )
        except:
            raise AWSConnectionError(title)

    # terminate instance
        try:
            response = self.connection.terminate_instances(
                InstanceIds=[ instance_id ]
            )
            new_state = response['TerminatingInstances'][0]['CurrentState']['Name']
        except:
            raise AWSConnectionError(title)

    # report outcome and return true
        self.iam.printer('Instance %s was %s.' % (instance_id, old_state))
        self.iam.printer('Instance %s is %s.' % (instance_id, new_state))
        return new_state
697486
def delete_command(endpoint_id, rule_id):
    
    client = get_client()

    res = client.delete_endpoint_acl_rule(endpoint_id, rule_id)
    formatted_print(res, text_format=FORMAT_TEXT_RAW, response_key="message")
896680
def delete(instance_id, profile=None, **kwargs):
    '''
    

    '''
    conn = _auth(profile, **kwargs)
    return conn.delete(instance_id)
759971
def delete(self, name):
        
        if isinstance(name, (list, tuple)):
            for xx in name:
                self.delete(xx)
        else:
            if name in self._record_map:
                del self._record_map[name]
                self._record_list = [
                    r for r in self._record_list if r['name'] != name]
22114
def terminate(instance_id=None, name=None, region=None,
              key=None, keyid=None, profile=None, filters=None):
    '''
    
    '''
    instances = find_instances(instance_id=instance_id, name=name,
                               region=region, key=key, keyid=keyid,
                               profile=profile, return_objs=True,
                               filters=filters)
    if instances in (False, None, []):
        return instances

    if len(instances) == 1:
        instances[0].terminate()
        return True
    else:
        log.warning('Refusing to terminate multiple instances at once')
        return False
1075498
def delete(filepath):
    
    # Some files have ACLs, let's remove them recursively
    remove_acl(filepath)

    # Some files have immutable attributes, let's remove them recursively
    remove_immutable_attribute(filepath)

    # Finally remove the files and folders
    if os.path.isfile(filepath) or os.path.islink(filepath):
        os.remove(filepath)
    elif os.path.isdir(filepath):
        shutil.rmtree(filepath)
1188642
def delete_instance(self, credentials, name, **kwargs):
        """"""
        op_name = delete_instance(
            credentials, self.project, self.zone, name, **kwargs)

        return op_name
1141159
def delete(self, id):
        
        id = self.as_id(id)
        response = self.http.delete(
            '%s/%s' % (self.api_url, id),
            auth=self.auth)
        response.raise_for_status()
931327
function destroyInstance (instanceId) {
  var instance = instances[instanceId] || {};
  if (instance.app instanceof Vue$2) {
    instance.app.$destroy();
  }
  delete instances[instanceId];
}