Help Center > > Developer Guide> Mapping Between API and SDK> Java> VPC

VPC

Updated at: Oct 09, 2019 GMT+08:00

The SDK interfaces based on the VPC v1 API are as follows. For details about the invoking methods, see the sample codes.

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}

The SDK interfaces based on the Neutron v2.0 API are as follows. For details about the invoking methods, see the sample codes.

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}

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel