vpc_peering_connection.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package compute
  15. import (
  16. "yunion.io/x/cloudmux/pkg/apis/compute"
  17. "yunion.io/x/onecloud/pkg/apis"
  18. )
  19. const (
  20. VPC_PEERING_CONNECTION_STATUS_CREATING = compute.VPC_PEERING_CONNECTION_STATUS_CREATING
  21. VPC_PEERING_CONNECTION_STATUS_CREATE_FAILED = "create_failed"
  22. VPC_PEERING_CONNECTION_STATUS_DELETE_FAILED = "delete_failed"
  23. VPC_PEERING_CONNECTION_STATUS_PENDING_ACCEPT = compute.VPC_PEERING_CONNECTION_STATUS_PENDING_ACCEPT
  24. VPC_PEERING_CONNECTION_STATUS_ACTIVE = compute.VPC_PEERING_CONNECTION_STATUS_ACTIVE
  25. VPC_PEERING_CONNECTION_STATUS_DELETING = compute.VPC_PEERING_CONNECTION_STATUS_DELETING
  26. VPC_PEERING_CONNECTION_STATUS_UNKNOWN = compute.VPC_PEERING_CONNECTION_STATUS_UNKNOWN
  27. )
  28. type VpcPeeringConnectionDetails struct {
  29. apis.EnabledStatusInfrasResourceBaseDetails
  30. VpcResourceInfo
  31. PeerVpcName string `json:"peer_vpc_name"`
  32. }
  33. type VpcPeeringConnectionCreateInput struct {
  34. apis.EnabledStatusInfrasResourceBaseCreateInput
  35. SVpcResourceBase
  36. PeerVpcId string `json:"peer_vpc_id"`
  37. //跨区域vpc对等连接带宽,仅对腾讯云有效
  38. //单位Mbps,可选值 10,20,50,100,200,500,1000
  39. Bandwidth int `json:"bandwidth"`
  40. }
  41. type VpcPeeringConnectionListInput struct {
  42. apis.EnabledStatusInfrasResourceBaseListInput
  43. apis.ExternalizedResourceBaseListInput
  44. VpcFilterListInput
  45. PeerVpcId string `json:"peer_vpc_id"`
  46. }
  47. type VpcPeeringConnectionUpdateInput struct {
  48. apis.EnabledStatusInfrasResourceBaseUpdateInput
  49. }