EipBP Instance
The EipBp instance is an instance of creating a bandwidth package on Baidu AI Cloud. Identity verification is required to create a bandwidth package. If you fail the identity verification, go to [Baidu Open Cloud Official Website Console](https://console.bce.baidu.com/qualify/? _=1567871861163#/qualify/result) for authentication, and currently, only the creation of prepaid EIP shared bandwidth is supported.
Create a Bandwidth Package Instance
Use the following codes to create a bandwidth package instance.
public void createEipBpTest() {
CreateEipBpRequest request = new CreateEipBpRequest();
request.withBandwidthInMbps(createBandwidthInMbps).withName(name).withEip(eip).
withAutoReleaseTime(autoReleaseTime);
CreateEipBpResponse response = eipBpClient.createEipBp(request);
logger.info(JsonUtils.toJsonString(response));
eipBpId = response.getId();
}
Bandwidth Package Bandwidth Expansion and Contraction
Specifies the bandwidth expansion and contraction of the bandwidth package.
public void resizeEipBpTest() {
eipBpClient.resizeEipBp(eipBpId, resizeBandwidthInMbps);
}
Query the Bandwidth Package Details
Query the bandwidth package details.
public void getEipBpDetailTest() {
GetEipBpRequest request = new GetEipBpRequest();
request.setId(eipBpId);
request.withId(eipBpId);
EipBpDetailResponse eipBpDetailResponse = eipBpClient.getEipBpDetail(eipBpId);
}
Query the Bandwidth Package List
Query the bandwidth package list.
- The bandwidth package list can be queried according to multiple conditions.
- If no query conditions are provided, the default query will cover all bandwidth packages.
- The returned result is the query result of intersection of multiple conditions, i.e. when multiple conditions are provided, bandwidth meeting all conditions simultaneously is returned.
- The query result above supports marker paging, with paging size of 1,000 by default, which can be specified via maxKeys parameter.
public void listEipBpsTest() {
ListEipBpsResponse listEipBpsResponse = eipBpClient.listEipBps(eipBpId, name, bindType);
}
Update the Bandwidth Package Name
Update the name of the specified bandwidth package.
public void renameEipBpTest() {
eipBpClient.renameEipBp(eipBpId, newName);
}
Update the Bandwidth Package Automatic Release Time
Update the automatic release time of the specified bandwidth package.
public void updateAutoReleaseTimeTest() {
eipBpClient.updateAutoReleaseTime(eipBpId, newAutoReleaseTime);
}
Release the Bandwidth Packet
Release the specified bandwidth package.
public void releaseEipBpTest() {
eipBpClient.releaseEipBp(eipBpId);
}