GetBsnByResource

Updated at:
Copy as MD

You can call GetBsnByResource to query information about all service identification numbers attached to a cloud product instance.

Request parameters

NameTypeRequiredExampleDescription
ActionStringYesGetBsnByResource

The name of the operation. This is a required parameter. Set the value to GetBsnByResource.

resourceTypeIntegerYes1

The type of the cloud product. Valid values:

  • 1: ECS
  • 2: SLB
  • 3: ACE
  • 4: Alibaba Cloud Marketplace
  • 5: WEBAPP
  • 6: NAT
  • 7: NAT64
  • 8: ENS
  • 9: Cloud Web Hosting
resourceIdStringYes4123fsd634The ID of the cloud product instance.
aliuidLongYes456*******163The Alibaba Cloud account ID of the instance owner.

Response parameters

NameTypeDescription
datasList<BsnPopDO>

A list of service identification numbers attached to the specified instance. For more information about the bsnDO object, see the following table.

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=GetBsnByResource 
&resourceType =1
& resourceId=4123fsd634
&aliuid=456*******163
&<Common request parameters>

Response examples

XML format

<GetBsnByResourceResponse>
   <datas>
      <bsnDO>
        <beianNum></beianNum>
        <resourceId>ATX140519190523990c6f</resourceId>
        <sn>4f9f0d********448375e0f8</sn>
        <status>1</status>
        <aliUid>137*******210</aliUid>
        <opSource>2</opSource>
        <resourceType>1</resourceType>
      </bsnDO>
   </datas>
</GetBsnByResourceResponse>

JSON format

{
   "datas": {
      "bsnDO": [
        {
          "resourceId":"ATX140519190523990c6f",
          "sn":"4f9f0d********448375e0f8", 
          "status":"1",
          "aliUid":"137*******210",
          "opSource": "2",
          "resourceType": "1"
         },
        {
          "resourceId":"ATX140519190523990c6f",
          "sn":"4f9f0d********448375e0f8",
          "status":"1",
          "aliUid":"137*******210",
          "opSource":"2",
          "resourceType":"1"
         }
       ]
    }
}
Note An error is returned if the specified cloud product instance does not belong to the specified account.

Error codes

HttpCodeError codeError message
400407The information does not exist.
400507An API error occurred.
400602A required parameter cannot be empty.