Service Release Point
Create a service distribution point
Create a service distribution point
Create a service distribution point with the following code
Function declaration
1func (c *Client) CreateUserService(args *CreateUserServiceArgs) (*CreateUserServiceResult, error)
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_userservice.go
Update service distribution point
Update service distribution point
Update a service distribution point with the following code
Function declaration
1func (c *Client) UpdateUserService(service string, args *UpdateServiceArgs) error
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_userservice.go
Bind service distribution point to instance
Bind service distribution point to instance
Bind service distribution point to instance with the following code
Function declaration
1func (c *Client) UserServiceBindInstance(service string, args *UserServiceBindArgs) error
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_userservice_bind_instance.go
Unbind service distribution point from service
Unbind service distribution point from service
Unbind service distribution point with the following code
Function declaration
1func (c *Client) UserServiceUnBindInstance(service string, args *UserServiceUnBindArgs) error
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_userservice_unbind_instance.go
Add authentication information of service distribution point
Add authentication information of service distribution point
You can add the authentication information of service distribution point with the following code
Function declaration
1func (c *Client) UserServiceAddAuth(service string, args *UserServiceAuthArgs) error
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_userservice_add_auth.go
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
1func (c *Client) UserServiceEditAuth(service string, args *UserServiceAuthArgs) error
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_userservice_edit_auth.go
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
1func (c *Client) UserServiceRemoveAuth(service string, args *UserServiceRemoveAuthArgs) error
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_userservice_remove_auth.go
Query service distribution list.
Query service distribution list.
Query service distribution list using the following codes
Function declaration
1func (c *Client) DescribeUserServices(args *DescribeUserServicesArgs) (*DescribeUserServicesResult, error)
Parameter Meaning
Refer to the OpenAPI documentation: Query Service distribution 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
32 }
33 ]
34}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_describe_userservices.go
Query service distribution details
Query service distribution details
Query service distribution details using the following codes
Function declaration
1func (c *Client) DescribeUserServiceDetail(service string) (*DescribeUserServiceDetailResult, error)
Parameter Meaning
Refer to OpenAPI documentation: Query Service Distribution 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 ],
19 "authList": [
20 {
21 "uid": "*",
22 "auth" : "allow"
23 }
24 ]
25}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_describe_userservice_detail.go
Delete service distribution point
Delete service distribution point
Delete a service distribution point with the following code
Function declaration
1func (c *Client) DeleteUserService(service string) error
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_userservice.go
