Service Release Point
Create a service distribution point
Create a service distribution point
Create a service distribution point with the following code
Function declaration
1 def create_user_service(self, name, desc, serviceName,
2 instanceId, client_token=None,
3 authList=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: Create Service Distribution Point
Response Value
Operation succeeded:
1{
2"service": "xxx.baidubce.com"
3}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_create_user_service.py
Update service distribution point
Update service distribution point. The name and description shall not be empty at the same time.
Update a service distribution point with the following code
Function declaration
1 def update_user_service(self, name=None, desc=None, service=None,
2 client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: Update Service Distribution Point
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_update_user_service.py
Bind service distribution point to instance
Bind service distribution point to service
Bind service distribution point to instance with the following code
Function declaration
1 def user_service_bind_instance(self, instanceId, service,
2 client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: Bind Service Distribution Point to Instance
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_user_service_bind_instance.py
Unbind service distribution point from instance
Unbind service distribution point from service
Unbind service distribution point from instance with the following code
Function declaration
1 def user_service_unbind_instance(self, service,
2 client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: Unbind Service Distribution Point
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_user_service_unbind_instance.py
Add authentication information of service distribution point
Add authentication information of service distribution point. If the user authorization is available, overwrite previous authorization.
You can add the authentication information of service distribution point with the following code
Function declaration
1 def user_service_add_auth(self, service,
2 authList, client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: Add Authentication Information of Service Distribution Point
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_user_service_add_auth.py
Modify authentication information of service distribution point
Modify authentication information of service distribution point
You can modify the authentication information of service distribution point with the following code
Function declaration
1 def user_service_edit_auth(self, service,
2 authList, client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: Modify Authentication Information of Service Distribution Point
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_user_service_edit_auth.py
Delete authentication information of service distribution point
Delete authentication information of service distribution point
You can delete the authentication information of service distribution point with the following code
Function declaration
1 def user_service_remove_auth(self, service,
2 uidList, client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: Delete Authentication Information of Service Distribution Point
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_user_service_remove_auth.py
Query service distribution point list
Query the service distribution point list.
You can query service distribution point list with the following code
Function declaration
1 def get_user_service_list(self, marker=None,
2 maxKeys=None, client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: Query Service Distribution Point List
Response Value
Operation succeeded:
1{
2"nextMarker": "uservice-a223vc",
3"marker": "uservice-a032va",
4"maxKeys": 1,
5"isTruncated": true,
6"services": [
7{
8"serviceId': "uservice-a223vc",
9"name": "name",
10"description": "",
11"serviceName": "serviceName",
12"bindType": "blb",
13"instanceId": "lb-d3e2cf75",
14"status": "inService",
15"service": "xxx.baidubce.com",
16"createTime": "2019-03-07T02:35:31Z",
17"endpointCount": 1,
18"endpointList": [
19{
20"endpointId': "endpoint-a223vc",
21"uid': "e8deba4d81d3435bb4591ce97288f296",
22"attachTime': "2019-03-07T02:35:31Z",
23}
24],
25"authList": [
26{
27"uid": "*",
28"auth" : "allow"
29}]
30}]
31}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_get_user_service_list.py
Query service distribution point details
Query service distribution point details
You can query service distribution point details with the following code
Function declaration
1 def get_user_service_detail(self, service,
2 client_token=None, config=None)
Parameter Meaning
Refer to OpenAPI documentation: Query Service Distribution Point Details
Response Value
Operation succeeded:
1{
2"serviceId': "uservice-a223vc",
3"name": "name",
4"description": "",
5"serviceName": "serviceName",
6"bindType": "blb",
7"instanceId": "lb-d3e2cf75",
8"status": "inService",
9"service": "xxx.baidubce.com",
10"createTime": "2019-03-07T02:35:31Z",
11"endpointCount": 1,
12"endpointList": [
13{
14"endpointId': "endpoint-a223vc",
15"uid': "e8deba4d81d3435bb4591ce97288f296",
16"attachTime': "2019-03-07T02:35:31Z",
17}],
18"authList": [
19{
20"uid": "*",
21"auth" : "allow"
22}]
23}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_get_user_service_detail.py
Delete service distribution point
Delete service distribution point
Delete a service distribution point with the following code
Function declaration
1 def delete_user_service(self, service,
2 client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: Delete Service Distribution Point
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_delete_user_service.py
