类 EipClient
- java.lang.Object
-
- com.baidubce.AbstractBceClient
-
- com.baidubce.services.eip.EipClient
-
public class EipClient extends AbstractBceClient
Provides the client for accessing the Elastic Ip Service (EIP).
-
-
字段概要
-
从类继承的字段 com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
-
-
构造器概要
构造器 构造器 说明 EipClient()EipClient(BceClientConfiguration clientConfiguration)Constructs a new InstanceClient to invoke service methods on eip instance.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidbindEip(BindEipRequest request)bind the eip to a specified instanceId and instanceType(BCC|BLB).voidbindEip(String eip, String instanceId, String instanceType)bind the eip to a specified instanceId and instanceType(BCC|BLB).CreateEipResponsecreateEip(int bandwidthInMbps)Create an eip with the specified options.CreateEipResponsecreateEip(CreateEipRequest request)Create an eip with the specified options.protected voidfillPayload(InternalRequest internalRequest, AbstractBceRequest bceRequest)the method to fill the internalRequest's content field with bceRequest only support HttpMethodName.POST or HttpMethodName.PUTListEipsResponselistEips()get a list of eips owned by the authenticated user and default conditionsListEipsResponselistEips(ListEipsRequest request)get a list of eips owned by the authenticated user and specified conditions we can Also get a single eip function through this interface by eip condition if query by the instanceId or instanceType condition, must provides both of them at the same timevoidpurchaseReservedEip(PurchaseReservedEipRequest request)PurchaseReserved eip with fixed duration only Prepaid eip can do this This is an asynchronous interfacevoidpurchaseReservedEip(String eip, int reservationLength, String reservationTimeUnit)PurchaseReserved eip with fixed duration only Prepaid eip can do thisvoidpurchaseReservedEipInMonth(String eip, int reservationLength)PurchaseReserved eip with specified duration in monthvoidreleaseEip(ReleaseEipRequest request)release the eip(delete operation) Only the Postpaid instance or Prepaid which is expired can be released.voidreleaseEip(String eip)release the eip(delete operation)voidresizeEip(ResizeEipRequest request)Resizing eip The Prepaid eip can not be downgrade.voidresizeEip(String eip, int newBandwidthInMbps)Resizing eipvoidunbindEip(UnbindEipRequest request)unbind the eip from a specified instancevoidunbindEip(String eip)unbind the eip from a specified instance-
从类继承的方法 com.baidubce.AbstractBceClient
computeBktVirEndpoint, computeServiceId, getBktVirEndpoint, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
-
-
-
-
构造器详细资料
-
EipClient
public EipClient()
-
EipClient
public EipClient(BceClientConfiguration clientConfiguration)
Constructs a new InstanceClient to invoke service methods on eip instance.- 参数:
clientConfiguration- The BCE client configuration options.
-
-
方法详细资料
-
createEip
public CreateEipResponse createEip(int bandwidthInMbps)
Create an eip with the specified options.- 参数:
bandwidthInMbps- specify the bandwidth in Mbps- 返回:
-
createEip
public CreateEipResponse createEip(CreateEipRequest request)
Create an eip with the specified options. This is an asynchronous interface- 参数:
request- The request containing all options for creating an eip.- 返回:
- created eip address
-
resizeEip
public void resizeEip(String eip, int newBandwidthInMbps)
Resizing eip- 参数:
eip- eip address to be resizednewBandwidthInMbps- specify new bandwidth in Mbps for eip
-
resizeEip
public void resizeEip(ResizeEipRequest request)
Resizing eip The Prepaid eip can not be downgrade. This is an asynchronous interface.- 参数:
request- eip & newBandwidthInMbps must be provided
-
purchaseReservedEipInMonth
public void purchaseReservedEipInMonth(String eip, int reservationLength)
PurchaseReserved eip with specified duration in month- 参数:
eip-reservationLength-
-
purchaseReservedEip
public void purchaseReservedEip(String eip, int reservationLength, String reservationTimeUnit)
PurchaseReserved eip with fixed duration only Prepaid eip can do this- 参数:
eip- eip address to be renewedreservationLength- purchase lengthreservationTimeUnit- time unit of purchasing, optional parameter default value 'Month'
-
purchaseReservedEip
public void purchaseReservedEip(PurchaseReservedEipRequest request)
PurchaseReserved eip with fixed duration only Prepaid eip can do this This is an asynchronous interface- 参数:
request- The request containing all options for renewing eip with fixed duration.
-
bindEip
public void bindEip(String eip, String instanceId, String instanceType)
bind the eip to a specified instanceId and instanceType(BCC|BLB).- 参数:
eip- eip address to be boundinstanceId- id of instance to be boundinstanceType- type of instance to be bound
-
bindEip
public void bindEip(BindEipRequest request)
bind the eip to a specified instanceId and instanceType(BCC|BLB). the status of eip must be available and thd instance not be expired or boundByEip- 参数:
request- The request containing all options for binding eip
-
unbindEip
public void unbindEip(String eip)
unbind the eip from a specified instance- 参数:
eip- eip address to be unbound
-
unbindEip
public void unbindEip(UnbindEipRequest request)
unbind the eip from a specified instance- 参数:
request- The request containing all options for unbinding eip
-
releaseEip
public void releaseEip(String eip)
release the eip(delete operation)- 参数:
eip- eip address to be released
-
releaseEip
public void releaseEip(ReleaseEipRequest request)
release the eip(delete operation) Only the Postpaid instance or Prepaid which is expired can be released. if the eip has been bound, must unbind before releasing- 参数:
request- The request containing all options for releasing eip
-
listEips
public ListEipsResponse listEips()
get a list of eips owned by the authenticated user and default conditions- 返回:
-
listEips
public ListEipsResponse listEips(ListEipsRequest request)
get a list of eips owned by the authenticated user and specified conditions we can Also get a single eip function through this interface by eip condition if query by the instanceId or instanceType condition, must provides both of them at the same time- 参数:
request- The request containing all options for query- 返回:
-
fillPayload
protected void fillPayload(InternalRequest internalRequest, AbstractBceRequest bceRequest)
the method to fill the internalRequest's content field with bceRequest only support HttpMethodName.POST or HttpMethodName.PUT- 参数:
internalRequest- A request object, populated with endpoint, resource path, ready for callers to populate any additional headers or parameters, and execute.bceRequest- The original request, as created by the user.
-
-