全部产品
云市场

媒体审核

更新时间:2019-01-24 12:38:51

初始化客户端

使用前请先初始化客户端,参考 InitVodClient 接口。

提交智能审核作业

接口参数和返回字段请参考 SubmitAIMediaAuditJob

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace Aliyun.Acs.vod.Sdk.SubmitAIMediaAuditJob
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. SubmitAIMediaAuditJobResponse response = SubmitAIMediaAuditJob(client);
  22. Console.WriteLine("RequestId = " + response.RequestId);
  23. }
  24. catch (ServerException e)
  25. {
  26. if (e.RequestId != null)
  27. {
  28. Console.WriteLine("RequestId = " + e.RequestId);
  29. }
  30. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  31. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  32. }
  33. catch (ClientException e)
  34. {
  35. if (e.RequestId != null)
  36. {
  37. Console.WriteLine("RequestId = " + e.RequestId);
  38. }
  39. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  40. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  41. }
  42. catch (Exception e)
  43. {
  44. Console.WriteLine("ErrorMessage = " + e.ToString());
  45. }
  46. }
  47. /// <summary>
  48. /// 提交智能审核作业
  49. /// </summary>
  50. /// <param name="client">Client.</param>
  51. /// <summary>
  52. /// 提交智能审核作业.
  53. /// </summary>
  54. /// <returns>智能审核作业.</returns>
  55. /// <param name="client">Client.</param>
  56. public static SubmitAIMediaAuditJobResponse SubmitAIMediaAuditJob(DefaultAcsClient client)
  57. {
  58. // 构造请求
  59. SubmitAIMediaAuditJobRequest request = new SubmitAIMediaAuditJobRequest();
  60. // 设置视频ID
  61. request.MediaId = "dc063078c1d845139e2a5bd8ffxxxxxx";
  62. // 返回结果
  63. return client.GetAcsResponse(request);
  64. }
  65. }
  66. }

查询智能审核作业

接口参数和返回字段请参考 GetAIMediaAuditJob

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace Aliyun.Acs.vod.Sdk.GetAIMediaAuditJob
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. GetAIMediaAuditJobResponse response = GetAIMediaAuditJob(client);
  22. // 打印请求ID
  23. Console.WriteLine("RequestId = " + response.RequestId);
  24. // 打印结果信息
  25. Console.WriteLine("MediaId = " + response.MediaAuditJob.MediaId);
  26. Console.WriteLine("JobId = " + response.MediaAuditJob.JobId);
  27. Console.WriteLine("Type = " + response.MediaAuditJob.Type);
  28. Console.WriteLine("Status = " + response.MediaAuditJob.Status);
  29. Console.WriteLine("Code = " + response.MediaAuditJob.Code);
  30. Console.WriteLine("Message = " + response.MediaAuditJob.Message);
  31. Console.WriteLine("Data AbnormalModules = " + response.MediaAuditJob.Data.AbnormalModules);
  32. Console.WriteLine("Data Label = " + response.MediaAuditJob.Data.Label);
  33. Console.WriteLine("Data Suggestion = " + response.MediaAuditJob.Data.Suggestion);
  34. }
  35. catch (ServerException e)
  36. {
  37. if (e.RequestId != null)
  38. {
  39. Console.WriteLine("RequestId = " + e.RequestId);
  40. }
  41. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  42. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  43. }
  44. catch (ClientException e)
  45. {
  46. if (e.RequestId != null)
  47. {
  48. Console.WriteLine("RequestId = " + e.RequestId);
  49. }
  50. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  51. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  52. }
  53. catch (Exception e)
  54. {
  55. Console.WriteLine("ErrorMessage = " + e.ToString());
  56. }
  57. }
  58. /// <summary>
  59. /// 查询智能审核作业.
  60. /// </summary>
  61. /// <returns>智能审核作业.</returns>
  62. /// <param name="client">Client.</param>
  63. public static GetAIMediaAuditJobResponse GetAIMediaAuditJob(DefaultAcsClient client)
  64. {
  65. // 构造请求
  66. GetAIMediaAuditJobRequest request = new GetAIMediaAuditJobRequest();
  67. // 设置作业ID
  68. request.JobId = "7dc69b893c8b4f13b47aae8de0xxxxxx";
  69. // 返回结果
  70. return client.GetAcsResponse(request);
  71. }
  72. }
  73. }

获取智能审核结果摘要

