//Delete a location in a given region for the particular provider
335539
func Delete(cmd *cli.Cmd) {
	provider := cmd.String(cli.StringArg{
		Name:      "PROVIDER",
		Desc:      "Cloud provider(i.e. amazon)",
		HideValue: true,
	})

	identifier := cmd.String(cli.StringArg{
		Name:      "IDENTIFIER",
		Desc:      "Cloud provider specific region/zone/etc identifier (i.e. us-east-1)",
		HideValue: true,
	})

	cmd.Action = func() {
		l := location.Location{
			Provider: *provider,
			Region:   *identifier,
		}

		//TODO determine if there are any applications in the location and prompt user to remove them
		errs := l.Delete()

		if len(errs) > 0 {
			log.Fatalf("Could not delete location: %s", errs)
		}

		fmt.Printf("Deleting location %s-%s", *provider, *identifier)
	}
}
754911
func (g *Cloud) DeleteInstance(project, zone, name string) error {
	ctx, cancel := cloud.ContextWithCallTimeout()
	defer cancel()

	return g.c.Instances().Delete(ctx, meta.ZonalKey(name, zone))
}
723938
func (r Network_CdnMarketplace_Configuration_Mapping_Path) DeleteOriginPath(uniqueId *string, path *string) (resp string, err error) {
	params := []interface{}{
		uniqueId,
		path,
	}
	err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "deleteOriginPath", params, &r.Options, &resp)
	return
}
991583
func (endpoint *HostComputeEndpoint) Delete() error {
	logrus.Debugf("hcn::HostComputeEndpoint::Delete id=%s", endpoint.Id)

	if err := deleteEndpoint(endpoint.Id); err != nil {
		return err
	}
	return nil
}
1321942
func (multi *KapacitorStore) Delete(ctx context.Context, kap chronograf.Server) error {
	var err error
	for _, store := range multi.Stores {
		err = store.Delete(ctx, kap)
		if err == nil {
			return nil
		}
	}
	return err
}
202550
func (c *EC2Metadata) Region() (string, error) {
	resp, err := c.GetMetadata("placement/availability-zone")
	if err != nil {
		return "", err
	}

	if len(resp) == 0 {
		return "", awserr.New("EC2MetadataError", "invalid Region response", nil)
	}

	// returns region without the suffix. Eg: us-west-2a becomes us-west-2
	return resp[:len(resp)-1], nil
}
626827
func (svc *googleService) delete() error {
	op, err := svc.service.Instances.Delete(svc.vm.Project, svc.vm.Zone, svc.vm.Name).Do()
	if err != nil {
		return err
	}

	return svc.waitForOperationReady(op.Name)
}
172238
func (g *Cloud) DeleteNetworkEndpointGroup(name string, zone string) error {
	ctx, cancel := cloud.ContextWithCallTimeout()
	defer cancel()

	mc := newNetworkEndpointGroupMetricContext("delete", zone)
	return mc.Observe(g.c.BetaNetworkEndpointGroups().Delete(ctx, meta.ZonalKey(name, zone)))
}
1051395
func (c *Client) DeleteZone(p *DeleteZoneParameter) (*Result, error) {
	obj, err := c.Request("deleteZone", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}
502792
func deleteRecord(c *godo.Client, zoneName string, recordID int) error {
	_, err := c.Domains.DeleteRecord(context.TODO(), zoneName, recordID)
	if err != nil {
		return fmt.Errorf("error deleting record: %v", err)
	}

	return nil
}
507657
func Delete() error {
	filename := locateSettingsFile()

	if _, err := os.Stat(filename); err != nil {
		if os.IsNotExist(err) {
			return nil
		}

		return err
	}

	if err := os.Remove(filename); err != nil {
		return err
	}

	return nil
}
941789
func (gce *Cloud) DeleteInstanceGroup(name string, zone string) error {
	op, err := gce.service.InstanceGroups.Delete(
		gce.projectID, zone, name).Do()
	if err != nil {
		return err
	}
	return gce.waitForZoneOp(op, zone)
}
368533
func WithRegion(region string) ProviderOpts {
	return func(p *Provider) error {
		p.Region = region
		return nil
	}
}
1003590
func (zones *Zones) Delete(ctx context.Context, id string) (err error) {
	response, err := httpDo(ctx, zones.Options, "DELETE", apiURL("/zones/%s", id), nil)
	if err != nil {
		return
	}
	defer response.Body.Close()
	_, err = readResponse(response.Body)
	return
}
1225656
func (client *Client) DeleteServerCertificate(regionId common.Region, serverCertificateId string) (err error) {
	args := &DeleteServerCertificateArgs{
		RegionId:            regionId,
		ServerCertificateId: serverCertificateId,
	}
	response := &DeleteServerCertificateResponse{}
	return client.Invoke("DeleteServerCertificate", args, response)
}
99364
func (r *Router) RemoveArea(areaID types.AreaID) error {
	r.Lock()
	defer r.Unlock()

	area, ok := r.areas[areaID]
	if !ok {
		return fmt.Errorf("area ID %q does not exist", areaID)
	}

	// Remove all of this area's managers from the index and shut them down.
	for datacenter, info := range area.managers {
		r.removeManagerFromIndex(datacenter, info.manager)
		close(info.shutdownCh)
	}

	delete(r.areas, areaID)
	return nil
}
354165
func (s *DriversStore) Delete(driverName string) {
	s.Lock()
	defer s.Unlock()

	delete(s.store, driverName)
}