文档首页 > > 开发指南> API & SDK 对应关系> Java> VPC

VPC

分享
更新时间: 2019/11/15 GMT+08:00

基于VPC v1 API的SDK接口如下,调用方式请参考示例代码。

Interface

Method

API

VpcService

Vpc create(VpcCreate creation)

POST /v1/{project_id}/vpcs

链接

Vpc get(String vpcId)

GET /v1/{project_id}/vpcs/{vpc_id}

链接

List<? extends Vpc> list()

GET /v1/{project_id}/vpcs

链接

List<? extends Vpc> list(Map<String, String> filteringParams)

GET /v1/{project_id}/vpcs

链接

Vpc update(String vpcId, VpcUpdate vpcUpdate)

PUT /v1/{project_id}/vpcs/{vpc_id}

链接

ActionResponse delete(String vpcId)

DELETE /v1/{project_id}/vpcs/{vpc_id}

链接

PublicIpService

VirtualPublicIpsResp apply(VirtualPublicIps virtualPublicIps)

POST /v1/{project_id}/publicips

链接

VirtualPublicIp get(String publicipId)

GET /v1/{project_id}/publicips/{publicip_id}

链接

List<? extends PublicIp> list()

GET /v1/{project_id}/publicips

链接

List<? extends PublicIp> list(Map<String, String> filteringParams)

GET /v1/{project_id}/publicips

链接

PublicIp update(String publicIpId, PublicIpUpdate publicIpUpdate)

PUT /v1/{project_id}/publicips/{publicip_id}

链接

ActionResponse delete(String publicIpId)

DELETE /v1/{project_id}/publicips/{publicip_id}

链接

PrivateIpService

List<? extends PrivateIp> apply(PrivateIps privateIps)

POST /v1/{project_id}/privateips

链接

PrivateIp get(String privateIpId)

GET /v1/{project_id}/privateips/{privateip_id}

链接

List<? extends PrivateIp> list(String subnetId)

GET /v1/{project_id}/subnets/{subnet_id}/privateips

链接

List<? extends PrivateIp> list(String subnetId, Map<String, String> filteringParams)

GET /v1/{project_id}/subnets/{subnet_id}/privateips

链接

ActionResponse delete(String privateIpId)

DELETE /v1/{project_id}/privateips/{privateip_id}

链接

SecurityGroupService

SecurityGroup create(SecurityGroupCreate securityGroup)

POST /v1/{project_id}/security-groups

链接

SecurityGroup get(String securityGroupId)

GET /v1/{project_id}/security-groups/{security_group_id}

链接

List<? extends SecurityGroup> list()

GET /v1/{project_id}/security-groups

链接

List<? extends SecurityGroup> list(Map<String, String> filteringParams)

GET /v1/{project_id}/security-groups

链接

ActionResponse delete(String securityGroupId)

DELETE /v1/{project_id}/security-groups/{security_group_id}

链接

SecurityGroupRule createSecurityGroupRule(SecurityGroupRule securityGroupRule)

POST /v1/{project_id}/security-group-rules

链接

SecurityGroupRule getSecurityGroupRule(String securityGroupRuleId)

GET /v1/{project_id}/security-group-rules/{rules_security_groups_id}

链接

List<? extends SecurityGroupRule> listSecurityGroupRules()

GET /v1/{project_id}/security-group-rules

链接

List<? extends SecurityGroupRule> listSecurityGroupRules(Map<String, String> filteringParams)

GET /v1/{project_id}/security-group-rules

链接

ActionResponse deleteSecurityGroupRule(String securityGroupRuleId)

DELETE /v1/{project_id}/security-group-rules/{rules_security_groups_id}

链接

BandWidthService

VirtualBandWidths get(String bandwidthId)

GET /v1/{project_id}/bandwidths/{bandwidth_id}

链接

List<VirtualBandWidths> list()

GET /v1/{project_id}/bandwidths

链接

List<VirtualBandWidths> list(Map<String, String> filteringParams)

GET /v1/{project_id}/bandwidths

链接

VirtualBandWidths update(VirtualBandWidthUpdate bandWidtUpdate, String bandwidthId)

PUT /v1/{project_id}/bandwidths/{bandwidth_id}

链接

QuotaService

Quotas list()

GET /v1/{project_id}/quotas

链接

Quotas list(String type)

GET /v1/{project_id}/quotas

链接

SubnetService

Subnet create(SubnetCreate creation)

POST /v1/{project_id}/subnets

链接

Subnet get(String subnetId)

GET /v1/{project_id}/subnets/{subnet_id}

链接

List<? extends Subnet> list()

GET /v1/{project_id}/subnets

链接

List<? extends Subnet> list(Map<String, String> filteringParams)

GET /v1/{project_id}/subnets

链接

SubnetUpdateResp update(String vpcId, String subnetId, SubnetUpdate subnetUpdate)

PUT /v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id}

链接

ActionResponse delete(String vpcId,String subnetId)

DELETE /v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id}

链接

PortService

Port create(PortCreate port)

POST /v1/{project_id}/ports

链接

Port get(String portId)

GET /v1/{project_id}/ports/{port_id}

链接

List<? extends Port> list()

GET /v1/{project_id}/ports

链接

List<? extends Port> list(Map<String, String> filteringParams)