接口参数和返回字段请参考 GetMediaAuditResult

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace Aliyun.Acs.vod.Sdk.GetMediaAuditResult
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. GetMediaAuditResultResponse response = GetMediaAuditResult(client);
  22. // 打印请求ID
  23. Console.WriteLine("RequestId = " + response.RequestId);
  24. // 打印结果信息
  25. Console.WriteLine("Data AbnormalModules = " + response.MediaAuditResult.AbnormalModules);
  26. Console.WriteLine("Data Label = " + response.MediaAuditResult.Label);
  27. Console.WriteLine("Data Suggestion = " + response.MediaAuditResult.Suggestion);
  28. }
  29. catch (ServerException e)
  30. {
  31. if (e.RequestId != null)
  32. {
  33. Console.WriteLine("RequestId = " + e.RequestId);
  34. }
  35. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  36. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  37. }
  38. catch (ClientException e)
  39. {
  40. if (e.RequestId != null)
  41. {
  42. Console.WriteLine("RequestId = " + e.RequestId);
  43. }
  44. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  45. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  46. }
  47. catch (Exception e)
  48. {
  49. Console.WriteLine("ErrorMessage = " + e.ToString());
  50. }
  51. }
  52. /// <summary>
  53. /// 获取智能审核结果摘要
  54. /// </summary>
  55. /// <returns>智能审核结果摘要</returns>
  56. /// <param name="client">Client.</param>
  57. public static GetMediaAuditResultResponse GetMediaAuditResult(DefaultAcsClient client)
  58. {
  59. // 构造请求
  60. GetMediaAuditResultRequest request = new GetMediaAuditResultRequest();
  61. // 设置视频ID
  62. request.MediaId = "7dc69b893c8b4f13b47aae8de0xxxxxx";
  63. // 返回结果
  64. return client.GetAcsResponse(request);
  65. }
  66. }
  67. }

获取智能审核结果详情

接口参数和返回字段请参考 GetMediaAuditResultDetail

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace Aliyun.Acs.vod.Sdk.GetMediaAuditResultDetail
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. GetMediaAuditResultDetailResponse response = GetMediaAuditResultDetail(client);
  22. // 打印请求ID
  23. Console.WriteLine("RequestId = " + response.RequestId);
  24. // 打印结果信息
  25. Console.WriteLine("Data Total = " + response.MediaAuditResultDetail.Total);
  26. Console.WriteLine("Data List Size = " + response.MediaAuditResultDetail.List.Count);
  27. }
  28. catch (ServerException e)
  29. {
  30. if (e.RequestId != null)
  31. {
  32. Console.WriteLine("RequestId = " + e.RequestId);
  33. }
  34. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  35. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  36. }
  37. catch (ClientException e)
  38. {
  39. if (e.RequestId != null)
  40. {
  41. Console.WriteLine("RequestId = " + e.RequestId);
  42. }
  43. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  44. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  45. }
  46. catch (Exception e)
  47. {
  48. Console.WriteLine("ErrorMessage = " + e.ToString());
  49. }
  50. }
  51. /// <summary>
  52. /// 获取智能审核结果详情
  53. /// </summary>
  54. /// <returns>智能审核结果详情</returns>
  55. /// <param name="client">Client.</param>
  56. public static GetMediaAuditResultDetailResponse GetMediaAuditResultDetail(DefaultAcsClient client)
  57. {
  58. // 构造请求
  59. GetMediaAuditResultDetailRequest request = new GetMediaAuditResultDetailRequest();
  60. // 设置视频ID
  61. request.MediaId = "7dc69b893c8b4f13b47aae8de0xxxxxx";
  62. // 设置翻页页数
  63. request.PageNo = 1;
  64. // 返回结果
  65. return client.GetAcsResponse(request);
  66. }
  67. }
  68. }

获取智能审核结果时间线

接口参数和返回字段请参考 GetMediaAuditResultTimeline

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace Aliyun.Acs.vod.Sdk.GetMediaAuditResultTimeline
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>","<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. GetMediaAuditResultTimelineResponse response = GetMediaAuditResultTimeline(client);
  22. // 打印请求ID
  23. Console.WriteLine("RequestId = " + response.RequestId);
  24. // 打印结果信息
  25. Console.WriteLine("Terrorism = " + response.MediaAuditResultTimeline.Terrorism);
  26. Console.WriteLine("Porn = " + response.MediaAuditResultTimeline.Porn);
  27. }
  28. catch (ServerException e)
  29. {
  30. if (e.RequestId != null)
  31. {
  32. Console.WriteLine("RequestId = " + e.RequestId);
  33. }
  34. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  35. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  36. }
  37. catch (ClientException e)
  38. {
  39. if (e.RequestId != null)
  40. {
  41. Console.WriteLine("RequestId = " + e.RequestId);
  42. }
  43. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  44. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  45. }
  46. catch (Exception e)
  47. {
  48. Console.WriteLine("ErrorMessage = " + e.ToString());
  49. }
  50. }
  51. /// <summary>
  52. /// 获取智能审核结果时间线
  53. /// </summary>
  54. /// <returns>智能审核结果时间线</returns>
  55. /// <param name="client">Client.</param>
  56. public static GetMediaAuditResultTimelineResponse GetMediaAuditResultTimeline(DefaultAcsClient client)
  57. {
  58. // 构造请求
  59. GetMediaAuditResultTimelineRequest request = new GetMediaAuditResultTimelineRequest();
  60. // 设置视频ID
  61. request.MediaId = "7dc69b893c8b4f13b47aae8de0xxxxxx";
  62. // 返回结果
  63. return client.GetAcsResponse(request);
  64. }
  65. }
  66. }

