Seleziona le tue preferenze relative ai cookie

Utilizziamo cookie essenziali e strumenti simili necessari per fornire il nostro sito e i nostri servizi. Utilizziamo i cookie prestazionali per raccogliere statistiche anonime in modo da poter capire come i clienti utilizzano il nostro sito e apportare miglioramenti. I cookie essenziali non possono essere disattivati, ma puoi fare clic su \"Personalizza\" o \"Rifiuta\" per rifiutare i cookie prestazionali.

Se sei d'accordo, AWS e le terze parti approvate utilizzeranno i cookie anche per fornire utili funzionalità del sito, ricordare le tue preferenze e visualizzare contenuti pertinenti, inclusa la pubblicità pertinente. Per continuare senza accettare questi cookie, fai clic su \"Continua\" o \"Rifiuta\". Per effettuare scelte più dettagliate o saperne di più, fai clic su \"Personalizza\".

Utilizzare StartMatchingJob con un AWS SDK - AWS Esempi di codice SDK

Sono disponibili altri esempi AWS SDK nel repository AWS Doc SDK Examples. GitHub

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

Sono disponibili altri esempi AWS SDK nel repository AWS Doc SDK Examples. GitHub

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

Utilizzare StartMatchingJob con un AWS SDK

Il seguente esempio di codice mostra come utilizzareStartMatchingJob.

Java
SDK per Java 2.x
Nota

C'è altro da fare GitHub. Trova l'esempio completo e scopri di più sulla configurazione e l'esecuzione nel Repository di esempi di codice AWS.

/** * Starts a matching job asynchronously for the specified workflow name. * * @param workflowName the name of the workflow for which to start the matching job * @return a {@link CompletableFuture} that completes with the job ID of the started matching job, or an empty * string if the operation fails */ public CompletableFuture<String> startMatchingJobAsync(String workflowName) { StartMatchingJobRequest jobRequest = StartMatchingJobRequest.builder() .workflowName(workflowName) .build(); return getResolutionAsyncClient().startMatchingJob(jobRequest) .whenComplete((response, exception) -> { if (response != null) { String jobId = response.jobId(); logger.info("Job ID: " + jobId); } else { if (exception == null) { throw new CompletionException("An unknown error occurred while starting the job.", null); } Throwable cause = exception.getCause(); if (cause instanceof ConflictException) { throw new CompletionException("The job is already running. Resolve conflicts before starting a new job.", cause); } // Wrap other AWS exceptions in a CompletionException. throw new CompletionException("Failed to start the job: " + exception.getMessage(), exception); } }) .thenApply(response -> response != null ? response.jobId() : ""); }
  • Per i dettagli sull'API, StartMatchingJobconsulta AWS SDK for Java 2.x API Reference.

SDK per Java 2.x
Nota

C'è altro da fare GitHub. Trova l'esempio completo e scopri di più sulla configurazione e l'esecuzione nel Repository di esempi di codice AWS.

/** * Starts a matching job asynchronously for the specified workflow name. * * @param workflowName the name of the workflow for which to start the matching job * @return a {@link CompletableFuture} that completes with the job ID of the started matching job, or an empty * string if the operation fails */ public CompletableFuture<String> startMatchingJobAsync(String workflowName) { StartMatchingJobRequest jobRequest = StartMatchingJobRequest.builder() .workflowName(workflowName) .build(); return getResolutionAsyncClient().startMatchingJob(jobRequest) .whenComplete((response, exception) -> { if (response != null) { String jobId = response.jobId(); logger.info("Job ID: " + jobId); } else { if (exception == null) { throw new CompletionException("An unknown error occurred while starting the job.", null); } Throwable cause = exception.getCause(); if (cause instanceof ConflictException) { throw new CompletionException("The job is already running. Resolve conflicts before starting a new job.", cause); } // Wrap other AWS exceptions in a CompletionException. throw new CompletionException("Failed to start the job: " + exception.getMessage(), exception); } }) .thenApply(response -> response != null ? response.jobId() : ""); }
  • Per i dettagli sull'API, StartMatchingJobconsulta AWS SDK for Java 2.x API Reference.

PrivacyCondizioni del sitoPreferenze cookie
© 2025, Amazon Web Services, Inc. o società affiliate. Tutti i diritti riservati.