Search in sources :

Example 6 with UserInfo

use of com.tencentcloudapi.ess.v20201111.models.UserInfo in project tencentcloud-sdk-java by TencentCloud.

the class CreateSchemeUrl method main.

public static void main(String[] args) {
    try {
        EssClient client = ClientConfig.getClientByEndpoint(EndPoint);
        CreateSchemeUrlRequest request = new CreateSchemeUrlRequest();
        UserInfo userInfo = new UserInfo();
        // 管理员用户id或者员工用户id
        userInfo.setUserId(OperatorId);
        // 请求客户端在公网的ip地址
        userInfo.setClientIp("*********");
        request.setOperator(userInfo);
        // 由CreateFlow返回
        request.setFlowId("*********");
        request.setPathType(1L);
        CreateSchemeUrlResponse response = client.CreateSchemeUrl(request);
        System.out.println(client.gson.toJson(response));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : EssClient(com.tencentcloudapi.ess.v20201111.EssClient)

Example 7 with UserInfo

use of com.tencentcloudapi.ess.v20201111.models.UserInfo in project tencentcloud-sdk-java by TencentCloud.

the class DescribeFlowBriefs method main.

public static void main(String[] args) {
    try {
        EssClient client = ClientConfig.getClientByEndpoint(EndPoint);
        DescribeFlowBriefsRequest request = new DescribeFlowBriefsRequest();
        UserInfo userInfo = new UserInfo();
        // 管理员用户id或者员工用户id
        userInfo.setUserId(OperatorId);
        // 请求客户端在公网的ip地址
        userInfo.setClientIp("************");
        request.setOperator(userInfo);
        // 由CreateFlow返回
        request.setFlowIds(new String[] { "************" });
        DescribeFlowBriefsResponse response = client.DescribeFlowBriefs(request);
        System.out.println(client.gson.toJson(response));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : EssClient(com.tencentcloudapi.ess.v20201111.EssClient)

Aggregations

EssClient (com.tencentcloudapi.ess.v20201111.EssClient)7 GsonBuilder (com.google.gson.GsonBuilder)1 TencentCloudSDKException (com.tencentcloudapi.common.exception.TencentCloudSDKException)1 CreateFlowRequest (com.tencentcloudapi.ess.v20201111.models.CreateFlowRequest)1 CreateFlowResponse (com.tencentcloudapi.ess.v20201111.models.CreateFlowResponse)1 FlowCreateApprover (com.tencentcloudapi.ess.v20201111.models.FlowCreateApprover)1 UserInfo (com.tencentcloudapi.ess.v20201111.models.UserInfo)1