Sélectionner vos préférences de cookies

Nous utilisons des cookies essentiels et des outils similaires qui sont nécessaires au fonctionnement de notre site et à la fourniture de nos services. Nous utilisons des cookies de performance pour collecter des statistiques anonymes afin de comprendre comment les clients utilisent notre site et d’apporter des améliorations. Les cookies essentiels ne peuvent pas être désactivés, mais vous pouvez cliquer sur « Personnaliser » ou « Refuser » pour refuser les cookies de performance.

Si vous êtes d’accord, AWS et les tiers approuvés utiliseront également des cookies pour fournir des fonctionnalités utiles au site, mémoriser vos préférences et afficher du contenu pertinent, y compris des publicités pertinentes. Pour accepter ou refuser tous les cookies non essentiels, cliquez sur « Accepter » ou « Refuser ». Pour effectuer des choix plus détaillés, cliquez sur « Personnaliser ».

Bonjour Résolution des entités AWS - AWS Exemples de code SDK

D'autres exemples de AWS SDK sont disponibles dans le référentiel AWS Doc SDK Examples GitHub .

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

D'autres exemples de AWS SDK sont disponibles dans le référentiel AWS Doc SDK Examples GitHub .

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

Bonjour Résolution des entités AWS

L'exemple de code suivant montre comment commencer à utiliser Résolution des entités AWS.

Java
SDK pour Java 2.x
Note

Il y en a plus à ce sujet GitHub. Trouvez l’exemple complet et découvrez comment le configurer et l’exécuter dans le référentiel d’exemples de code AWS.

/** * Before running this Java V2 code example, set up your development * environment, including your credentials. * * For more information, see the following documentation topic: * * https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html */ public class HelloEntityResoultion { private static final Logger logger = LoggerFactory.getLogger(HelloEntityResoultion.class); private static EntityResolutionAsyncClient entityResolutionAsyncClient; public static void main(String[] args) { listMatchingWorkflows(); } public static EntityResolutionAsyncClient getResolutionAsyncClient() { if (entityResolutionAsyncClient == null) { /* The `NettyNioAsyncHttpClient` class is part of the AWS SDK for Java, version 2, and it is designed to provide a high-performance, asynchronous HTTP client for interacting with AWS services. It uses the Netty framework to handle the underlying network communication and the Java NIO API to provide a non-blocking, event-driven approach to HTTP requests and responses. */ SdkAsyncHttpClient httpClient = NettyNioAsyncHttpClient.builder() .maxConcurrency(50) // Adjust as needed. .connectionTimeout(Duration.ofSeconds(60)) // Set the connection timeout. .readTimeout(Duration.ofSeconds(60)) // Set the read timeout. .writeTimeout(Duration.ofSeconds(60)) // Set the write timeout. .build(); ClientOverrideConfiguration overrideConfig = ClientOverrideConfiguration.builder() .apiCallTimeout(Duration.ofMinutes(2)) // Set the overall API call timeout. .apiCallAttemptTimeout(Duration.ofSeconds(90)) // Set the individual call attempt timeout. .retryStrategy(RetryMode.STANDARD) .build(); entityResolutionAsyncClient = EntityResolutionAsyncClient.builder() .httpClient(httpClient) .overrideConfiguration(overrideConfig) .build(); } return entityResolutionAsyncClient; } /** * Lists all matching workflows using an asynchronous paginator. * <p> * This method requests a paginated list of matching workflows from the * AWS Entity Resolution service and logs the names of the retrieved workflows. * It uses an asynchronous approach with a paginator and waits for the operation * to complete using {@code CompletableFuture#join()}. * </p> */ public static void listMatchingWorkflows() { ListMatchingWorkflowsRequest request = ListMatchingWorkflowsRequest.builder().build(); ListMatchingWorkflowsPublisher paginator = getResolutionAsyncClient().listMatchingWorkflowsPaginator(request); // Iterate through the paginated results asynchronously CompletableFuture<Void> future = paginator.subscribe(response -> { response.workflowSummaries().forEach(workflow -> logger.info("Matching Workflow Name: " + workflow.workflowName()) ); }); // Wait for the asynchronous operation to complete future.join(); } }
  • Pour plus de détails sur l'API, reportez-vous listMatchingWorkflowsà la section Référence des AWS SDK for Java 2.x API.

SDK pour Java 2.x
Note

Il y en a plus à ce sujet GitHub. Trouvez l’exemple complet et découvrez comment le configurer et l’exécuter dans le référentiel d’exemples de code AWS.

/** * Before running this Java V2 code example, set up your development * environment, including your credentials. * * For more information, see the following documentation topic: * * https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html */ public class HelloEntityResoultion { private static final Logger logger = LoggerFactory.getLogger(HelloEntityResoultion.class); private static EntityResolutionAsyncClient entityResolutionAsyncClient; public static void main(String[] args) { listMatchingWorkflows(); } public static EntityResolutionAsyncClient getResolutionAsyncClient() { if (entityResolutionAsyncClient == null) { /* The `NettyNioAsyncHttpClient` class is part of the AWS SDK for Java, version 2, and it is designed to provide a high-performance, asynchronous HTTP client for interacting with AWS services. It uses the Netty framework to handle the underlying network communication and the Java NIO API to provide a non-blocking, event-driven approach to HTTP requests and responses. */ SdkAsyncHttpClient httpClient = NettyNioAsyncHttpClient.builder() .maxConcurrency(50) // Adjust as needed. .connectionTimeout(Duration.ofSeconds(60)) // Set the connection timeout. .readTimeout(Duration.ofSeconds(60)) // Set the read timeout. .writeTimeout(Duration.ofSeconds(60)) // Set the write timeout. .build(); ClientOverrideConfiguration overrideConfig = ClientOverrideConfiguration.builder() .apiCallTimeout(Duration.ofMinutes(2)) // Set the overall API call timeout. .apiCallAttemptTimeout(Duration.ofSeconds(90)) // Set the individual call attempt timeout. .retryStrategy(RetryMode.STANDARD) .build(); entityResolutionAsyncClient = EntityResolutionAsyncClient.builder() .httpClient(httpClient) .overrideConfiguration(overrideConfig) .build(); } return entityResolutionAsyncClient; } /** * Lists all matching workflows using an asynchronous paginator. * <p> * This method requests a paginated list of matching workflows from the * AWS Entity Resolution service and logs the names of the retrieved workflows. * It uses an asynchronous approach with a paginator and waits for the operation * to complete using {@code CompletableFuture#join()}. * </p> */ public static void listMatchingWorkflows() { ListMatchingWorkflowsRequest request = ListMatchingWorkflowsRequest.builder().build(); ListMatchingWorkflowsPublisher paginator = getResolutionAsyncClient().listMatchingWorkflowsPaginator(request); // Iterate through the paginated results asynchronously CompletableFuture<Void> future = paginator.subscribe(response -> { response.workflowSummaries().forEach(workflow -> logger.info("Matching Workflow Name: " + workflow.workflowName()) ); }); // Wait for the asynchronous operation to complete future.join(); } }
  • Pour plus de détails sur l'API, reportez-vous listMatchingWorkflowsà la section Référence des AWS SDK for Java 2.x API.

Rubrique suivante :

Principes de base

Rubrique précédente :

Principes de base
ConfidentialitéConditions d'utilisation du sitePréférences de cookies
© 2025, Amazon Web Services, Inc. ou ses affiliés. Tous droits réservés.