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
| Name | Type | Required | Example | Description |
| Action | String | Yes | ProductBindBsn | The name of the operation. This is a required parameter. Set the value to ProductBindBsn. |
| resourceType | Integer | Yes | 1 | The type of the cloud product for which you want to generate a service identification number. Valid values:
|
| resourceId | String | Yes | 41****34 | The ID of the cloud product instance to which the new service identification number is attached. |
| aliuid | Long | Yes | 456*******163 | The ID of the Alibaba Cloud account that owns the cloud product instance. |
| num | Integer | Yes | 4 | The number of service identification numbers to generate in a single call. The maximum value is 20. |
Response parameters
| Name | Type | Description |
| datas | List<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. |
| Name | Type | Example | Description |
| aliUid | Long | 456*******163 | The ID of the Alibaba Cloud account that owns the cloud product instance attached to the service identification number. |
| resourceType | Integer | 1 | The type of the cloud product attached to the service identification number.
|
| resourceId | String | ATX140*******c6f | The ID of the cloud product instance attached to the service identification number. |
| sn | String | 4f9f0d9c-*******69448375e0f8 | The service identification number. One service identification number can be used to submit one website ICP filing on the Alibaba Cloud ICP filing platform. |
| status | Integer | 1 | The status of the service identification number:
|
| beianNum | String | - | 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. |
| opSource | Integer | 2 | Always 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
| HttpCode | Error code | Error message |
| 400 | 401 | Invalid account ID. |
| 400 | 402 | Invalid instance. |
| 400 | 403 | The current instance does not have an IP address that can be used for ICP filing. |
| 400 | 409 | The UID does not belong to the BID of the current operation. Attachment failed. |
| 400 | 410 | A service identification number cannot be attached to a trial product. |
| 400 | 411 | A service identification number cannot be attached to this product type. |
| 400 | 412 | The account for attachment is not the instance owner. |
| 400 | 413 | The current instance status is not suitable for ICP filing. |
| 400 | 414 | The cumulative usage duration of this instance is less than 3 months. A service identification number cannot be requested. |
| 400 | 415 | The UID does not belong to the MPK of the current operation. Attachment failed. |
| 400 | 504 | Operation failed. |
| 400 | 507 | API error. |
| 400 | 509 | An error occurred while querying instance information. Try again later. |
| 400 | 511 | An error occurred while reading data. Try again later. |
| 400 | 602 | Required parameters cannot be empty. |
| 400 | 603 | The number of service identification numbers is limited to 1 to 20 per request. |
| 400 | 609 | The 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>Is this page helpful?