Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions tencentcloud/resource_tc_sqlserver_publish_subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,9 @@ func resourceTencentCloudSqlserverPublishSubscribeRead(d *schema.ResourceData, m
d.SetId("")
return nil
}
_ = d.Set("publish_subscribe_id", publishSubscribe.Id)
_ = d.Set("publish_subscribe_name", publishSubscribe.Name)
_ = d.Set("publish_instance_id", publishSubscribe.PublishInstanceId)
_ = d.Set("publish_instance_name", publishSubscribe.PublishInstanceName)
_ = d.Set("publish_instance_ip", publishSubscribe.PublishInstanceIp)
_ = d.Set("subscribe_instance_id", publishSubscribe.SubscribeInstanceId)
_ = d.Set("subscribe_instance_name", publishSubscribe.SubscribeInstanceName)
_ = d.Set("subscribe_instance_ip", publishSubscribe.SubscribeInstanceIp)
var databaseTupleSet []map[string]interface{}
for _, inst_ := range publishSubscribe.DatabaseTupleSet {
databaseTuple := map[string]interface{}{
Expand Down
38 changes: 13 additions & 25 deletions tencentcloud/service_tencentcloud_cos.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ func (me *CosService) TencentCosPutBucket(ctx context.Context, bucket string, op
return
}

body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s], baseUrl %s\n",
logId, "put bucket", req, resp, client.BaseURL.BucketURL)
Expand Down Expand Up @@ -214,8 +213,7 @@ func (me *CosService) TencentCosPutBucketACL(
return
}

body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, "PutBucketACL", req, resp)
Expand Down Expand Up @@ -1214,8 +1212,7 @@ func (me *CosService) PutBucketPullOrigin(ctx context.Context, bucket string, ru
ratelimit.Check("PutBucketPullOrigin")
response, err := me.client.UseTencentCosClient(bucket).Bucket.PutOrigin(ctx, opt)
req, _ := json.Marshal(opt)
body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

defer func() {
if errRet != nil {
Expand Down Expand Up @@ -1247,8 +1244,7 @@ func (me *CosService) DeleteBucketPullOrigin(ctx context.Context, bucket string)

ratelimit.Check("DeleteBucketPullOrigin")
response, err := me.client.UseTencentCosClient(bucket).Bucket.DeleteOrigin(ctx)
body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

if err != nil {
errRet = fmt.Errorf("[DeleteBucketPullOrigin] error: %s, bucket: %s", err.Error(), bucket)
Expand Down Expand Up @@ -1294,8 +1290,7 @@ func (me *CosService) GetBucketOriginDomain(ctx context.Context, bucket string)
rules = append(rules, item)
}

body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

log.Printf("[DEBUG]%s api[%s] success, request body response body [%s]\n",
logId, "GetBucketOriginDomain", resp)
Expand All @@ -1312,8 +1307,7 @@ func (me *CosService) PutBucketOriginDomain(ctx context.Context, bucket string,
ratelimit.Check("PutBucketOriginDomain")
response, err := me.client.UseTencentCosClient(bucket).Bucket.PutDomain(ctx, opt)
req, _ := json.Marshal(opt)
body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

defer func() {
if errRet != nil {
Expand Down Expand Up @@ -1345,8 +1339,7 @@ func (me *CosService) DeleteBucketOriginDomain(ctx context.Context, bucket strin

ratelimit.Check("DeleteBucketOriginDomain")
response, err := me.client.UseTencentCosClient(bucket).Bucket.DeleteDomain(ctx)
body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

if err != nil {
errRet = fmt.Errorf("[DeleteBucketOriginDomain] error: %s, bucket: %s", err.Error(), bucket)
Expand Down Expand Up @@ -1376,8 +1369,7 @@ func (me *CosService) GetBucketReplication(ctx context.Context, bucket string) (
return
}

body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

if err != nil {
errRet = err
Expand Down Expand Up @@ -1410,8 +1402,7 @@ func (me *CosService) PutBucketReplication(ctx context.Context, bucket string, r
ratelimit.Check("PutBucketReplication")
response, err := me.client.UseTencentCosClient(bucket).Bucket.PutBucketReplication(ctx, option)

body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

if err != nil {
errRet = err
Expand All @@ -1436,8 +1427,7 @@ func (me *CosService) DeleteBucketReplication(ctx context.Context, bucket string
ratelimit.Check("DeleteBucketReplication")
response, err := me.client.UseTencentCosClient(bucket).Bucket.DeleteBucketReplication(ctx)

body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)

if err != nil {
errRet = err
Expand Down Expand Up @@ -1474,8 +1464,7 @@ func (me *CosService) DescribeCosBucketDomainCertificate(ctx context.Context, ce
}()

result, response, err := me.client.UseTencentCosClient(bucket).Bucket.GetDomainCertificate(ctx, option)
body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)
resp, _ := json.Marshal(response.Response.Body)
if response.StatusCode == 404 {
log.Printf("[WARN]%s, api[%s] returns %d", logId, "GetDomainCertificate", response.StatusCode)
return
Expand Down Expand Up @@ -1517,14 +1506,13 @@ func (me *CosService) DeleteCosBucketDomainCertificate(ctx context.Context, cert
ratelimit.Check("DeleteDomainCertificate")
response, err := me.client.UseTencentCosClient(bucket).Bucket.DeleteDomainCertificate(ctx, option)

body, _ := response.Response.Request.GetBody()
resp, _ := json.Marshal(body)

if err != nil {
errRet = err
return err
}

resp, _ := json.Marshal(response.Response.Body)

log.Printf("[DEBUG]%s api[%s] success, option [%s], response body [%s]\n",
logId, "DeleteDomainCertificate", option, resp)

Expand Down