Initializing a DIS SDK Client Instance
You can use either of the following methods to initialize the DIS SDK client instance: For details about endpoint, ak, sk, region, and projectId, see Obtaining Authentication Information.
- Use codes to initialize the DIS SDK client instance. The code example is as follows:
//Create a DIS SDK client instance. DISConfig disConfig = new DISConfig(); disConfig.SetEndpoint("https://ip:port"); disConfig.SetAK("xxxx"); disConfig.SetSK("xxxx"); disConfig.SetProjectId("xxxxxxx"); disConfig.SetRegion("XXX"); DISIngestionClient dic = new DISIngestionClient(disConfig); - Use the configuration file to initialize the DIS SDK client instance.
Add the following configuration items to the dis.propertites file in the $project path\bin\Debug directory:
- ak/sk: AK/SK created on the IAM.
- region: area where the stream is used.
- endpoint: access address of the DIS.
- projectId: project ID of the stream.
//Create a DIS SDK client instance. DISIngestionClient dic = new DISIngestionClient();
Last Article: Configuring a Sample Project
Next Article: Creating a Stream
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.