百度智能云

All Product Document

          Elastic IP

          EIP Instance

          Apply for EIP

          • Apply for an EIP, which can be used to bind to any BCC instance.
          • Identity Verification is required for creation of EIP, if you fail to pass identity verification, you can go to identity verification under security authentication in Baidu Open Cloud Console for authentication.
          def test_create_eip(eip_client, bandwidth_in_mbps, name, billing):
              response = eip_client.create_eip(bandwidth_in_mbps, name, billing)
              print response

          Capacity Expansion and Reduction of EIP Bandwidth

          • Used for the bandwidth capacity expansion and reduction of specified EIP.
          • Check whether EIP capacity expansion and reduction state is completed by querying EIP list.
          def test_resize_eip(eip_client, eip, new_bandwidth_in_mbps):
              response = eip_client.resize_eip(eip, new_bandwidth_in_mbps)
              print response
            

          Bind EIP

          • Bind EIP to an instance, and only BCC is supported currently.
          • Only the EIP in available state supports binding operation.
          • The bound instance cannot have any existing EIP binding relationship
          • The bound instance cannot be in arrearage state.
          def test_bind_eip(eip_client, eip, instance_type, instance_id):
              response = eip_client.bind_eip(eip, instance_type, instance_id)
              print response
            

          Unbind EIP

          • Unbind the specified EIP
          • The unbound EIP must have been bound to any instance.
          def test_unbind_eip(eip_client, eip):
              response = eip_client.unbind_eip(eip)
              print response  

          Release EIP

          • Release the specified EIP, and the released EIP cannot be recovered.
          • If EIP is bound to any instance, it can be released after unbinding.
          def test_release_eip(eip_client, eip):
              response = eip_client.release_eip(eip)
              print response  

          Query EIP List

          • EIP list can be queried according to multiple conditions.
          • If it is only needed to query the details of a single EIP, you only need to provide eip parameters.
          • If you only need to query the EIP bound to a specified instance, you only need to provide instanceType parameter.
          • If you only need to query the details of EIP bound to a specified instance, you only need to provide instanceType and instanceId parameter.
          • If no query condition is provided, the default query overwrites all EIPs.
          • The returned result is the query result of intersection of multiple conditions, i.e. when multiple conditions are provided, EIP 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.
          def test_list_eips(eip_client, eip, instance_type, instance_id, marker, max_keys):
              response = eip_client.list_eips(eip, instance_type, instance_id, marker, max_keys)
              print response  

          Renew EIP

          • For the renewal operation of specified EIP, extend the expiration time.
          • No renewal operation can be conducted during EIP capacity expansion and reduction.
          def test_purchase_reserved_eip(eip_client, eip, billing):
              response = eip_client.purchase_reserved_eip(eip, billing)
              print response  
          Previous
          Initialization
          Next
          EIPGroup Instance