URI 제출

Web Risk 클라이언트를 만들고 URI를 제출합니다.

코드 샘플

자바

public static Submission submitUriExample(String uri) throws IOException {
  // create-webrisk-client
  try (WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.create()) {
    Submission submission = Submission.newBuilder().setUri(uri).build();
    CreateSubmissionRequest submissionRequest =
        CreateSubmissionRequest.newBuilder()
            .setParent("projects/your-project-id")
            .setSubmission(submission)
            .build();
    Submission submissionResponse = webRiskServiceClient.createSubmission(submissionRequest);
    webRiskServiceClient.shutdownNow();
    System.out.println("The submitted " + submissionResponse);
    return submissionResponse;
  }
}

다음 단계

다른 Google Cloud 제품의 코드 샘플을 검색하고 필터링하려면 Google Cloud 샘플 브라우저를 참조하세요.