fixed get copy region value (#8345)
This commit is contained in:
parent
d5ba530b26
commit
f2f544c434
@ -5,6 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
|
||||
cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312"
|
||||
)
|
||||
|
||||
@ -29,7 +30,7 @@ func (s *stepCopyImage) Run(ctx context.Context, state multistep.StateBag) multi
|
||||
copyRegions := make([]*string, 0, len(s.DesinationRegions))
|
||||
for _, region := range s.DesinationRegions {
|
||||
if region != s.SourceRegion {
|
||||
copyRegions = append(copyRegions, ®ion)
|
||||
copyRegions = append(copyRegions, common.StringPtr(region))
|
||||
}
|
||||
}
|
||||
req.DestinationRegions = copyRegions
|
||||
|
@ -29,7 +29,7 @@ func (s *stepShareImage) Run(ctx context.Context, state multistep.StateBag) mult
|
||||
req.Permission = common.StringPtr("SHARE")
|
||||
accounts := make([]*string, 0, len(s.ShareAccounts))
|
||||
for _, account := range s.ShareAccounts {
|
||||
accounts = append(accounts, &account)
|
||||
accounts = append(accounts, common.StringPtr(account))
|
||||
}
|
||||
req.AccountIds = accounts
|
||||
err := Retry(ctx, func(ctx context.Context) error {
|
||||
|
2
go.mod
2
go.mod
@ -133,7 +133,7 @@ require (
|
||||
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c // indirect
|
||||
github.com/stretchr/testify v1.4.0
|
||||
github.com/temoto/robotstxt v1.1.1 // indirect
|
||||
github.com/tencentcloud/tencentcloud-sdk-go v3.0.94+incompatible
|
||||
github.com/tencentcloud/tencentcloud-sdk-go v3.0.97+incompatible
|
||||
github.com/ucloud/ucloud-sdk-go v0.12.0
|
||||
github.com/ufilesdk-dev/ufile-gosdk v0.0.0-20190830075812-b4dbc4ef43a6
|
||||
github.com/ugorji/go v0.0.0-20151218193438-646ae4a518c1
|
||||
|
4
go.sum
4
go.sum
@ -413,8 +413,8 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/temoto/robotstxt v1.1.1 h1:Gh8RCs8ouX3hRSxxK7B1mO5RFByQ4CmJZDwgom++JaA=
|
||||
github.com/temoto/robotstxt v1.1.1/go.mod h1:+1AmkuG3IYkh1kv0d2qEB9Le88ehNO0zwOr3ujewlOo=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go v3.0.94+incompatible h1:G8i7dPMK1RCpbQz+VpfFp679vmVna38NI8tz5xsybXI=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go v3.0.94+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go v3.0.97+incompatible h1:y2gZtLpcWqFzSFbQSKwv1gL+NocPRM0ktGh7Dlb8U7s=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go v3.0.97+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
|
||||
github.com/ucloud/ucloud-sdk-go v0.8.7 h1:BmXOb5RivI0Uu4oZRpjI6SQ9/y7n/H9wxTGR1txIE8o=
|
||||
github.com/ucloud/ucloud-sdk-go v0.8.7/go.mod h1:lM6fpI8y6iwACtlbHUav823/uKPdXsNBlnBpRF2fj3c=
|
||||
github.com/ucloud/ucloud-sdk-go v0.12.0 h1:VCFN3jWg/G4wvwjG6qG5AhFuAT1JdmGvY6+4WHbuJcw=
|
||||
|
@ -152,7 +152,7 @@ func CompleteCommonParams(request Request, region string) {
|
||||
params["Action"] = request.GetAction()
|
||||
params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10)
|
||||
params["Nonce"] = strconv.Itoa(rand.Int())
|
||||
params["RequestClient"] = "SDK_GO_3.0.94"
|
||||
params["RequestClient"] = "SDK_GO_3.0.97"
|
||||
}
|
||||
|
||||
func ConstructParams(req Request) (err error) {
|
||||
|
150
vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go
generated
vendored
150
vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go
generated
vendored
@ -398,6 +398,31 @@ func (c *Client) AttachNetworkInterface(request *AttachNetworkInterfaceRequest)
|
||||
return
|
||||
}
|
||||
|
||||
func NewCheckNetDetectStateRequest() (request *CheckNetDetectStateRequest) {
|
||||
request = &CheckNetDetectStateRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
}
|
||||
request.Init().WithApiInfo("vpc", APIVersion, "CheckNetDetectState")
|
||||
return
|
||||
}
|
||||
|
||||
func NewCheckNetDetectStateResponse() (response *CheckNetDetectStateResponse) {
|
||||
response = &CheckNetDetectStateResponse{
|
||||
BaseResponse: &tchttp.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 本接口(CheckNetDetectState)用于验证网络探测。
|
||||
func (c *Client) CheckNetDetectState(request *CheckNetDetectStateRequest) (response *CheckNetDetectStateResponse, err error) {
|
||||
if request == nil {
|
||||
request = NewCheckNetDetectStateRequest()
|
||||
}
|
||||
response = NewCheckNetDetectStateResponse()
|
||||
err = c.Send(request, response)
|
||||
return
|
||||
}
|
||||
|
||||
func NewCreateAddressTemplateRequest() (request *CreateAddressTemplateRequest) {
|
||||
request = &CreateAddressTemplateRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
@ -733,6 +758,31 @@ func (c *Client) CreateNatGatewayDestinationIpPortTranslationNatRule(request *Cr
|
||||
return
|
||||
}
|
||||
|
||||
func NewCreateNetDetectRequest() (request *CreateNetDetectRequest) {
|
||||
request = &CreateNetDetectRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
}
|
||||
request.Init().WithApiInfo("vpc", APIVersion, "CreateNetDetect")
|
||||
return
|
||||
}
|
||||
|
||||
func NewCreateNetDetectResponse() (response *CreateNetDetectResponse) {
|
||||
response = &CreateNetDetectResponse{
|
||||
BaseResponse: &tchttp.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 本接口(CreateNetDetect)用于创建网络探测。
|
||||
func (c *Client) CreateNetDetect(request *CreateNetDetectRequest) (response *CreateNetDetectResponse, err error) {
|
||||
if request == nil {
|
||||
request = NewCreateNetDetectRequest()
|
||||
}
|
||||
response = NewCreateNetDetectResponse()
|
||||
err = c.Send(request, response)
|
||||
return
|
||||
}
|
||||
|
||||
func NewCreateNetworkInterfaceRequest() (request *CreateNetworkInterfaceRequest) {
|
||||
request = &CreateNetworkInterfaceRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
@ -1370,6 +1420,31 @@ func (c *Client) DeleteNatGatewayDestinationIpPortTranslationNatRule(request *De
|
||||
return
|
||||
}
|
||||
|
||||
func NewDeleteNetDetectRequest() (request *DeleteNetDetectRequest) {
|
||||
request = &DeleteNetDetectRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
}
|
||||
request.Init().WithApiInfo("vpc", APIVersion, "DeleteNetDetect")
|
||||
return
|
||||
}
|
||||
|
||||
func NewDeleteNetDetectResponse() (response *DeleteNetDetectResponse) {
|
||||
response = &DeleteNetDetectResponse{
|
||||
BaseResponse: &tchttp.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 本接口(DeleteNetDetect)用于删除网络探测实例。
|
||||
func (c *Client) DeleteNetDetect(request *DeleteNetDetectRequest) (response *DeleteNetDetectResponse, err error) {
|
||||
if request == nil {
|
||||
request = NewDeleteNetDetectRequest()
|
||||
}
|
||||
response = NewDeleteNetDetectResponse()
|
||||
err = c.Send(request, response)
|
||||
return
|
||||
}
|
||||
|
||||
func NewDeleteNetworkInterfaceRequest() (request *DeleteNetworkInterfaceRequest) {
|
||||
request = &DeleteNetworkInterfaceRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
@ -2258,6 +2333,56 @@ func (c *Client) DescribeNatGateways(request *DescribeNatGatewaysRequest) (respo
|
||||
return
|
||||
}
|
||||
|
||||
func NewDescribeNetDetectStatesRequest() (request *DescribeNetDetectStatesRequest) {
|
||||
request = &DescribeNetDetectStatesRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
}
|
||||
request.Init().WithApiInfo("vpc", APIVersion, "DescribeNetDetectStates")
|
||||
return
|
||||
}
|
||||
|
||||
func NewDescribeNetDetectStatesResponse() (response *DescribeNetDetectStatesResponse) {
|
||||
response = &DescribeNetDetectStatesResponse{
|
||||
BaseResponse: &tchttp.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 本接口(DescribeNetDetectStates)用于查询网络探测验证结果列表。
|
||||
func (c *Client) DescribeNetDetectStates(request *DescribeNetDetectStatesRequest) (response *DescribeNetDetectStatesResponse, err error) {
|
||||
if request == nil {
|
||||
request = NewDescribeNetDetectStatesRequest()
|
||||
}
|
||||
response = NewDescribeNetDetectStatesResponse()
|
||||
err = c.Send(request, response)
|
||||
return
|
||||
}
|
||||
|
||||
func NewDescribeNetDetectsRequest() (request *DescribeNetDetectsRequest) {
|
||||
request = &DescribeNetDetectsRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
}
|
||||
request.Init().WithApiInfo("vpc", APIVersion, "DescribeNetDetects")
|
||||
return
|
||||
}
|
||||
|
||||
func NewDescribeNetDetectsResponse() (response *DescribeNetDetectsResponse) {
|
||||
response = &DescribeNetDetectsResponse{
|
||||
BaseResponse: &tchttp.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 本接口(DescribeNetDetects)用于查询网络探测列表。
|
||||
func (c *Client) DescribeNetDetects(request *DescribeNetDetectsRequest) (response *DescribeNetDetectsResponse, err error) {
|
||||
if request == nil {
|
||||
request = NewDescribeNetDetectsRequest()
|
||||
}
|
||||
response = NewDescribeNetDetectsResponse()
|
||||
err = c.Send(request, response)
|
||||
return
|
||||
}
|
||||
|
||||
func NewDescribeNetworkInterfaceLimitRequest() (request *DescribeNetworkInterfaceLimitRequest) {
|
||||
request = &DescribeNetworkInterfaceLimitRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
@ -3472,6 +3597,31 @@ func (c *Client) ModifyNatGatewayDestinationIpPortTranslationNatRule(request *Mo
|
||||
return
|
||||
}
|
||||
|
||||
func NewModifyNetDetectRequest() (request *ModifyNetDetectRequest) {
|
||||
request = &ModifyNetDetectRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
}
|
||||
request.Init().WithApiInfo("vpc", APIVersion, "ModifyNetDetect")
|
||||
return
|
||||
}
|
||||
|
||||
func NewModifyNetDetectResponse() (response *ModifyNetDetectResponse) {
|
||||
response = &ModifyNetDetectResponse{
|
||||
BaseResponse: &tchttp.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 本接口(ModifyNetDetect)用于修改网络探测参数。
|
||||
func (c *Client) ModifyNetDetect(request *ModifyNetDetectRequest) (response *ModifyNetDetectResponse, err error) {
|
||||
if request == nil {
|
||||
request = NewModifyNetDetectRequest()
|
||||
}
|
||||
response = NewModifyNetDetectResponse()
|
||||
err = c.Send(request, response)
|
||||
return
|
||||
}
|
||||
|
||||
func NewModifyNetworkInterfaceAttributeRequest() (request *ModifyNetworkInterfaceAttributeRequest) {
|
||||
request = &ModifyNetworkInterfaceAttributeRequest{
|
||||
BaseRequest: &tchttp.BaseRequest{},
|
||||
|
414
vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go
generated
vendored
414
vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go
generated
vendored
@ -856,6 +856,71 @@ type CcnRoute struct {
|
||||
InstanceUin *string `json:"InstanceUin,omitempty" name:"InstanceUin"`
|
||||
}
|
||||
|
||||
type CheckNetDetectStateRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
// 探测目的IPv4地址数组,最多两个。
|
||||
DetectDestinationIp []*string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp" list`
|
||||
|
||||
// 下一跳类型,目前我们支持的类型有:
|
||||
// VPN:VPN网关;
|
||||
// DIRECTCONNECT:专线网关;
|
||||
// PEERCONNECTION:对等连接;
|
||||
// NAT:NAT网关;
|
||||
// NORMAL_CVM:普通云主机;
|
||||
NextHopType *string `json:"NextHopType,omitempty" name:"NextHopType"`
|
||||
|
||||
// 下一跳目的网关,取值与“下一跳类型”相关:
|
||||
// 下一跳类型为VPN,取值VPN网关ID,形如:vpngw-12345678;
|
||||
// 下一跳类型为DIRECTCONNECT,取值专线网关ID,形如:dcg-12345678;
|
||||
// 下一跳类型为PEERCONNECTION,取值对等连接ID,形如:pcx-12345678;
|
||||
// 下一跳类型为NAT,取值Nat网关,形如:nat-12345678;
|
||||
// 下一跳类型为NORMAL_CVM,取值云主机IPv4地址,形如:10.0.0.12;
|
||||
NextHopDestination *string `json:"NextHopDestination,omitempty" name:"NextHopDestination"`
|
||||
|
||||
// 网络探测实例ID。形如:netd-12345678。
|
||||
NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"`
|
||||
|
||||
// `VPC`实例`ID`。形如:`vpc-12345678`
|
||||
VpcId *string `json:"VpcId,omitempty" name:"VpcId"`
|
||||
|
||||
// 子网实例ID。形如:subnet-12345678。
|
||||
SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"`
|
||||
|
||||
// 网络探测名称,最大长度不能超过60个字节。
|
||||
NetDetectName *string `json:"NetDetectName,omitempty" name:"NetDetectName"`
|
||||
}
|
||||
|
||||
func (r *CheckNetDetectStateRequest) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *CheckNetDetectStateRequest) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type CheckNetDetectStateResponse struct {
|
||||
*tchttp.BaseResponse
|
||||
Response *struct {
|
||||
|
||||
// 网络探测验证结果对象数组。
|
||||
NetDetectIpStateSet []*NetDetectIpState `json:"NetDetectIpStateSet,omitempty" name:"NetDetectIpStateSet" list`
|
||||
|
||||
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
|
||||
} `json:"Response"`
|
||||
}
|
||||
|
||||
func (r *CheckNetDetectStateResponse) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *CheckNetDetectStateResponse) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type ClassicLinkInstance struct {
|
||||
|
||||
// VPC实例ID
|
||||
@ -1453,6 +1518,71 @@ func (r *CreateNatGatewayResponse) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type CreateNetDetectRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
// `VPC`实例`ID`。形如:`vpc-12345678`
|
||||
VpcId *string `json:"VpcId,omitempty" name:"VpcId"`
|
||||
|
||||
// 子网实例ID。形如:subnet-12345678。
|
||||
SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"`
|
||||
|
||||
// 网络探测名称,最大长度不能超过60个字节。
|
||||
NetDetectName *string `json:"NetDetectName,omitempty" name:"NetDetectName"`
|
||||
|
||||
// 探测目的IPv4地址数组。最多两个。
|
||||
DetectDestinationIp []*string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp" list`
|
||||
|
||||
// 下一跳类型,目前我们支持的类型有:
|
||||
// VPN:VPN网关;
|
||||
// DIRECTCONNECT:专线网关;
|
||||
// PEERCONNECTION:对等连接;
|
||||
// NAT:NAT网关;
|
||||
// NORMAL_CVM:普通云主机;
|
||||
NextHopType *string `json:"NextHopType,omitempty" name:"NextHopType"`
|
||||
|
||||
// 下一跳目的网关,取值与“下一跳类型”相关:
|
||||
// 下一跳类型为VPN,取值VPN网关ID,形如:vpngw-12345678;
|
||||
// 下一跳类型为DIRECTCONNECT,取值专线网关ID,形如:dcg-12345678;
|
||||
// 下一跳类型为PEERCONNECTION,取值对等连接ID,形如:pcx-12345678;
|
||||
// 下一跳类型为NAT,取值Nat网关,形如:nat-12345678;
|
||||
// 下一跳类型为NORMAL_CVM,取值云主机IPv4地址,形如:10.0.0.12;
|
||||
NextHopDestination *string `json:"NextHopDestination,omitempty" name:"NextHopDestination"`
|
||||
|
||||
// 网络探测描述。
|
||||
NetDetectDescription *string `json:"NetDetectDescription,omitempty" name:"NetDetectDescription"`
|
||||
}
|
||||
|
||||
func (r *CreateNetDetectRequest) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *CreateNetDetectRequest) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type CreateNetDetectResponse struct {
|
||||
*tchttp.BaseResponse
|
||||
Response *struct {
|
||||
|
||||
// 网络探测(NetDetect)对象。
|
||||
NetDetect *NetDetect `json:"NetDetect,omitempty" name:"NetDetect"`
|
||||
|
||||
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
|
||||
} `json:"Response"`
|
||||
}
|
||||
|
||||
func (r *CreateNetDetectResponse) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *CreateNetDetectResponse) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type CreateNetworkInterfaceRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
@ -2449,6 +2579,40 @@ func (r *DeleteNatGatewayResponse) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type DeleteNetDetectRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
// 网络探测实例`ID`。形如:`netd-12345678`
|
||||
NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"`
|
||||
}
|
||||
|
||||
func (r *DeleteNetDetectRequest) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *DeleteNetDetectRequest) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type DeleteNetDetectResponse struct {
|
||||
*tchttp.BaseResponse
|
||||
Response *struct {
|
||||
|
||||
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
|
||||
} `json:"Response"`
|
||||
}
|
||||
|
||||
func (r *DeleteNetDetectResponse) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *DeleteNetDetectResponse) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type DeleteNetworkInterfaceRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
@ -4029,6 +4193,113 @@ func (r *DescribeNatGatewaysResponse) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type DescribeNetDetectStatesRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
// 网络探测实例`ID`数组。形如:[`netd-12345678`]
|
||||
NetDetectIds []*string `json:"NetDetectIds,omitempty" name:"NetDetectIds" list`
|
||||
|
||||
// 过滤条件,参数不支持同时指定NetDetectIds和Filters。
|
||||
// <li>net-detect-id - String - (过滤条件)网络探测实例ID,形如:netd-12345678</li>
|
||||
Filters []*Filter `json:"Filters,omitempty" name:"Filters" list`
|
||||
|
||||
// 偏移量,默认为0。
|
||||
Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
|
||||
|
||||
// 返回数量,默认为20,最大值为100。
|
||||
Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
|
||||
}
|
||||
|
||||
func (r *DescribeNetDetectStatesRequest) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *DescribeNetDetectStatesRequest) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type DescribeNetDetectStatesResponse struct {
|
||||
*tchttp.BaseResponse
|
||||
Response *struct {
|
||||
|
||||
// 符合条件的网络探测验证结果对象数组。
|
||||
// 注意:此字段可能返回 null,表示取不到有效值。
|
||||
NetDetectStateSet []*NetDetectState `json:"NetDetectStateSet,omitempty" name:"NetDetectStateSet" list`
|
||||
|
||||
// 符合条件的网络探测验证结果对象数量。
|
||||
// 注意:此字段可能返回 null,表示取不到有效值。
|
||||
TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
|
||||
|
||||
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
|
||||
} `json:"Response"`
|
||||
}
|
||||
|
||||
func (r *DescribeNetDetectStatesResponse) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *DescribeNetDetectStatesResponse) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type DescribeNetDetectsRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
// 网络探测实例`ID`数组。形如:[`netd-12345678`]
|
||||
NetDetectIds []*string `json:"NetDetectIds,omitempty" name:"NetDetectIds" list`
|
||||
|
||||
// 过滤条件,参数不支持同时指定NetDetectIds和Filters。
|
||||
// <li>vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-12345678</li>
|
||||
// <li>net-detect-id - String - (过滤条件)网络探测实例ID,形如:netd-12345678</li>
|
||||
// <li>subnet-id - String - (过滤条件)子网实例ID,形如:subnet-12345678</li>
|
||||
// <li>net-detect-name - String - (过滤条件)网络探测名称</li>
|
||||
Filters []*Filter `json:"Filters,omitempty" name:"Filters" list`
|
||||
|
||||
// 偏移量,默认为0。
|
||||
Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
|
||||
|
||||
// 返回数量,默认为20,最大值为100。
|
||||
Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
|
||||
}
|
||||
|
||||
func (r *DescribeNetDetectsRequest) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *DescribeNetDetectsRequest) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type DescribeNetDetectsResponse struct {
|
||||
*tchttp.BaseResponse
|
||||
Response *struct {
|
||||
|
||||
// 符合条件的网络探测对象数组。
|
||||
// 注意:此字段可能返回 null,表示取不到有效值。
|
||||
NetDetectSet []*NetDetect `json:"NetDetectSet,omitempty" name:"NetDetectSet" list`
|
||||
|
||||
// 符合条件的网络探测对象数量。
|
||||
// 注意:此字段可能返回 null,表示取不到有效值。
|
||||
TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
|
||||
|
||||
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
|
||||
} `json:"Response"`
|
||||
}
|
||||
|
||||
func (r *DescribeNetDetectsResponse) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *DescribeNetDetectsResponse) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type DescribeNetworkInterfaceLimitRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
@ -6439,6 +6710,65 @@ func (r *ModifyNatGatewayDestinationIpPortTranslationNatRuleResponse) FromJsonSt
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type ModifyNetDetectRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
// 网络探测实例`ID`。形如:`netd-12345678`
|
||||
NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"`
|
||||
|
||||
// 网络探测名称,最大长度不能超过60个字节。
|
||||
NetDetectName *string `json:"NetDetectName,omitempty" name:"NetDetectName"`
|
||||
|
||||
// 探测目的IPv4地址数组,最多两个。
|
||||
DetectDestinationIp []*string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp" list`
|
||||
|
||||
// 下一跳类型,目前我们支持的类型有:
|
||||
// VPN:VPN网关;
|
||||
// DIRECTCONNECT:专线网关;
|
||||
// PEERCONNECTION:对等连接;
|
||||
// NAT:NAT网关;
|
||||
// NORMAL_CVM:普通云主机;
|
||||
NextHopType *string `json:"NextHopType,omitempty" name:"NextHopType"`
|
||||
|
||||
// 下一跳目的网关,取值与“下一跳类型”相关:
|
||||
// 下一跳类型为VPN,取值VPN网关ID,形如:vpngw-12345678;
|
||||
// 下一跳类型为DIRECTCONNECT,取值专线网关ID,形如:dcg-12345678;
|
||||
// 下一跳类型为PEERCONNECTION,取值对等连接ID,形如:pcx-12345678;
|
||||
// 下一跳类型为NAT,取值Nat网关,形如:nat-12345678;
|
||||
// 下一跳类型为NORMAL_CVM,取值云主机IPv4地址,形如:10.0.0.12;
|
||||
NextHopDestination *string `json:"NextHopDestination,omitempty" name:"NextHopDestination"`
|
||||
|
||||
// 网络探测描述。
|
||||
NetDetectDescription *string `json:"NetDetectDescription,omitempty" name:"NetDetectDescription"`
|
||||
}
|
||||
|
||||
func (r *ModifyNetDetectRequest) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *ModifyNetDetectRequest) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type ModifyNetDetectResponse struct {
|
||||
*tchttp.BaseResponse
|
||||
Response *struct {
|
||||
|
||||
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
|
||||
} `json:"Response"`
|
||||
}
|
||||
|
||||
func (r *ModifyNetDetectResponse) ToJsonString() string {
|
||||
b, _ := json.Marshal(r)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (r *ModifyNetDetectResponse) FromJsonString(s string) error {
|
||||
return json.Unmarshal([]byte(s), &r)
|
||||
}
|
||||
|
||||
type ModifyNetworkInterfaceAttributeRequest struct {
|
||||
*tchttp.BaseRequest
|
||||
|
||||
@ -6971,6 +7301,90 @@ type NatGatewayDestinationIpPortTranslationNatRule struct {
|
||||
CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"`
|
||||
}
|
||||
|
||||
type NetDetect struct {
|
||||
|
||||
// `VPC`实例`ID`。形如:`vpc-12345678`
|
||||
VpcId *string `json:"VpcId,omitempty" name:"VpcId"`
|
||||
|
||||
// `VPC`实例名称。
|
||||
VpcName *string `json:"VpcName,omitempty" name:"VpcName"`
|
||||
|
||||
// 子网实例ID。形如:subnet-12345678。
|
||||
SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"`
|
||||
|
||||
// 子网实例名称。
|
||||
SubnetName *string `json:"SubnetName,omitempty" name:"SubnetName"`
|
||||
|
||||
// 网络探测实例ID。形如:netd-12345678。
|
||||
NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"`
|
||||
|
||||
// 网络探测名称,最大长度不能超过60个字节。
|
||||
NetDetectName *string `json:"NetDetectName,omitempty" name:"NetDetectName"`
|
||||
|
||||
// 探测目的IPv4地址数组,最多两个。
|
||||
DetectDestinationIp []*string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp" list`
|
||||
|
||||
// 系统自动分配的探测源IPv4数组。长度为2。
|
||||
DetectSourceIp []*string `json:"DetectSourceIp,omitempty" name:"DetectSourceIp" list`
|
||||
|
||||
// 下一跳类型,目前我们支持的类型有:
|
||||
// VPN:VPN网关;
|
||||
// DIRECTCONNECT:专线网关;
|
||||
// PEERCONNECTION:对等连接;
|
||||
// NAT:NAT网关;
|
||||
// NORMAL_CVM:普通云主机;
|
||||
NextHopType *string `json:"NextHopType,omitempty" name:"NextHopType"`
|
||||
|
||||
// 下一跳目的网关,取值与“下一跳类型”相关:
|
||||
// 下一跳类型为VPN,取值VPN网关ID,形如:vpngw-12345678;
|
||||
// 下一跳类型为DIRECTCONNECT,取值专线网关ID,形如:dcg-12345678;
|
||||
// 下一跳类型为PEERCONNECTION,取值对等连接ID,形如:pcx-12345678;
|
||||
// 下一跳类型为NAT,取值Nat网关,形如:nat-12345678;
|
||||
// 下一跳类型为NORMAL_CVM,取值云主机IPv4地址,形如:10.0.0.12;
|
||||
NextHopDestination *string `json:"NextHopDestination,omitempty" name:"NextHopDestination"`
|
||||
|
||||
// 下一跳网关名称。
|
||||
// 注意:此字段可能返回 null,表示取不到有效值。
|
||||
NextHopName *string `json:"NextHopName,omitempty" name:"NextHopName"`
|
||||
|
||||
// 网络探测描述。
|
||||
// 注意:此字段可能返回 null,表示取不到有效值。
|
||||
NetDetectDescription *string `json:"NetDetectDescription,omitempty" name:"NetDetectDescription"`
|
||||
|
||||
// 创建时间。
|
||||
// 注意:此字段可能返回 null,表示取不到有效值。
|
||||
CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"`
|
||||
}
|
||||
|
||||
type NetDetectIpState struct {
|
||||
|
||||
// 探测目的IPv4地址。
|
||||
DetectDestinationIp *string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp"`
|
||||
|
||||
// 探测结果。
|
||||
// 0:成功;
|
||||
// -1:查询不到路由丢包;
|
||||
// -2:外出ACL丢包;
|
||||
// -3:IN ACL丢包;
|
||||
// -4:其他错误;
|
||||
State *int64 `json:"State,omitempty" name:"State"`
|
||||
|
||||
// 时延,单位毫秒
|
||||
Delay *uint64 `json:"Delay,omitempty" name:"Delay"`
|
||||
|
||||
// 丢包率
|
||||
PacketLossRate *uint64 `json:"PacketLossRate,omitempty" name:"PacketLossRate"`
|
||||
}
|
||||
|
||||
type NetDetectState struct {
|
||||
|
||||
// 网络探测实例ID。形如:netd-12345678。
|
||||
NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"`
|
||||
|
||||
// 网络探测目的IP验证结果对象数组。
|
||||
NetDetectIpStateSet []*NetDetectIpState `json:"NetDetectIpStateSet,omitempty" name:"NetDetectIpStateSet" list`
|
||||
}
|
||||
|
||||
type NetworkInterface struct {
|
||||
|
||||
// 弹性网卡实例ID,例如:eni-f1xjkw1b。
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -501,7 +501,7 @@ github.com/stretchr/testify/assert
|
||||
github.com/stretchr/testify/require
|
||||
# github.com/temoto/robotstxt v1.1.1
|
||||
github.com/temoto/robotstxt
|
||||
# github.com/tencentcloud/tencentcloud-sdk-go v3.0.94+incompatible
|
||||
# github.com/tencentcloud/tencentcloud-sdk-go v3.0.97+incompatible
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http
|
||||
|
Loading…
x
Reference in New Issue
Block a user