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

VPC

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

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

Interface

Method

API

Bandwidths

Get(client *gophercloud.ServiceClient, bandwidthId string)

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

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v1/{project_id}/bandwidths

链接

Update(client *gophercloud.ServiceClient, bandwidthId string, opts UpdateOptsBuilder)

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

链接

Ports

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v1/{project_id}/ports

链接

Delete(client *gophercloud.ServiceClient, portId string)

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

链接

Get(client *gophercloud.ServiceClient, portId string)

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

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v1/{project_id}/ports

链接

Update(client *gophercloud.ServiceClient, portId string, opts UpdateOptsBuilder)

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

链接

PrivateIps

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v1/{project_id}/privateips

链接

Delete(client *gophercloud.ServiceClient, privateipId string)

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

链接

Get(client *gophercloud.ServiceClient, privateipId string)

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

链接

List(client *gophercloud.ServiceClient, subnetId string, opts ListOptsBuilder)

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

链接

PublicIps

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v1/{project_id}/publicips

链接

Delete(client *gophercloud.ServiceClient, publicipId string)

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

链接

Get(client *gophercloud.ServiceClient, publicipId string)

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

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v1/{project_id}/publicips

链接

Update(client *gophercloud.ServiceClient, publicipId string, opts UpdateOptsBuilder)

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

链接

Quotas

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v1/{project_id}/quotas

链接

SecurityGroupRules

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v1/security-group-rules

链接

Delete(client *gophercloud.ServiceClient, securityGroupsRulesId string)

DELETE /v1/security-group-rules/{security-groups-rules-id}

链接

Get(client *gophercloud.ServiceClient, securityGroupsRulesId string)

GET /v1/security-group-rules/{security-groups-rules-id}

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v1/security-group-rules

链接

SecurityGroups

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v1/{project_id}/security-groups

链接

Delete(client *gophercloud.ServiceClient, securityGroupId string)

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

链接

Get(client *gophercloud.ServiceClient, securityGroupId string)

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

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v1/{project_id}/security-groups

链接

Subnets

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v1/{project_id}/subnets

链接

Delete(client *gophercloud.ServiceClient, vpcId string, subnetId string)

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

链接

Get(client *gophercloud.ServiceClient, subnetId string)

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

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v1/{project_id}/subnets

链接

Update(client *gophercloud.ServiceClient, vpcId string, subnetId string, opts UpdateOptsBuilder)

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

链接

Vpcs

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v1/{project_id}/vpcs

链接

Delete(client *gophercloud.ServiceClient, vpcId string)

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

链接

Get(client *gophercloud.ServiceClient, vpcId string)

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

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v1/{project_id}/vpcs

链接

Update(client *gophercloud.ServiceClient, vpcId string, opts UpdateOptsBuilder)

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

链接

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

Interface

Method

API

Networks

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v2.0/networks

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v2.0/networks

链接

Get(client *gophercloud.ServiceClient, networkId string)

GET /v2.0/networks/{network_id}

链接

Update(client *gophercloud.ServiceClient, networkId string, opts UpdateOptsBuilder)

PUT /v2.0/networks/{network_id)

链接

Delete(client *gophercloud.ServiceClient, networkId string)

DELETE /v2.0/networks/{network_id}

链接

Subnets

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v2.0/subnets

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v2.0/subnets

链接

Get(client *gophercloud.ServiceClient, subnetId string)

GET /v2.0/subnets/{subnet_id}

链接

Update(client *gophercloud.ServiceClient, subnetId string, opts UpdateOptsBuilder)

PUT /v2.0/subnets/{subnet_id}

链接

Delete(client *gophercloud.ServiceClient, subnetId string)

DELETE /v2.0/subnets/{subnet_id}

链接

Ports

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v2.0/ports

链接

List(client *gophercloud.ServiceClient, opts ListOptsBuilder)

GET /v2.0/ports

链接

Get(client *gophercloud.ServiceClient, portId string)

GET /v2.0/ports/{port_id}

链接

Update(client *gophercloud.ServiceClient, portId string, opts UpdateOptsBuilder)

PUT /v2.0/ports/{port_id}

链接

Delete(client *gophercloud.ServiceClient, portId string)

DELETE /v2.0/ports/{port_id}

链接

SecurityGroup

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v2.0/security-groups

链接

Update(client *gophercloud.ServiceClient, securityGroupId string, opts UpdateOptsBuilder)

PUT /v2.0/security-groups/{security_group_id}

链接

List(client *gophercloud.ServiceClient, opts ListOpts)

GET /v2.0/security-groups

链接

Get(client *gophercloud.ServiceClient, securityGroupId string)

GET /v2.0/security-groups/{security_group_id}

链接

SecurityGroupRules

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v2.0/security-group-rules

链接

Delete(client *gophercloud.ServiceClient, securityGroupsRulesId string)

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

链接

List(client *gophercloud.ServiceClient, opts ListOpts)

GET /v2.0/security-group-rules

链接

Get(client *gophercloud.ServiceClient, securityGroupsRulesId string)

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

链接

Routers

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v2.0/routers

链接

Delete(client *gophercloud.ServiceClient, routerId string)

DELETE /v2.0/routers/{router_id}

链接

Update(client *gophercloud.ServiceClient, routerId string, opts UpdateOptsBuilder)

PUT /v2.0/routers/{router_id}

链接

List(client *gophercloud.ServiceClient, opts ListOpts)

GET /v2.0/routers

链接

Get(client *gophercloud.ServiceClient, routerId string)

GET /v2.0/routers/{router_id}

链接

AddInterface(client *gophercloud.ServiceClient, routerId string, opts AddInterfaceOptsBuilder)

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

链接

RemoveInterface(client *gophercloud.ServiceClient, routerId string, opts RemoveInterfaceOptsBuilder)

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

链接

FloatingIps

Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder)

POST /v2.0/floatingips

链接

Delete(client *gophercloud.ServiceClient, floatingipId string)

DELETE /v2.0/floatingips/{floatingip_id}

链接

Update(client *gophercloud.ServiceClient, floatingipId string, opts UpdateOptsBuilder)

PUT /v2.0/floatingips/{floatingip_id}

链接

List(client *gophercloud.ServiceClient, opts ListOpts)

GET /v2.0/floatingips

链接

Get(client *gophercloud.ServiceClient, floatingipId string)

GET /v2.0/floatingips/{floatingip_id}

链接

分享:

    相关文档

    相关产品

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

提交成功!

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

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

*必选

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

字符长度不能超过200

提交反馈 取消

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

跳转到云社区