GET /v1/{project_id}/ports

链接

Port update(String portId, PortUpdate portUpdate)

PUT /v1/{project_id}/ports/{port_id}

链接

ActionResponse delete(String portId)

DELETE /v1/{project_id}/ports/{port_id}

链接

基于VPC v2.0 API的SDK接口如下,调用方式请参考示例代码。

Interface

Method

API

PublicIpService

AsyncPublicipRespEntity apply(VirtualPublicIps virtualPublicIps)

POST /v2.0/{project_id}/publicips

链接

BandWidthService

AsyncBandWidthRespEntity update(VirtualBandWidths bandWidth, String bandwidthId)

PUT /v2.0/{project_id}/bandwidths/{bandwidth_id}

链接

基于Neutron v2.0 API的SDK接口如下,调用方式请参考示例代码。

Interface

Method

API

NetFloatingIPService

NetFloatingIP associateToPort(String id, String portId)

PUT /v2.0/floatingips/{floatingip_id}

链接

NetFloatingIP create(NetFloatingIP floatingIp)

POST /v2.0/floatingips

链接

ActionResponse delete(String id)

DELETE /v2.0/floatingips/{floatingip_id}

链接

NetFloatingIP disassociateFromPort(String id)

PUT /v2.0/floatingips/{floatingip_id}

链接

NetFloatingIP get(String id)

GET /v2.0/floatingips/{floatingip_id}

链接

List<? extends NetFloatingIP> list()

GET /v2.0/floatingips

链接

List<? extends NetFloatingIP> list(Map<String, String> filteringParams)

GET /v2.0/floatingips

链接

NetworkService

Network create(Network network)

POST /v2.0/networks

链接

ActionResponse delete(String networkId)

DELETE /v2.0/networks/{network_id}

链接

Network get(String networkId)

GET /v2.0/networks/{network_id}

链接

List<? extends Network> list()

GET /v2.0/networks

链接

List<? extends Network> list(Map<String, String>filteringParams)

GET /v2.0/networks

链接

Network update(String networkId, NetworkUpdate network)

PUT /v2.0/networks/{network_id}

链接

PortService

Port create(Port port)

POST /v2.0/ports

链接

ActionResponse delete(String portId)

DELETE /v2.0/ports/{port_id}

链接

Port get(String portId)

GET /v2.0/ports/{port_id}

链接

List<? extends Port> list()

GET /v2.0/ports

链接

List<? extends Port> list(PortListOptions options)

GET /v2.0/ports?network_id={network_id}

链接

Port update(Port port)

PUT /v2.0/ports/{port_id}

链接

RouterService

RouterInterface attachInterface(String routerId, AttachInterfaceType type, String portOrSubnetId)

PUT /v2.0/routers/{router_id}/add_router_interface

链接

Router create(Router router)

POST /v2.0/routers

链接

Router create(String name, boolean adminStateUp)

POST /v2.0/routers

链接

ActionResponse delete(String routerId)

DELETE /v2.0/routers/{router_id}

链接

RouterInterface detachInterface(String routerId, String subnetId, String portId)

PUT /v2.0/routers/{router_id}/remove_router_interface

链接

Router get(String routerId)

GET /v2.0/routers/{router_id}

链接

List<? extends Router>list()

GET /v2.0/routers

链接

Router toggleAdminStateUp(String routerId, boolean adminStateUp)

PUT /v2.0/routers/{router_id}

链接

Router update(Router router)

PUT /v2.0/routers/{router_id}

链接

SecurityGroupRuleService

SecurityGroupRule create(SecurityGroupRule rule)

POST /v2.0/security-group-rules

链接

void delete(String id)

DELETE /v2.0/security-group-rules/{security-group-rules-id}

链接

SecurityGroupRule get(String id)

GET /v2.0/security-group-rules/{security-group-rules-id}

链接

List<? extends SecurityGroupRule> list()

GET /v2.0/security-group-rules

链接

SecurityGroupService

SecurityGroup create(SecurityGroup securityGroup)

POST /v2.0/security-groups

链接

ActionResponse delete(String id)

DELETE /v2.0/security-groups/{security-group-id}

链接

SecurityGroup get(String id)

GET /v2.0/security-groups/{security-group-id}

链接

List<? extends SecurityGroup>list()

GET /v2.0/security-groups

链接

SubnetService

Subnet create(Subnet subnet)

POST /v2.0/subnets

链接

ActionResponse delete(String subnetId)

DELETE /v2.0/subnets/{subnet_id}

链接

Subnet get(String subnetId)

GET /v2.0/subnets/{subnet_id}

链接

List<? extends Subnet>list()

GET /v2.0/subnets

链接

List<? extends Subnet>list(Map<String,String> filteringParams)

GET /v2.0/subnets

链接

Subnet update(String subnetId, Subnet subnet)

PUT /v2.0/subnets/{subnet_id}

链接

Subnet update(Subnet subnet)

PUT /v2.0/subnets/{subnet_id}

链接

分享:

    相关文档

    相关产品

文档是否有解决您的问题?

提交成功!

非常感谢您的反馈,我们会继续努力做到更好!

反馈提交失败,请稍后再试!

*必选

请至少选择或填写一项反馈信息

字符长度不能超过200

提交反馈 取消

如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨

跳转到云社区