人工审核

接口参数和返回字段请参考 CreateAudit

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.vod.Model.V20170321;
  5. using Newtonsoft.Json.Linq;
  6. namespace Aliyun.Acs.vod.Sdk.CreateAudit
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. CreateAuditResponse response = CreateAudit(client);
  22. Console.WriteLine("RequestId = " + response.RequestId);
  23. }
  24. catch (ServerException e)
  25. {
  26. if (e.RequestId != null)
  27. {
  28. Console.WriteLine("RequestId = " + e.RequestId);
  29. }
  30. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  31. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  32. }
  33. catch (ClientException e)
  34. {
  35. if (e.RequestId != null)
  36. {
  37. Console.WriteLine("RequestId = " + e.RequestId);
  38. }
  39. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  40. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  41. }
  42. catch (Exception e)
  43. {
  44. Console.WriteLine("ErrorMessage = " + e.ToString());
  45. }
  46. }
  47. /// <summary>
  48. /// Creates the audit.
  49. /// </summary>
  50. /// <returns>The audit.</returns>
  51. /// <param name="client">Client.</param>
  52. public static CreateAuditResponse CreateAudit(DefaultAcsClient client)
  53. {
  54. CreateAuditRequest request = new CreateAuditRequest();
  55. // set audit content
  56. request.AuditContent = BuildAuditContent();
  57. return client.GetAcsResponse(request);
  58. }
  59. /// <summary>
  60. /// Builds the content of the audit.
  61. /// </summary>
  62. /// <returns>The audit content.</returns>
  63. public static string BuildAuditContent()
  64. {
  65. JArray auditContents = new JArray();
  66. JObject auditContent = new JObject();
  67. auditContent.Add("VideoId", "3ebc10160bda481ca9b6858a0bxxxxxx");
  68. auditContent.Add("Status", "Blocked");
  69. auditContent.Add("Reason", "含有淫秽色情内容");
  70. return auditContents.ToString();
  71. }
  72. }
  73. }

获取人工审核历史

接口参数和返回字段请参考 GetAuditHistory

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace Aliyun.Acs.vod.Sdk.GetAuditHistory
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. GetAuditHistoryResponse response = GetAuditHistory(client);
  22. Console.WriteLine("RequestId = " + response.RequestId);
  23. // 最新审核结果
  24. Console.WriteLine("Status = " + response.Status);
  25. // 审核历史记录数
  26. Console.WriteLine("Total = " + response.Total);
  27. if (response.Histories != null && response.Histories.Count > 0)
  28. {
  29. foreach (GetAuditHistoryResponse.GetAuditHistory_History history in response.Histories) {
  30. Console.WriteLine("Status = " + history.Status);
  31. Console.WriteLine("CreationTime = " + history.CreationTime);
  32. Console.WriteLine("Reason = " + history.Reason);
  33. }
  34. }
  35. }
  36. catch (ServerException e)
  37. {
  38. if (e.RequestId != null)
  39. {
  40. Console.WriteLine("RequestId = " + e.RequestId);
  41. }
  42. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  43. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  44. }
  45. catch (ClientException e)
  46. {
  47. if (e.RequestId != null)
  48. {
  49. Console.WriteLine("RequestId = " + e.RequestId);
  50. }
  51. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  52. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  53. }
  54. catch (Exception e)
  55. {
  56. Console.WriteLine("ErrorMessage = " + e.ToString());
  57. }
  58. }
  59. /// <summary>
  60. /// Gets the audit history.
  61. /// </summary>
  62. /// <returns>The audit history.</returns>
  63. /// <param name="client">Client.</param>
  64. public static GetAuditHistoryResponse GetAuditHistory(DefaultAcsClient client) {
  65. // 构造请求
  66. GetAuditHistoryRequest request = new GetAuditHistoryRequest();
  67. request.VideoId = "VideoId";
  68. request.PageNo = 1;
  69. request.PageSize = 10;
  70. return client.GetAcsResponse(request);
  71. }
  72. }
  73. }

