Skip to content

Commit 94c357a

Browse files
committed
feat(cam): support retry
1 parent 30c7cf1 commit 94c357a

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

tencentcloud/services/cam/data_source_tc_user_info.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,19 @@ func datasourceTencentCloudUserInfoRead(d *schema.ResourceData, meta interface{}
9393
if response == nil || response.Response == nil {
9494
return fmt.Errorf("get user appid error: empty response")
9595
}
96-
97-
appId := strconv.FormatUint(*response.Response.AppId, 10)
98-
uin := *response.Response.Uin
99-
ownerUin := *response.Response.OwnerUin
96+
var appId, uin, ownerUin string
10097
accountInfoRequest := cam.NewDescribeSubAccountsRequest()
10198
accountInfoResponse := cam.NewDescribeSubAccountsResponse()
99+
100+
if response.Response.AppId != nil {
101+
appId = strconv.FormatUint(*response.Response.AppId, 10)
102+
}
103+
if response.Response.Uin != nil {
104+
uin = *response.Response.Uin
105+
}
106+
if response.Response.OwnerUin != nil {
107+
ownerUin = *response.Response.Uin
108+
}
102109
accountInfoRequest.FilterSubAccountUin = []*uint64{helper.Uint64(helper.StrToUInt64(uin))}
103110

104111
err = resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {

0 commit comments

Comments
 (0)