// DeleteTelegrafConfig removes a telegraf config by ID.
482453
func (s *Service) DeleteTelegrafConfig(ctx context.Context, id influxdb.ID) error {
	return s.kv.Update(ctx, func(tx Tx) error {
		return s.deleteTelegrafConfig(ctx, tx, id)
	})
}
694931
func (c *Cluster) RemoveConfig(input string) error {
	return c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
		config, err := getConfig(ctx, state.controlClient, input)
		if err != nil {
			return err
		}

		req := &swarmapi.RemoveConfigRequest{
			ConfigID: config.ID,
		}

		_, err = state.controlClient.RemoveConfig(ctx, req)
		return err
	})
}
385587
func (s *Service) FindTelegrafConfigByID(ctx context.Context, id influxdb.ID) (*influxdb.TelegrafConfig, error) {
	var (
		tc  *influxdb.TelegrafConfig
		err error
	)

	err = s.kv.View(ctx, func(tx Tx) error {
		tc, err = s.findTelegrafConfigByID(ctx, tx, id)
		return err
	})

	return tc, err
}
548119
func deletePipelineConfigAction(client *gocd.Client, c *cli.Context) (r interface{}, resp *gocd.APIResponse, err error) {
	name := c.String("name")
	if name == "" {
		return nil, nil, NewFlagError("name")
	}

	deleteResponse, resp, err := client.PipelineConfigs.Delete(context.Background(), name)
	if resp.HTTP.StatusCode == 406 {
		err = errors.New(deleteResponse)
	}
	return deleteResponse, resp, err
}
518871
func (s *UpdateFleetInput) SetDeleteVpcConfig(v bool) *UpdateFleetInput {
	s.DeleteVpcConfig = &v
	return s
}
1244615
func deleteBgp(ctx *cli.Context) {
	if len(ctx.Args()) != 1 {
		errExit(ctx, exitHelp, "Host name required", true)
	}

	hostname := ctx.Args()[0]
	fmt.Printf("Deleting Bgp router config: %s\n", hostname)

	errCheck(ctx, getClient(ctx).BgpDelete(hostname))
}
359123
func (_m *FacadeInterface) DeleteServiceConfig(ctx datastore.Context, fileID string) error {
	ret := _m.Called(ctx, fileID)

	var r0 error
	if rf, ok := ret.Get(0).(func(datastore.Context, string) error); ok {
		r0 = rf(ctx, fileID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
615543
func (c *UIConfig) DeleteHeader(ctx context.Context, header string) error {
	c.l.Lock()
	defer c.l.Unlock()

	config, err := c.get(ctx)
	if err != nil {
		return err
	}
	if config == nil {
		return nil
	}

	config.Headers.Del(header)
	return c.save(ctx, config)
}
286215
func (c *Client) DeletePluginConfig(pluginType, name, version string, key string) *DeletePluginConfigResult {
	r := &DeletePluginConfigResult{}
	b, err := json.Marshal([]string{key})
	if err != nil {
		r.Err = err
		return r
	}
	resp, err := c.do("DELETE", fmt.Sprintf("/plugins/%s/%s/%s/config", pluginType, url.QueryEscape(name), version), ContentTypeJSON, b)
	if err != nil {
		r.Err = err
		return r
	}

	switch resp.Meta.Type {
	case rbody.DeletePluginConfigItemType:
		// Success
		config := resp.Body.(*rbody.DeletePluginConfigItem)
		r = &DeletePluginConfigResult{config, nil}
	case rbody.ErrorType:
		r.Err = resp.Body.(*rbody.Error)
	default:
		r.Err = ErrAPIResponseMetaType
	}
	return r
}
864500
func (k *KeyOpsStandard) DeleteTLFCryptKeyServerHalf(
	ctx context.Context, uid keybase1.UID, key kbfscrypto.CryptPublicKey,
	serverHalfID kbfscrypto.TLFCryptKeyServerHalfID) error {
	return k.config.KeyServer().DeleteTLFCryptKeyServerHalf(
		ctx, uid, key, serverHalfID)
}
1197140
func deletePipelineConfigCommand() *cli.Command {
	return &cli.Command{
		Name:     DeletePipelineConfigCommandName,
		Usage:    DeletePipelineConfigCommandUsage,
		Category: "Pipeline Configs",
		Action:   ActionWrapper(deletePipelineConfigAction),
		Flags: []cli.Flag{
			cli.StringFlag{Name: "name"},
		},
	}
}
562863
func (s *Service) OAuthAuthorizationDelete(ctx context.Context, oauthAuthorizationIdentity string) (*OAuthAuthorization, error) {
	var oauthAuthorization OAuthAuthorization
	return &oauthAuthorization, s.Delete(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations/%v", oauthAuthorizationIdentity))
}
204817
func (c *CDN) DeleteHttpHeaderConfig(domainName, configID string, resp interface{}) (err error) {
	if global.EmptyString == domainName || global.EmptyString == configID {
		return errors.New("'domainName'or 'configID' should not be empty ")
	}
	req := c.cdnReq.Clone().(*Request)
	req.Action = DeleteHttpHeaderConfigAction
	req.SetArgs("DomainName", domainName)
	req.SetArgs("ConfigID", configID)
	err = c.rpc.Query(req, resp)
	return
}
808092
func (s *VLANService) DeleteVlanIpRange(p *DeleteVlanIpRangeParams) (*DeleteVlanIpRangeResponse, error) {
	resp, err := s.cs.newRequest("deleteVlanIpRange", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r DeleteVlanIpRangeResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
157851
func (s *Service) PutTelegrafConfig(ctx context.Context, tc *influxdb.TelegrafConfig) error {
	return s.kv.Update(ctx, func(tx Tx) (err error) {
		return s.putTelegrafConfig(ctx, tx, tc)
	})
}
629103
func (s *TelegrafConfigStore) UpdateTelegrafConfig(ctx context.Context, id platform.ID, tc *platform.TelegrafConfig, userID platform.ID) (*platform.TelegrafConfig, error) {
	return s.UpdateTelegrafConfigF(ctx, id, tc, userID)
}
374120
func DeleteID(id uint32) error {
	log.WithField(logfields.L3n4AddrID, id).Debug("deleting L3n4Addr by ID")

	if enableGlobalServiceIDs {
		return deleteGlobalID(id)
	}

	return serviceIDAlloc.deleteLocalID(id)
}