设置审核安全IP

接口参数和返回字段请参考 SetAuditSecurityIp

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.vod.Model.V20170321;
  5. namespace Aliyun.Acs.vod.Sdk.SetAuditSecurityIp
  6. {
  7. class MainClass
  8. {
  9. /// <summary>
  10. /// 主函数
  11. /// </summary>
  12. /// <param name="args">The command-line arguments.</param>
  13. public static void Main(string[] args)
  14. {
  15. try
  16. {
  17. // 初始化客户端
  18. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  19. SetAuditSecurityIpResponse response = SetAuditSecurityIp(client);
  20. Console.WriteLine("RequestId = " + response.RequestId);
  21. }
  22. catch (ServerException e)
  23. {
  24. if (e.RequestId != null)
  25. {
  26. Console.WriteLine("RequestId = " + e.RequestId);
  27. }
  28. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  29. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  30. }
  31. catch (ClientException e)
  32. {
  33. if (e.RequestId != null)
  34. {
  35. Console.WriteLine("RequestId = " + e.RequestId);
  36. }
  37. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  38. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  39. }
  40. catch (Exception e)
  41. {
  42. Console.WriteLine("ErrorMessage = " + e.ToString());
  43. }
  44. }
  45. /// <summary>
  46. /// Sets the audit security ip.
  47. /// </summary>
  48. /// <returns>The audit security ip.</returns>
  49. /// <param name="client">Client.</param>
  50. public static SetAuditSecurityIpResponse SetAuditSecurityIp (DefaultAcsClient client)
  51. {
  52. // 构造请求
  53. SetAuditSecurityIpRequest request = new SetAuditSecurityIpRequest();
  54. // 审核安全组名称,默认为Default
  55. request.SecurityGroupName = "MyGroupName";
  56. // 操作方式,默认值Append(追加IP白名单)
  57. request.OperateMode = "Cover";
  58. // 审核安全IP列表
  59. request.Ips = "10.23.12.20,10.23.12.21,10.23.12.22";
  60. return client.GetAcsResponse(request);
  61. }
  62. }
  63. }

获取审核安全IP列表

接口参数和返回字段请参考 ListAuditSecurityIp

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.vod.Model.V20170321;
  5. namespace Aliyun.Acs.vod.Sdk.ListAuditSecurityIp
  6. {
  7. class MainClass
  8. {
  9. /// <summary>
  10. /// The entry point of the program, where the program control starts and ends.
  11. /// </summary>
  12. /// <param name="args">The command-line arguments.</param>
  13. public static void Main(string[] args)
  14. {
  15. try
  16. {
  17. // 初始化客户端
  18. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  19. // 发起请求,并得到 response
  20. ListAuditSecurityIpResponse response = ListAuditSecurityIp(client);
  21. Console.WriteLine("RequestId = " + response.RequestId);
  22. if (response.SecurityIpList != null && response.SecurityIpList.Count > 0)
  23. {
  24. foreach (ListAuditSecurityIpResponse.ListAuditSecurityIp_SecurityIp securityIp in response.SecurityIpList)
  25. {
  26. Console.WriteLine("SecurityGroupName = " + securityIp.SecurityGroupName);
  27. Console.WriteLine("Ips = " + securityIp.Ips);
  28. Console.WriteLine("CreationTime = " + securityIp.CreationTime);
  29. }
  30. }
  31. }
  32. catch (ServerException e)
  33. {
  34. if (e.RequestId != null)
  35. {
  36. Console.WriteLine("RequestId = " + e.RequestId);
  37. }
  38. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  39. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  40. }
  41. catch (ClientException e)
  42. {
  43. if (e.RequestId != null)
  44. {
  45. Console.WriteLine("RequestId = " + e.RequestId);
  46. }
  47. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  48. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  49. }
  50. catch (Exception e)
  51. {
  52. Console.WriteLine("ErrorMessage = " + e.ToString());
  53. }
  54. }
  55. /// <summary>
  56. /// Lists the audit security ip.
  57. /// </summary>
  58. /// <returns>The audit security ip.</returns>
  59. /// <param name="client">Client.</param>
  60. public static ListAuditSecurityIpResponse ListAuditSecurityIp(DefaultAcsClient client)
  61. {
  62. // 构造请求
  63. ListAuditSecurityIpRequest request = new ListAuditSecurityIpRequest();
  64. // 审核安全组名称
  65. request.SecurityGroupName = "MyGroupName";
  66. return client.GetAcsResponse(request);
  67. }
  68. }
  69. }