类 EipClient


  • public class EipClient
    extends AbstractBceClient
    Provides the client for accessing the Elastic Ip Service (EIP).
    • 构造器详细资料

      • 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 resized
        newBandwidthInMbps - 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 renewed
        reservationLength - purchase length
        reservationTimeUnit - 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 bound
        instanceId - id of instance to be bound
        instanceType - 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.