mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-21 00:24:07 +08:00
eip of snat rule in huawei cloud; bind ip to natgateway automatically when creating nat rule in aliyun cloud and try to unbind when deleting; fill or unfill the fields AssociateType, AssociateId when creating or deleting nat rule in huawei cloud; add SNatEntry and SNatEntryManager which has common field and function of SNat and DNat.
381 lines
8.6 KiB
YAML
381 lines
8.6 KiB
YAML
CanDelete:
|
||
type: string
|
||
example: true
|
||
description: 可否删除
|
||
CanUpdate:
|
||
type: string
|
||
example: true
|
||
description: 可否更新
|
||
CreatedAt:
|
||
type: string
|
||
example: 2019-05-30T08:46:12.000000Z
|
||
description: 资源创建时间
|
||
UpdatedAt:
|
||
type: string
|
||
example: 2019-05-30T08:46:12.000000Z
|
||
description: 资源最近一次更新时间
|
||
|
||
NatGateway:
|
||
type: object
|
||
description: NAT网关
|
||
properties:
|
||
id:
|
||
type: string
|
||
example: ea27c0ce-5870-49f3-8d57-f53e63f40361
|
||
description: NAT网关ID
|
||
readOnly: true
|
||
name:
|
||
type: string
|
||
description: NAT网关名称
|
||
example: nat-jo5pskhg
|
||
can_delete:
|
||
$ref: '#/CanDelete'
|
||
can_update:
|
||
$ref: '#/CanUpdate'
|
||
cloudregion_id:
|
||
type: string
|
||
description: 区域ID
|
||
example: 609c57b0-a5a7-4a5f-886c-950e1333cbd4
|
||
external_id:
|
||
type: string
|
||
description: 资源外部ID,对应纳管云上的ID
|
||
example: ngw-2zexqebrmyohc1eqly153
|
||
is_emulated:
|
||
type: boolean
|
||
description: 是否是虚拟资源
|
||
example: false
|
||
manager_id:
|
||
type: string
|
||
description: 对应账号的订阅ID
|
||
example: f8f733a6-5db3-42ed-8cde-36bb073ea499
|
||
nat_spec:
|
||
type: string
|
||
description: NAT网关规格
|
||
example: small
|
||
region:
|
||
type: string
|
||
description: 所属的区域
|
||
example: 阿里云 华北2(北京)
|
||
region_ext_id:
|
||
type: string
|
||
description: 所属区域的外部ID
|
||
example: cn-beijing
|
||
region_id:
|
||
type: string
|
||
description: 区域ID
|
||
example: f2c9efe0-b743-4de0-84ff-e40e37814ad3
|
||
status:
|
||
type: string
|
||
description: NAT网关状态
|
||
example: available
|
||
updated_at:
|
||
$ref: '#/UpdatedAt'
|
||
vpc:
|
||
type: string
|
||
description: 网关VPC的名称
|
||
example: test-vpc
|
||
vpc_id:
|
||
type: string
|
||
description: NAT网关的VPC ID
|
||
example: 144bf8aa-782c-48d0-8968-a75fa8aa636a
|
||
account:
|
||
type: string
|
||
description: 云账号名称
|
||
example: office-qcloud
|
||
account_id:
|
||
type: string
|
||
description: 云账号ID
|
||
example: 8ebce595-1a37-473e-8ff8-f02f0b82773d
|
||
provider:
|
||
type: string
|
||
description: 云平台类型
|
||
example: Qcloud
|
||
|
||
NatGatewayListResponse:
|
||
type: object
|
||
properties:
|
||
limit:
|
||
type: integer
|
||
example: 20
|
||
natgateways:
|
||
type: array
|
||
items:
|
||
$ref: '#/NatGateway'
|
||
total:
|
||
type: integer
|
||
example: 124
|
||
|
||
NatGatewayResponse:
|
||
type: object
|
||
properties:
|
||
natgateway:
|
||
type: object
|
||
$ref: '#/NatGateway'
|
||
|
||
DNatEntry:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: string
|
||
example: 80d8e168-fc51-45f8-8d8d-f072ed27b390
|
||
description: 资源UUID
|
||
can_delete:
|
||
$ref: '#/CanDelete'
|
||
can_update:
|
||
$ref: '#/CanUpdate'
|
||
created_at:
|
||
$ref: '#/CreatedAt'
|
||
updated_at:
|
||
$ref: '#/UpdatedAt'
|
||
external_id:
|
||
type: string
|
||
example: dnat-2zeqqfcow4t67ahduei7x
|
||
description: 资源外部ID,对应纳管云的ID
|
||
internal_ip:
|
||
type: string
|
||
example: 10.0.42.4
|
||
description: 内网IP
|
||
internal_port:
|
||
type: integer
|
||
example: 8080
|
||
description: 内网端口
|
||
external_ip:
|
||
type: string
|
||
example: 111.230.80.43
|
||
description: 公网IP
|
||
external_port:
|
||
type: integer
|
||
example: 432
|
||
description: 公网端口
|
||
ip_protocol:
|
||
type: string
|
||
description: 转发协议
|
||
enum: [udp,tcp,any]
|
||
example: tcp
|
||
name:
|
||
type: string
|
||
description: DNAT名称(处理过的)
|
||
example: hello-ea27c0ce-5870-49f3-8d57-f53e63f40361
|
||
natgateway:
|
||
type: string
|
||
description: 所属NAT网关名称
|
||
example: test-nat
|
||
natgateway_id:
|
||
type: string
|
||
description: 所属NAT网关ID
|
||
example: 609c57b0-a5a7-4a5f-886c-950e1333cbd4
|
||
status:
|
||
type: string
|
||
description: DNAT状态
|
||
example: available
|
||
real_name:
|
||
type: string
|
||
description: DNAT真实的名称
|
||
example: hello
|
||
|
||
DNatEntryListResponse:
|
||
type: object
|
||
properties:
|
||
limit:
|
||
type: integer
|
||
example: 20
|
||
natdentries:
|
||
type: array
|
||
items:
|
||
$ref: '#/DNatEntry'
|
||
total:
|
||
type: integer
|
||
example: 124
|
||
|
||
DNatEntryResponse:
|
||
type: object
|
||
properties:
|
||
natdentry:
|
||
type: object
|
||
$ref: '#/DNatEntry'
|
||
|
||
SNatEntry:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: string
|
||
example: 80d8e168-fc51-45f8-8d8d-f072ed27b390
|
||
description: 资源UUID
|
||
can_delete:
|
||
$ref: '#/CanDelete'
|
||
can_update:
|
||
$ref: '#/CanUpdate'
|
||
created_at:
|
||
$ref: '#/CreatedAt'
|
||
updated_at:
|
||
$ref: '#/UpdatedAt'
|
||
external_id:
|
||
type: string
|
||
example: snat-2zeqqfcow4t67ahduei7x
|
||
description: 资源外部ID,对应纳管云的ID
|
||
ip:
|
||
type: string
|
||
example: 39.96.219.74
|
||
description: 公网IP
|
||
name:
|
||
type: string
|
||
description: SNAT名称(经过处理的)
|
||
example: hello-ea27c0ce-5870-49f3-8d57-f53e63f40361
|
||
natgateway:
|
||
type: string
|
||
example: test-nat
|
||
description: 所属NAT网关名称
|
||
natgateway_id:
|
||
type: string
|
||
example: 4daf9886-ebe6-4a8a-8082-3bd623d1c857
|
||
description: 所属NAT网关ID
|
||
network:
|
||
$ref: 'network.yaml#/Network'
|
||
network_id:
|
||
type: string
|
||
example: 7caf732e-93fc-42c0-89d2-86aac2970c38
|
||
description: 所属子网ID
|
||
source_cidr:
|
||
type: string
|
||
example: 10.0.0.0/24
|
||
description: 源CIDR
|
||
status:
|
||
type: string
|
||
example: available
|
||
description: SNAT状态
|
||
real_name:
|
||
type: string
|
||
example: hello
|
||
description: SNAT真实的名称
|
||
|
||
SNatEntryListResponse:
|
||
type: object
|
||
properties:
|
||
limit:
|
||
type: integer
|
||
example: 20
|
||
natsentries:
|
||
type: array
|
||
items:
|
||
$ref: '#/SNatEntry'
|
||
total:
|
||
type: integer
|
||
example: 124
|
||
|
||
SNatEntryResponse:
|
||
type: object
|
||
properties:
|
||
natsentry:
|
||
type: object
|
||
$ref: '#/SNatEntry'
|
||
|
||
DNatEntryCreate:
|
||
type: object
|
||
properties:
|
||
natdentry:
|
||
type: object
|
||
required:
|
||
- name
|
||
- natgateway_id
|
||
- internal_ip
|
||
- internal_port
|
||
- external_ip
|
||
- external_ip_id
|
||
- external_port
|
||
- ip_protocol
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: ones
|
||
description: DNat的名字
|
||
natgateway_id:
|
||
type: string
|
||
example: 378570ec-ded0-4b44-89ed-edce96eb32f7
|
||
description: 所属NAT网关ID
|
||
internal_ip:
|
||
type: string
|
||
example: 10.0.42.4
|
||
description: 内网IP
|
||
internal_port:
|
||
type: integer
|
||
example: 8080
|
||
description: 内网端口
|
||
external_ip:
|
||
type: string
|
||
example: 111.230.80.43
|
||
description: 公网IP
|
||
external_ip_id:
|
||
type: string
|
||
example: ""
|
||
description: 公网IP对应的ID,除了华为云,可以为空
|
||
external_port:
|
||
type: integer
|
||
example: 432
|
||
description: 公网端口
|
||
ip_protocol:
|
||
type: string
|
||
description: 转发协议
|
||
enum: [udp,tcp,any]
|
||
example: tcp
|
||
|
||
SNatEntryCreate:
|
||
type: object
|
||
properties:
|
||
natsentry:
|
||
type: object
|
||
required:
|
||
- name
|
||
- natgateway_id
|
||
- network_id
|
||
- ip
|
||
- external_ip_id
|
||
- source_cidr
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: ones
|
||
description: SNat的名字
|
||
natgateway_id:
|
||
type: string
|
||
example: 378570ec-ded0-4b44-89ed-edce96eb32f7
|
||
description: 所属NAT网关ID
|
||
network_id:
|
||
type: string
|
||
example: 648a6baa-9827-49b1-8831-278a889154a1
|
||
description: 所属网络ID(与source_cidr互斥,只需要传入一个)
|
||
ip:
|
||
type: string
|
||
example: 49.4.12.184
|
||
description: 公网IP
|
||
external_ip_id:
|
||
type: string
|
||
example: ""
|
||
description: 公网IP对应的ID
|
||
source_cidr:
|
||
type: string
|
||
example: 192.168.1.0/24
|
||
description: 映射到公网IP的内网网段(和network_id互斥,只需要传入一个)
|
||
|
||
DNATResources:
|
||
type: object
|
||
properties:
|
||
eips:
|
||
type: array
|
||
items:
|
||
type: string
|
||
example: [34.23.125.45, 23.45.123.56]
|
||
|
||
SNATResources:
|
||
type: object
|
||
properties:
|
||
eips:
|
||
type: array
|
||
items:
|
||
type: string
|
||
example: [34.23.125.45, 23.45.123.56]
|
||
networks:
|
||
type: array
|
||
items:
|
||
type: string
|
||
example: []
|