Utilizzare DeleteFHIRDatastore con un SDK AWS o una CLI - Esempi di codice per SDK AWS

Sono disponibili altri esempi per SDK AWS nel repository GitHub della documentazione degli esempi per SDK AWS.

Utilizzare DeleteFHIRDatastore con un SDK AWS o una CLI

Gli esempi di codice seguenti mostrano come utilizzare DeleteFHIRDatastore.

CLI
AWS CLI

Come eliminare un datastore FHIR

L’esempio delete-fhir-datastore seguente mostra come eliminare un datastore e tutto il relativo contenuto in AWS HealthLake.

aws healthlake delete-fhir-datastore \ --datastore-id (Data store ID)

Output:

{ "DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/(Data store ID)/r4/", "DatastoreArn": "arn:aws:healthlake:us-east-1:(AWS Account ID):datastore/(Data store ID)", "DatastoreStatus": "DELETING", "DatastoreId": "(Data store ID)" }

Per ulteriori informazioni, consulta Creazione e monitoraggio di un datastore FHIR <https://docs.aws.amazon.com/healthlake/latest/devguide/working-with-FHIR-healthlake.html> nella Guida per gli sviluppatori di AWS HealthLake.

  • Per informazioni dettagliate sull’API, consulta DeleteFHIRDatastore in AWS CLI Command Reference.

Python
SDK per Python (Boto3)
@classmethod def from_client(cls) -> "HealthLakeWrapper": """ Creates a HealthLakeWrapper instance with a default AWS HealthLake client. :return: An instance of HealthLakeWrapper initialized with the default HealthLake client. """ health_lake_client = boto3.client("healthlake") return cls(health_lake_client) def delete_fhir_datastore(self, datastore_id: str) -> None: """ Deletes a HealthLake data store. :param datastore_id: The data store ID. """ try: self.health_lake_client.delete_fhir_datastore(DatastoreId=datastore_id) except ClientError as err: logger.exception( "Couldn't delete data store with ID %s. Here's why %s", datastore_id, err.response["Error"]["Message"], ) raise
  • Per informazioni dettagliate sull’API, consulta DeleteFHIRDatastore nella documentazione di riferimento dell’API AWS SDK per Python (Boto3).

Nota

Ulteriori informazioni su GitHub. Trova l’esempio completo e scopri di più sulla configurazione e l’esecuzione nel Repository di esempi di codice AWS.