ProductBindBsn

Updated at:
Copy as MD

Generates a service identification number.

This operation generates a service identification number based on the specified account, cloud product type, and instance ID. The number of service identification numbers that can be generated for each instance cannot exceed the limit confirmed in the business agreement.

  • A service identification number can be generated only for a cloud product instance that is running.
  • A service identification number cannot be generated for a cloud product that does not have a public IP address. These products do not require an ICP filing.
  • Partners cannot generate a service identification number for cloud products that use the partners' own IP addresses.

Request parameters

NameTypeRequiredExampleDescription
ActionStringYesProductBindBsnThe name of the operation. This is a required parameter. Set the value to ProductBindBsn.
resourceTypeIntegerYes1

The type of the cloud product for which you want to generate a service identification number. Valid values:

  • 1: ECS
  • 2: SLB
  • 3: ACE
  • 4: Alibaba Cloud Marketplace
  • 5: WEBAPP
  • 6: NAT
  • 7: NAT64
  • 8: ENS
  • 9: Cloud Web Hosting
resourceIdStringYes41****34The ID of the cloud product instance to which the new service identification number is attached.
aliuidLongYes456*******163The ID of the Alibaba Cloud account that owns the cloud product instance.
numIntegerYes4The number of service identification numbers to generate in a single call. The maximum value is 20.

Response parameters

NameTypeDescription
datasList<BsnPopDO>A list of new service identification numbers generated and attached to the specified account and instance. A number with the Attached status can be used to submit an ICP filing on the ICP filing platform. The list contains BSN objects. For more information, see BSN object list.
Table 1. BSN object list
NameTypeExampleDescription
aliUidLong456*******163The ID of the Alibaba Cloud account that owns the cloud product instance attached to the service identification number.
resourceTypeInteger1

The type of the cloud product attached to the service identification number.

  • 1: ECS
  • 2: SLB
  • 3: ACE
  • 4: Alibaba Cloud Marketplace
  • 5: WEBAPP
  • 6: NAT
  • 7: NAT64
  • 8: ENS
  • 9: Cloud Web Hosting
resourceIdStringATX140*******c6fThe ID of the cloud product instance attached to the service identification number.
snString4f9f0d9c-*******69448375e0f8The service identification number. One service identification number can be used to submit one website ICP filing on the Alibaba Cloud ICP filing platform.
statusInteger1The status of the service identification number:
  • 0: Not attached. The service identification number is not yet attached to a product instance.
  • 1: Attached. The service identification number is attached to a product instance. It can be used to submit an ICP filing. An attached service identification number cannot be detached.
  • 2: Filed. The ICP filing submitted with this service identification number is complete.
  • 3: Invalid. The service identification number is voided for administrative reasons.
  • 4: Filing. An ICP filing request has been submitted with this service identification number and is under review.
beianNumString-The website ICP filing number issued by the Ministry of Industry and Information Technology (MIIT) after the ICP filing is successful. This parameter is empty if the filing is not successful.
opSourceInteger2Always 2. This parameter can be ignored.

Request example

https://bsn.aliyuncs.com/?Action=ProductBindBsn
&resourceType=1
&resourceId=412***634
&aliuid=456*******163
&num=4
&<Common request parameters>

Response examples

XML format

<GetBsnByResourceResponse>
  <datas>
    <bsnDO>
      <beianNum></beianNum>
      <resourceId>ATX140519190523990c6f</resourceId>
      <sn>4f9f0d9c-cc50-4eaf-a116-69448375e0f8</sn>
      <status>1</status>
      <aliUid>137828743593****</aliUid>
      <opSource>2</opSource>
      <resourceType>1</resourceType>
    </bsnDO>
    <bsnDO>
      <beianNum></beianNum>
      <resourceId>ATX140519190523990c6f</resourceId>
      <sn>49d744b0-8b0a-4c93-b2b4-0e47d9d661b1</sn>
      <status>1</status>
      <aliUid>137828743593****</aliUid>
      <opSource>2</opSource>
      <resourceType>1</resourceType>
    </bsnDO>
    <bsnDO>
      <beianNum></beianNum>
      <resourceId>ATX140519190523990c6f</resourceId>
      <sn>4867de58-9d37-11e3-91d8-a4badb4d407b</sn>
      <status>1</status>
      <aliUid>137828743593****</aliUid>
      <opSource>2</opSource>
      <resourceType>1</resourceType>
    </bsnDO>
  </datas>
</GetBsnByResourceResponse>

JSON format

{
  "datas": {
  "bsnDO": [
   {
     "resourceId": "ATX140519190523990c6f",
     "sn": "4f9f0d9c-cc50-4eaf-a116-69448375e0f8", "status": "1",
     "aliUid": "137828743593****",
     "opSource": "2",
     "resourceType": "1"
   },
   {
     "resourceId": "ATX140519190523990c6f",
     "sn": "49d744b0-8b0a-4c93-b2b4-0e47d9d661b1",
     "status": "1",
     "aliUid": "137828743593****",
     "opSource": "2",
     "resourceType": "1"
   },
   {
     "resourceId": "ATX140519190523990c6f",
     "sn": "4867de58-9d37-11e3-91d8-a4badb4d407b", "status": "1",
     "aliUid": "137828743593****",
     "opSource": "2",
     "resourceType": "1"
   }
  ]
 }
}

Error codes

HttpCodeError codeError message
400401Invalid account ID.
400402Invalid instance.
400403The current instance does not have an IP address that can be used for ICP filing.
400409The UID does not belong to the BID of the current operation. Attachment failed.
400410A service identification number cannot be attached to a trial product.
400411A service identification number cannot be attached to this product type.
400412The account for attachment is not the instance owner.
400413The current instance status is not suitable for ICP filing.
400414The cumulative usage duration of this instance is less than 3 months. A service identification number cannot be requested.
400415The UID does not belong to the MPK of the current operation. Attachment failed.
400504Operation failed.
400507API error.
400509An error occurred while querying instance information. Try again later.
400511An error occurred while reading data. Try again later.
400602Required parameters cannot be empty.
400603The number of service identification numbers is limited to 1 to 20 per request.
400609The maximum number of service identification numbers has been attached to this instance.

Add Java Maven dependencies

<dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-beian</artifactId>
    <version>2.0.11</version>
</dependency>

<dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-core</artifactId>
    <version>4.4.7</version> 
</dependency>