Skip to content

Commit 6d7d0dd

Browse files
author
mikatong
committed
update tencentcloud_gaap_layer7_listener
1 parent c9df98f commit 6d7d0dd

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

tencentcloud/services/gaap/resource_tc_gaap_layer7_listener.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,10 @@ func resourceTencentCloudGaapLayer7ListenerDelete(d *schema.ResourceData, m inte
513513

514514
id := d.Id()
515515
proxyId := d.Get("proxy_id").(string)
516+
groupId := d.Get("group_id").(string)
516517
protocol := d.Get("protocol").(string)
517518

518519
service := GaapService{client: m.(tccommon.ProviderMeta).GetAPIV3Conn()}
519520

520-
return service.DeleteLayer7Listener(ctx, id, proxyId, protocol)
521+
return service.DeleteLayer7Listener(ctx, id, proxyId, groupId, protocol)
521522
}

tencentcloud/services/gaap/service_tencentcloud_gaap.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,12 +2044,17 @@ func (me *GaapService) ModifyHTTPSListener(
20442044
return nil
20452045
}
20462046

2047-
func (me *GaapService) DeleteLayer7Listener(ctx context.Context, id, proxyId, protocol string) error {
2047+
func (me *GaapService) DeleteLayer7Listener(ctx context.Context, id, proxyId, groupId, protocol string) error {
20482048
logId := tccommon.GetLogId(ctx)
20492049
client := me.client.UseGaapClient()
20502050

20512051
deleteRequest := gaap.NewDeleteListenersRequest()
2052-
deleteRequest.ProxyId = &proxyId
2052+
if proxyId != "" {
2053+
deleteRequest.ProxyId = &proxyId
2054+
}
2055+
if groupId != "" {
2056+
deleteRequest.GroupId = &groupId
2057+
}
20532058
deleteRequest.ListenerIds = []*string{helper.String(id)}
20542059
deleteRequest.Force = helper.IntUint64(0)
20552060

0 commit comments

Comments
 (0)