

Per funzionalità simili a Amazon Timestream for, prendi in considerazione Amazon Timestream LiveAnalytics per InfluxDB. Offre un'acquisizione semplificata dei dati e tempi di risposta alle query di una sola cifra di millisecondi per analisi in tempo reale. [Scopri](https://docs.aws.amazon.com//timestream/latest/developerguide/timestream-for-influxdb.html) di più qui.

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à.

# ExecuteScheduledQuery
<a name="API_query_ExecuteScheduledQuery"></a>

 Puoi utilizzare questa API per eseguire manualmente una query pianificata. 

Se abilitata`QueryInsights`, questa API restituisce anche informazioni e metriche relative alla query che hai eseguito come parte di una notifica Amazon SNS. `QueryInsights`aiuta a ottimizzare le prestazioni della tua query. Per ulteriori informazioni su`QueryInsights`, consulta [Usare le informazioni sulle query per ottimizzare le query in Amazon Timestream](https://docs.aws.amazon.com/timestream/latest/developerguide/using-query-insights.html).

## Sintassi della richiesta
<a name="API_query_ExecuteScheduledQuery_RequestSyntax"></a>

```
{
   "ClientToken": "string",
   "InvocationTime": number,
   "QueryInsights": { 
      "Mode": "string"
   },
   "ScheduledQueryArn": "string"
}
```

## Parametri della richiesta
<a name="API_query_ExecuteScheduledQuery_RequestParameters"></a>

Per informazioni sui parametri comuni per tutte le azioni, consulta [Parametri comuni](CommonParameters.md).

La richiesta accetta i seguenti dati in formato JSON.

 ** [ClientToken](#API_query_ExecuteScheduledQuery_RequestSyntax) **   <a name="timestream-query_ExecuteScheduledQuery-request-ClientToken"></a>
Non utilizzato.   
Tipo: String  
Vincoli di lunghezza: lunghezza minima di 32. La lunghezza massima è 128 caratteri.  
Obbligatorio: no

 ** [InvocationTime](#API_query_ExecuteScheduledQuery_RequestSyntax) **   <a name="timestream-query_ExecuteScheduledQuery-request-InvocationTime"></a>
Il timestamp in UTC. La query verrà eseguita come se fosse stata richiamata in questo timestamp.   
Tipo: Timestamp  
Obbligatorio: sì

 ** [QueryInsights](#API_query_ExecuteScheduledQuery_RequestSyntax) **   <a name="timestream-query_ExecuteScheduledQuery-request-QueryInsights"></a>
Incapsula le impostazioni per l'attivazione. `QueryInsights`  
Attivazione di approfondimenti e metriche sui `QueryInsights` resi come parte della notifica Amazon SNS per la query che hai eseguito. Puoi utilizzarla `QueryInsights` per ottimizzare le prestazioni e i costi delle query.  
Tipo: oggetto [ScheduledQueryInsights](API_query_ScheduledQueryInsights.md)  
Obbligatorio: no

 ** [ScheduledQueryArn](#API_query_ExecuteScheduledQuery_RequestSyntax) **   <a name="timestream-query_ExecuteScheduledQuery-request-ScheduledQueryArn"></a>
ARN della query pianificata.  
Tipo: String  
Limitazioni di lunghezza: lunghezza minima di 1. La lunghezza massima è 2048 caratteri.  
Obbligatorio: sì

## Elementi di risposta
<a name="API_query_ExecuteScheduledQuery_ResponseElements"></a>

Se l'operazione riesce, il servizio invia una risposta HTTP 200 con un corpo HTTP vuoto.

## Errori
<a name="API_query_ExecuteScheduledQuery_Errors"></a>

Per informazioni sugli errori comuni a tutte le operazioni, consultare [Errori comuni](CommonErrors.md).

 ** AccessDeniedException **   
Non disponi delle autorizzazioni necessarie per accedere alle impostazioni dell'account.  
Codice di stato HTTP: 400

 ** InternalServerException **   
Si è verificato un errore interno del server durante l'elaborazione della richiesta.  
Codice di stato HTTP: 400

 ** InvalidEndpointException **   
L'endpoint richiesto non è valido.  
Codice di stato HTTP: 400

 ** ResourceNotFoundException **   
Impossibile trovare la risorsa richiesta.    
 ** ScheduledQueryArn **   
L'ARN della query pianificata.
Codice di stato HTTP: 400

 ** ThrottlingException **   
La richiesta è stata limitata a causa di un numero eccessivo di richieste.  
Codice di stato HTTP: 400

 ** ValidationException **   
 Richiesta non valida o non valida.   
Codice di stato HTTP: 400

## Esempi
<a name="API_query_ExecuteScheduledQuery_Examples"></a>

### Messaggio di notifica di interrogazione pianificata per la modalità ENABLED\$1WITH\$1RATE\$1CONTROL
<a name="API_query_ExecuteScheduledQuery_Example_1"></a>

L'esempio seguente mostra un messaggio di notifica di interrogazione pianificata riuscita per la modalità del parametro. `ENABLED_WITH_RATE_CONTROL` `QueryInsights`

```
"SuccessNotificationMessage": {
    "type": "MANUAL_TRIGGER_SUCCESS",
    "arn": "arn:aws:timestream:<Region>:<Account>:scheduled-query/sq-test-49c6ed55-c2e7-4cc2-9956-4a0ecea13420-80e05b035236a4c3",
    "scheduledQueryRunSummary": {
        "invocationEpochSecond": 1723710546,
        "triggerTimeMillis": 1723710547490,
        "runStatus": "MANUAL_TRIGGER_SUCCESS",
        "executionStats": {
            "executionTimeInMillis": 17343,
            "dataWrites": 1024,
            "bytesMetered": 0,
            "cumulativeBytesScanned": 600,
            "recordsIngested": 1,
            "queryResultRows": 1
        },
        "queryInsightsResponse": {
            "querySpatialCoverage": {
                "max": {
                    "value": 1.0,
                    "tableArn": "arn:aws:timestream:<Region>:<Account>:database/BaseDb/table/BaseTable",
                    "partitionKey": [
                        "measure_name"
                    ]
                }
            },
            "queryTemporalRange": {
                "max": {
                    "value": 2399999999999,
                    "tableArn": "arn:aws:timestream:<Region>:<Account>:database/BaseDb/table/BaseTable"
                }
            },
            "queryTableCount": 1,
            "outputRows": 1,
            "outputBytes": 59
        }
    }
}
```

### Messaggio di notifica delle interrogazioni pianificate per la modalità DISABLED
<a name="API_query_ExecuteScheduledQuery_Example_2"></a>

L'esempio seguente mostra un messaggio di notifica di interrogazione pianificata riuscita per la `DISABLED` modalità del `QueryInsights` parametro.

```
"SuccessNotificationMessage": {
    "type": "MANUAL_TRIGGER_SUCCESS",
    "arn": "arn:aws:timestream:<Region>:<Account>:scheduled-query/sq-test-fa109d9e-6528-4a0d-ac40-482fa05e657f-140faaeecdc5b2a7",
    "scheduledQueryRunSummary": {
        "invocationEpochSecond": 1723711401,
        "triggerTimeMillis": 1723711402144,
        "runStatus": "MANUAL_TRIGGER_SUCCESS",
        "executionStats": {
            "executionTimeInMillis": 17992,
            "dataWrites": 1024,
            "bytesMetered": 0,
            "cumulativeBytesScanned": 600,
            "recordsIngested": 1,
            "queryResultRows": 1
        }
    }
}
```

### Messaggio di notifica di errore per la modalità ENABLED\$1WITH\$1RATE\$1CONTROL
<a name="API_query_ExecuteScheduledQuery_Example_3"></a>

L'esempio seguente mostra un messaggio di notifica di interrogazione pianificata non riuscita per la modalità del parametro. `ENABLED_WITH_RATE_CONTROL` `QueryInsights`

```
"FailureNotificationMessage": {
    "type": "MANUAL_TRIGGER_FAILURE",
    "arn": "arn:aws:timestream:<Region>:<Account>:scheduled-query/sq-test-b261670d-790c-4116-9db5-0798071b18b1-b7e27a1d79be226d",
    "scheduledQueryRunSummary": {
        "invocationEpochSecond": 1727915513,
        "triggerTimeMillis": 1727915513894,
        "runStatus": "MANUAL_TRIGGER_FAILURE",
        "executionStats": {
            "executionTimeInMillis": 10777,
            "dataWrites": 0,
            "bytesMetered": 0,
            "cumulativeBytesScanned": 0,
            "recordsIngested": 0,
            "queryResultRows": 4
        },
        "errorReportLocation": {
            "s3ReportLocation": {
                "bucketName": "amzn-s3-demo-bucket",
                "objectKey": "4my-organization-f7a3c5d065a1a95e/1727915513/MANUAL/1727915513894/5e14b3df-b147-49f4-9331-784f749b68ae"
            }
        },
        "failureReason": "Schedule encountered some errors and is incomplete. Please take a look at error report for further details"
    }
}
```

### Messaggio di notifica di errore per la modalità DISABLED
<a name="API_query_ExecuteScheduledQuery_Example_4"></a>

L'esempio seguente mostra un messaggio di notifica di interrogazione pianificata non riuscita per la `DISABLED` modalità del `QueryInsights` parametro.

```
"FailureNotificationMessage": {
    "type": "MANUAL_TRIGGER_FAILURE",
    "arn": "arn:aws:timestream:<Region>:<Account>:scheduled-query/sq-test-b261670d-790c-4116-9db5-0798071b18b1-b7e27a1d79be226d",
    "scheduledQueryRunSummary": {
        "invocationEpochSecond": 1727915194,
        "triggerTimeMillis": 1727915195119,
        "runStatus": "MANUAL_TRIGGER_FAILURE",
        "executionStats": {
            "executionTimeInMillis": 10777,
            "dataWrites": 0,
            "bytesMetered": 0,
            "cumulativeBytesScanned": 0,
            "recordsIngested": 0,
            "queryResultRows": 4
        },
        "errorReportLocation": {
            "s3ReportLocation": {
                "bucketName": "amzn-s3-demo-bucket",
                "objectKey": "4my-organization-b7e27a1d79be226d/1727915194/MANUAL/1727915195119/08dea9f5-9a0a-4e63-a5f7-ded23247bb98"
            }
        },
        "failureReason": "Schedule encountered some errors and is incomplete. Please take a look at error report for further details"
    }
}
```

## Vedi anche
<a name="API_query_ExecuteScheduledQuery_SeeAlso"></a>

Per ulteriori informazioni sull'utilizzo di questa API in una delle lingue specifiche AWS SDKs, consulta quanto segue:
+  [AWS Interfaccia a riga di comando V2](https://docs.aws.amazon.com/goto/cli2/timestream-query-2018-11-01/ExecuteScheduledQuery) 
+  [AWS SDK per.NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/timestream-query-2018-11-01/ExecuteScheduledQuery) 
+  [AWS SDK per C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/timestream-query-2018-11-01/ExecuteScheduledQuery) 
+  [AWS SDK per Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/timestream-query-2018-11-01/ExecuteScheduledQuery) 
+  [AWS SDK per Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/timestream-query-2018-11-01/ExecuteScheduledQuery) 
+  [AWS SDK per V3 JavaScript ](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/timestream-query-2018-11-01/ExecuteScheduledQuery) 
+  [AWS SDK per Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/timestream-query-2018-11-01/ExecuteScheduledQuery) 
+  [AWS SDK per PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/timestream-query-2018-11-01/ExecuteScheduledQuery) 
+  [AWS SDK per Python](https://docs.aws.amazon.com/goto/boto3/timestream-query-2018-11-01/ExecuteScheduledQuery) 
+  [AWS SDK per Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/timestream-query-2018-11-01/ExecuteScheduledQuery) 