

Sono disponibili altri esempi AWS SDK nel repository [AWS Doc SDK](https://github.com/awsdocs/aws-doc-sdk-examples) 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à.

# AWS IoT Things Graph esempi che utilizzano AWS CLI
<a name="cli_2_iotthingsgraph_code_examples"></a>

I seguenti esempi di codice mostrano come eseguire azioni e implementare scenari comuni utilizzando AWS Command Line Interface with AWS IoT Things Graph.

Le *azioni* sono estratti di codice da programmi più grandi e devono essere eseguite nel contesto. Sebbene le azioni mostrino come richiamare le singole funzioni del servizio, è possibile visualizzarle contestualizzate negli scenari correlati.

Ogni esempio include un link al codice sorgente completo, in cui vengono fornite le istruzioni su come configurare ed eseguire il codice nel contesto.

**Topics**
+ [Azioni](#actions)

## Azioni
<a name="actions"></a>

### `associate-entity-to-thing`
<a name="iotthingsgraph_AssociateEntityToThing_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`associate-entity-to-thing`.

**AWS CLI**  
**Come associare un oggetto a un dispositivo**  
L’esempio `associate-entity-to-thing` seguente associa un oggetto a un dispositivo. L’esempio utilizza un dispositivo con sensore di movimento che si trova nel namespace pubblico.  

```
aws iotthingsgraph associate-entity-to-thing \
    --thing-name "MotionSensorName" \
    --entity-id "urn:tdm:aws/examples:Device:HCSR501MotionSensor"
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Creazione e caricamento di modelli](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-models-gs.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [AssociateEntityToThing AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/associate-entity-to-thing.html)*Command Reference*. 

### `create-flow-template`
<a name="iotthingsgraph_CreateFlowTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`create-flow-template`.

**AWS CLI**  
**Come creare un flusso**  
L’esempio `create-flow-template` seguente crea un flusso (di lavoro). Il valore di `MyFlowDefinition` è il GraphQL che modella il flusso.  

```
aws iotthingsgraph create-flow-template \
    --definition language=GRAPHQL,text="MyFlowDefinition"
```
Output:  

```
{
    "summary": {
        "createdAt": 1559248067.545,
        "id": "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow",
        "revisionNumber": 1
    }
}
```
Per ulteriori informazioni, consulta [Utilizzo dei flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-workflows.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [CreateFlowTemplate AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/create-flow-template.html)*Command Reference*. 

### `create-system-instance`
<a name="iotthingsgraph_CreateSystemInstance_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`create-system-instance`.

**AWS CLI**  
**Come creare un’istanza di sistema**  
L’esempio `create-system-instance` seguente crea un’istanza di sistema. Il valore di `MySystemInstanceDefinition` è il GraphQL che modella l’istanza di sistema.  

```
aws iotthingsgraph create-system-instance -\
    -definition language=GRAPHQL,text="MySystemInstanceDefinition" \
    --target CLOUD \
    --flow-actions-role-arn myRoleARN
```
Output:  

```
{
    "summary": {
        "id": "urn:tdm:us-west-2/123456789012/default:Deployment:Room218",
        "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/Room218",
        "status": "NOT_DEPLOYED",
        "target": "CLOUD",
        "createdAt": 1559249315.208,
        "updatedAt": 1559249315.208
    }
}
```
Per ulteriori informazioni, consulta [Utilizzo di configurazioni di sistemi e flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-sysdeploy.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [CreateSystemInstance AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/create-system-instance.html)*Command Reference*. 

### `create-system-template`
<a name="iotthingsgraph_CreateSystemTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`create-system-template`.

**AWS CLI**  
**Come creare un sistema**  
L’esempio `create-system-template` seguente crea un sistema. Il valore di MySystemDefinition è il GraphQL che modella il sistema.  

```
aws iotthingsgraph create-system-template \
    --definition language=GRAPHQL,text="MySystemDefinition"
```
Output:  

```
{
    "summary": {
        "createdAt": 1559249776.254,
        "id": "urn:tdm:us-west-2/123456789012/default:System:MySystem",
        "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:System/default/MySystem",
        "revisionNumber": 1
    }
}
```
Per ulteriori informazioni, consulta [Creazione dei sistemi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-sysdeploy-systems.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [CreateSystemTemplate AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/create-system-template.html)*Command Reference.* 

### `delete-flow-template`
<a name="iotthingsgraph_DeleteFlowTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`delete-flow-template`.

**AWS CLI**  
**Come eliminare un flusso**  
L’esempio `delete-flow-template` seguente elimina un flusso (di lavoro).  

```
aws iotthingsgraph delete-flow-template \
    --id "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow"
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Lifecycle Management for AWS IoT Things Graph Entities, Flows, Systems and Deployments](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-lifecycle.html) nella *AWS IoT Things* Graph User Guide.  
+  *Per i dettagli sull'API, consulta [DeleteFlowTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/delete-flow-template.html)Command Reference.AWS CLI * 

### `delete-namespace`
<a name="iotthingsgraph_DeleteNamespace_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`delete-namespace`.

**AWS CLI**  
**Come eliminare un namespace**  
L’esempio `delete-namespace` seguente elimina un namespace.  

```
aws iotthingsgraph delete-namespace
```
Output:  

```
{
   "namespaceArn": "arn:aws:iotthingsgraph:us-west-2:123456789012",
   "namespaceName": "us-west-2/123456789012/default"
}
```
Per ulteriori informazioni, consulta [Lifecycle Management for AWS IoT Things Graph Entities, Flows, Systems and Deployments](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-lifecycle.html) nella *AWS IoT Things* Graph User Guide.  
+  *Per i dettagli sull'API, consulta [DeleteNamespace](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/delete-namespace.html)Command Reference.AWS CLI * 

### `delete-system-instance`
<a name="iotthingsgraph_DeleteSystemInstance_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`delete-system-instance`.

**AWS CLI**  
**Come eliminare un’istanza di sistema**  
L’esempio `delete-system-instance` seguente elimina un’istanza di sistema.  

```
aws iotthingsgraph delete-system-instance \
    --id "urn:tdm:us-west-2/123456789012/default:Deployment:Room218"
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Lifecycle Management for AWS IoT Things Graph Entities, Flows, Systems and Deployments](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-lifecycle.html) nella *AWS IoT Things* Graph User Guide.  
+  *Per i dettagli sull'API, consulta [DeleteSystemInstance](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/delete-system-instance.html)Command Reference.AWS CLI * 

### `delete-system-template`
<a name="iotthingsgraph_DeleteSystemTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`delete-system-template`.

**AWS CLI**  
**Come eliminare un sistema**  
L’esempio `delete-system-template` seguente elimina un sistema.  

```
aws iotthingsgraph delete-system-template \
    --id "urn:tdm:us-west-2/123456789012/default:System:MySystem"
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Lifecycle Management for AWS IoT Things Graph Entities, Flows, Systems and Deployments](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-lifecycle.html) nella *AWS IoT Things* Graph User Guide.  
+  *Per i dettagli sull'API, consulta [DeleteSystemTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/delete-system-template.html)Command Reference.AWS CLI * 

### `deploy-system-instance`
<a name="iotthingsgraph_DeploySystemInstance_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`deploy-system-instance`.

**AWS CLI**  
**Come implementare un’istanza di sistema**  
L’esempio `delete-system-template` seguente implementa un’istanza di sistema.  

```
aws iotthingsgraph deploy-system-instance \
    --id "urn:tdm:us-west-2/123456789012/default:Deployment:Room218"
```
Output:  

```
{
   "summary": {
      "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment:Room218",
      "createdAt": 1559249776.254,
      "id": "urn:tdm:us-west-2/123456789012/default:Deployment:Room218",
      "status": "DEPLOYED_IN_TARGET",
      "target": "CLOUD",
      "updatedAt": 1559249776.254
   }
}
```
Per ulteriori informazioni, consulta [Utilizzo di configurazioni di sistemi e flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-sysdeploy.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [DeploySystemInstance AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/deploy-system-instance.html)*Command Reference*. 

### `deprecate-flow-template`
<a name="iotthingsgraph_DeprecateFlowTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`deprecate-flow-template`.

**AWS CLI**  
**Come deprecare un flusso**  
L’esempio `deprecate-flow-template` seguente rende obsoleto un flusso (di lavoro).  

```
aws iotthingsgraph deprecate-flow-template \
    --id "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow"
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Lifecycle Management for AWS IoT Things Graph Entities, Flows, Systems and Deployments](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-lifecycle.html) nella *AWS IoT Things* Graph User Guide.  
+  *Per i dettagli sull'API, consulta [DeprecateFlowTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/deprecate-flow-template.html)Command Reference.AWS CLI * 

### `deprecate-system-template`
<a name="iotthingsgraph_DeprecateSystemTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`deprecate-system-template`.

**AWS CLI**  
**Come deprecare un sistema**  
L’esempio `deprecate-system-template` seguente rende obsoleto un sistema.  

```
aws iotthingsgraph deprecate-system-template \
    --id "urn:tdm:us-west-2/123456789012/default:System:MySystem"
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Lifecycle Management for AWS IoT Things Graph Entities, Flows, Systems and Deployments](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-lifecycle.html) nella *AWS IoT Things* Graph User Guide.  
+  *Per i dettagli sull'API, consulta [DeprecateSystemTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/deprecate-system-template.html)Command Reference.AWS CLI * 

### `describe-namespace`
<a name="iotthingsgraph_DescribeNamespace_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`describe-namespace`.

**AWS CLI**  
**Come ottenere una descrizione del namespace corrente**  
L’esempio `describe-namespace` seguente ottiene una descrizione del tuo namespace.  

```
aws iotthingsgraph describe-namespace
```
Output:  

```
{
    "namespaceName": "us-west-2/123456789012/default",
    "trackingNamespaceName": "aws",
    "trackingNamespaceVersion": 1,
    "namespaceVersion": 5
}
```
Per ulteriori informazioni, consulta [Namespace](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-whatis-namespace.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [DescribeNamespace AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/describe-namespace.html)*Command Reference*. 

### `dissociate-entity-from-thing`
<a name="iotthingsgraph_DissociateEntityFromThing_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`dissociate-entity-from-thing`.

**AWS CLI**  
**Come dissociare un oggetto da un dispositivo**  
L’esempio `dissociate-entity-from-thing` seguente dissocia un oggetto da un dispositivo.  

```
aws iotthingsgraph dissociate-entity-from-thing \
    --thing-name "MotionSensorName" \
    --entity-type "DEVICE"
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Creazione e caricamento di modelli](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-models-gs.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [DissociateEntityFromThing AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/dissociate-entity-from-thing.html)*Command Reference*. 

### `get-entities`
<a name="iotthingsgraph_GetEntities_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`get-entities`.

**AWS CLI**  
**Come ottenere le definizioni delle entità**  
L’esempio `get-entities` seguente ottiene una definizione per un modello di dispositivo.  

```
aws iotthingsgraph get-entities \
    --ids "urn:tdm:aws/examples:DeviceModel:MotionSensor"
```
Output:  

```
{
    "descriptions": [
        {
            "id": "urn:tdm:aws/examples:DeviceModel:MotionSensor",
            "type": "DEVICE_MODEL",
            "createdAt": 1559256190.599,
            "definition": {
                "language": "GRAPHQL",
                "text": "##\n# Specification of motion sensor devices interface.\n##\ntype MotionSensor @deviceModel(id: \"urn:tdm:aws/examples:deviceModel:MotionSensor\",\n        capability: \"urn:tdm:aws/examples:capability:MotionSensorCapability\") {ignore:void}"
            }
        }
    ]
}
```
Per ulteriori informazioni, consulta [Creazione e caricamento di modelli](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-models-gs.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [GetEntities AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/get-entities.html)*Command Reference*. 

### `get-flow-template-revisions`
<a name="iotthingsgraph_GetFlowTemplateRevisions_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`get-flow-template-revisions`.

**AWS CLI**  
**Come ottenere informazioni sulle revisioni di un flusso**  
L’esempio `get-flow-template-revisions` seguente ottiene informazioni di revisione su un flusso (di lavoro).  

```
aws iotthingsgraph get-flow-template-revisions \
    --id urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow
```
Output:  

```
{
    "summaries": [
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow",
            "revisionNumber": 1,
            "createdAt": 1559247540.292
        }
    ]
}
```
Per ulteriori informazioni, consulta [Utilizzo dei flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-workflows.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [GetFlowTemplateRevisions AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/get-flow-template-revisions.html)*Command Reference*. 

### `get-flow-template`
<a name="iotthingsgraph_GetFlowTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`get-flow-template`.

**AWS CLI**  
**Come ottenere una definizione del flusso**  
L’esempio `get-flow-template` seguente ottiene una definizione per un flusso (di lavoro).  

```
aws iotthingsgraph get-flow-template \
    --id "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow"
```
Output:  

```
{
    "description": {
        "summary": {
            "id": "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow",
            "revisionNumber": 1,
            "createdAt": 1559247540.292
        },
        "definition": {
            "language": "GRAPHQL",
            "text": "{\nquery MyFlow($camera: string!, $screen: string!) @workflowType(id: \"urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow\") @annotation(type: \"tgc:FlowEvent\", id: \"sledged790c1b2bcd949e09da0c9bfc077f79d\", x: 1586, y: 653) @triggers(definition: \"{MotionSensor(description: \\\"\\\") @position(x: 1045, y: 635.6666564941406) {\\n  condition(expr: \\\"devices[name == \\\\\\\"motionSensor\\\\\\\"].events[name == \\\\\\\"StateChanged\\\\\\\"].lastEvent\\\")\\n  action(expr: \\\"\\\")\\n}}\") {\n  variables {\n    cameraResult @property(id: \"urn:tdm:aws/examples:property:CameraStateProperty\")\n  }\n  steps {\n    step(name: \"Camera\", outEvent: [\"sledged790c1b2bcd949e09da0c9bfc077f79d\"]) @position(x: 1377, y: 638.6666564941406) {\n      DeviceActivity(deviceModel: \"urn:tdm:aws/examples:deviceModel:Camera\", out: \"cameraResult\", deviceId: \"${camera}\") {\n        capture\n      }\n    }\n    step(name: \"Screen\", inEvent: [\"sledged790c1b2bcd949e09da0c9bfc077f79d\"]) @position(x: 1675.6666870117188, y: 637.9999847412109) {\n      DeviceActivity(deviceModel: \"urn:tdm:aws/examples:deviceModel:Screen\", deviceId: \"${screen}\") {\n        display(imageUrl: \"${cameraResult.lastClickedImage}\")\n      }\n    }\n  }\n}\n}"
        },
        "validatedNamespaceVersion": 5
    }
}
```
Per ulteriori informazioni, consulta [Utilizzo dei flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-workflows.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [GetFlowTemplate AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/get-flow-template.html)*Command Reference*. 

### `get-namespace-deletion-status`
<a name="iotthingsgraph_GetNamespaceDeletionStatus_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`get-namespace-deletion-status`.

**AWS CLI**  
**Come ottenere lo stato dell’attività di eliminazione del namespace**  
L’esempio `get-namespace-deletion-status` seguente ottiene lo stato dell’operazione di eliminazione del namespace.  

```
aws iotthingsgraph get-namespace-deletion-status
```
Output:  

```
{
   "namespaceArn": "arn:aws:iotthingsgraph:us-west-2:123456789012",
   "namespaceName": "us-west-2/123456789012/default"
   "status": "SUCCEEDED "
}
```
Per ulteriori informazioni, consulta [Namespace](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-whatis-namespace.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [GetNamespaceDeletionStatus AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/get-namespace-deletion-status.html)*Command Reference*. 

### `get-system-instance`
<a name="iotthingsgraph_GetSystemInstance_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`get-system-instance`.

**AWS CLI**  
**Come ottenere un’istanza di sistema**  
L’esempio `get-system-instance` seguente ottiene una definizione per un’istanza di sistema.  

```
aws iotthingsgraph get-system-instance \
    --id "urn:tdm:us-west-2/123456789012/default:Deployment:Room218"
```
Output:  

```
{
    "description": {
        "summary": {
            "id": "urn:tdm:us-west-2/123456789012/default:Deployment:Room218",
            "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/Room218",
            "status": "NOT_DEPLOYED",
            "target": "CLOUD",
            "createdAt": 1559249315.208,
            "updatedAt": 1559249315.208
        },
        "definition": {
            "language": "GRAPHQL",
            "text": "{\r\nquery Room218 @deployment(id: \"urn:tdm:us-west-2/123456789012/default:Deployment:Room218\", systemId: \"urn:tdm:us-west-2/123456789012/default:System:SecurityFlow\") {\r\n    motionSensor(deviceId: \"MotionSensorName\")\r\n    screen(deviceId: \"ScreenName\")\r\n    camera(deviceId: \"CameraName\") \r\n    triggers {MotionEventTrigger(description: \"a trigger\") {  \r\n    condition(expr: \"devices[name == 'motionSensor'].events[name == 'StateChanged'].lastEvent\") \r\n    action(expr: \"ThingsGraph.startFlow('SecurityFlow', bindings[name == 'camera'].deviceId, bindings[name == 'screen'].deviceId)\")\r\n    }\r\n   }\r\n  }\r\n  }"
        },
        "metricsConfiguration": {
            "cloudMetricEnabled": false
        },
        "validatedNamespaceVersion": 5,
        "flowActionsRoleArn": "arn:aws:iam::123456789012:role/ThingsGraphRole"
    }
}
```
Per ulteriori informazioni, consulta [Utilizzo di configurazioni di sistemi e flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-sysdeploy.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [GetSystemInstance AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/get-system-instance.html)*Command Reference*. 

### `get-system-template-revisions`
<a name="iotthingsgraph_GetSystemTemplateRevisions_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`get-system-template-revisions`.

**AWS CLI**  
**Come ottenere informazioni su un sistema**  
L’esempio `get-system-template-revisions` seguente ottiene informazioni sulla revisione di un sistema.  

```
aws iotthingsgraph get-system-template-revisions \
    --id "urn:tdm:us-west-2/123456789012/default:System:MySystem"
```
Output:  

```
{
    "summaries": [
        {
            "id": "urn:tdm:us-west-2/123456789012/default:System:MySystem",
            "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:System/default/MySystem",
            "revisionNumber": 1,
            "createdAt": 1559247540.656
        }
    ]
}
```
Per ulteriori informazioni, consulta [Utilizzo di configurazioni di sistemi e flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-sysdeploy.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [GetSystemTemplateRevisions AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/get-system-template-revisions.html)*Command Reference*. 

### `get-system-template`
<a name="iotthingsgraph_GetSystemTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`get-system-template`.

**AWS CLI**  
**Come ottenere un sistema**  
L’esempio `get-system-template` seguente ottiene una definizione per un sistema.  

```
aws iotthingsgraph get-system-template \
    --id "urn:tdm:us-west-2/123456789012/default:System:MySystem"
```
Output:  

```
{
    "description": {
        "summary": {
            "id": "urn:tdm:us-west-2/123456789012/default:System:MySystem",
            "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:System/default/MyFlow",
            "revisionNumber": 1,
            "createdAt": 1559247540.656
        },
        "definition": {
            "language": "GRAPHQL",
            "text": "{\ntype MySystem @systemType(id: \"urn:tdm:us-west-2/123456789012/default:System:MySystem\", description: \"\") {\n  camera: Camera @thing(id: \"urn:tdm:aws/examples:deviceModel:Camera\")\n  screen: Screen @thing(id: \"urn:tdm:aws/examples:deviceModel:Screen\")\n  motionSensor: MotionSensor @thing(id: \"urn:tdm:aws/examples:deviceModel:MotionSensor\")\n  MyFlow: MyFlow @workflow(id: \"urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow\")\n}\n}"
        },
        "validatedNamespaceVersion": 5
    }
}
```
Per ulteriori informazioni, consulta [Utilizzo di configurazioni di sistemi e flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-sysdeploy.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [GetSystemTemplate AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/get-system-template.html)*Command Reference*. 

### `get-upload-status`
<a name="iotthingsgraph_GetUploadStatus_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`get-upload-status`.

**AWS CLI**  
**Come ottenere lo stato del caricamento dell’entità**  
L’esempio `get-upload-status` seguente ottiene lo stato dell’operazione di caricamento dell’entità. Il valore di `MyUploadId` è il valore ID restituito dall’operazione `upload-entity-definitions`.  

```
aws iotthingsgraph get-upload-status \
    --upload-id "MyUploadId"
```
Output:  

```
{
    "namespaceName": "us-west-2/123456789012/default",
    "namespaceVersion": 5,
    "uploadId": "f6294f1e-b109-4bbe-9073-f451a2dda2da",
    "uploadStatus": "SUCCEEDED"
}
```
Per ulteriori informazioni, consulta [Modellazione delle entità](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-modelmanagement.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [GetUploadStatus AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/get-upload-status.html)*Command Reference*. 

### `list-flow-execution-messages`
<a name="iotthingsgraph_ListFlowExecutionMessages_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`list-flow-execution-messages`.

**AWS CLI**  
**Come ottenere informazioni sugli eventi durante l’esecuzione di un flusso**  
L’esempio `list-flow-execution-messages` seguente ottiene informazioni sugli eventi in un’esecuzione di un flusso.  

```
aws iotthingsgraph list-flow-execution-messages \
    --flow-execution-id "urn:tdm:us-west-2/123456789012/default:Workflow:SecurityFlow_2019-05-11T19:39:55.317Z_MotionSensor_69b151ad-a611-42f5-ac21-fe537f9868ad"
```
Output:  

```
{
    "messages": [
        {
         "eventType": "EXECUTION_STARTED",
         "messageId": "f6294f1e-b109-4bbe-9073-f451a2dda2da",
         "payload": "Flow execution started",
         "timestamp": 1559247540.656
        }
    ]
}
```
Per ulteriori informazioni, consulta [Utilizzo dei flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-workflows.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [ListFlowExecutionMessages AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/list-flow-execution-messages.html)*Command Reference*. 

### `list-tags-for-resource`
<a name="iotthingsgraph_ListTagsForResource_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`list-tags-for-resource`.

**AWS CLI**  
**Come elencare tutti i tag per una risorsa**  
L'`list-tags-for-resource`esempio seguente elenca tutti i tag per una risorsa AWS IoT Things Graph.  

```
aws iotthingsgraph list-tags-for-resource \
    --resource-arn "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/Room218"
```
Output:  

```
{
   "tags": [
      {
         "key": "Type",
         "value": "Residential"
      }
   ]
}
```
Per ulteriori informazioni, consulta [Tagging Your AWS IoT Things Graph Resources](https://docs.aws.amazon.com/thingsgraph/latest/ug/tagging-tg.html) nella *AWS IoT Things Graph User Guide*.  
+  Per i dettagli sull'API, consulta [ListTagsForResource AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/list-tags-for-resource.html)*Command Reference.* 

### `search-entities`
<a name="iotthingsgraph_SearchEntities_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`search-entities`.

**AWS CLI**  
**Come cercare le entità**  
L’esempio `search-entities` seguente cerca tutte le entità di tipo `EVENT`.  

```
aws iotthingsgraph search-entities \
    --entity-types "EVENT"
```
Output:  

```
{
    "descriptions": [
        {
            "id": "urn:tdm:aws/examples:Event:MotionSensorEvent",
            "type": "EVENT",
            "definition": {
                "language": "GRAPHQL",
                "text": "##\n# Description of events emitted by motion sensor.\n##\ntype MotionSensorEvent @eventType(id: \"urn:tdm:aws/examples:event:MotionSensorEvent\",\n            payload: \"urn:tdm:aws/examples:property:MotionSensorStateProperty\") {ignore:void}"
            }
        },
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Event:CameraClickedEventV2",
            "type": "EVENT",
            "definition": {
                "language": "GRAPHQL",
                "text": "type CameraClickedEventV2 @eventType(id: \"urn:tdm:us-west-2/123456789012/default:event:CameraClickedEventV2\",\r\npayload: \"urn:tdm:aws:Property:Boolean\"){ignore:void}"
            }
        },
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Event:MotionSensorEventV2",
            "type": "EVENT",
            "definition": {
                "language": "GRAPHQL",
                "text": "# Event emitted by the motion sensor.\r\ntype MotionSensorEventV2 @eventType(id: \"urn:tdm:us-west-2/123456789012/default:event:MotionSensorEventV2\",\r\npayload: \"urn:tdm:us-west-2/123456789012/default:property:MotionSensorStateProperty2\") {ignore:void}"
            }
        }
    ],
    "nextToken": "urn:tdm:us-west-2/123456789012/default:Event:MotionSensorEventV2"
}
```
Per ulteriori informazioni, consulta [Riferimento al modello di dati di AWS IoT Things Graph](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-models.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [SearchEntities AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/search-entities.html)*Command Reference*. 

### `search-flow-executions`
<a name="iotthingsgraph_SearchFlowExecutions_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`search-flow-executions`.

**AWS CLI**  
**Come cercare le esecuzioni del flusso**  
L’esempio `search-flow-executions` seguente cerca tutte le esecuzioni di un flusso in un’istanza di sistema specificata.  

```
aws iotthingsgraph search-flow-executions \
    --system-instance-id "urn:tdm:us-west-2/123456789012/default:Deployment:Room218"
```
Output:  

```
{
   "summaries": [
      {
         "createdAt": 1559247540.656,
         "flowExecutionId": "f6294f1e-b109-4bbe-9073-f451a2dda2da",
         "flowTemplateId": "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow",
         "status": "RUNNING ",
         "systemInstanceId": "urn:tdm:us-west-2/123456789012/default:System:MySystem",
         "updatedAt": 1559247540.656
      }
   ]
}
```
Per ulteriori informazioni, consulta [Utilizzo di configurazioni di sistemi e flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-sysdeploy.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [SearchFlowExecutions AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/search-flow-executions.html)*Command Reference*. 

### `search-flow-templates`
<a name="iotthingsgraph_SearchFlowTemplates_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`search-flow-templates`.

**AWS CLI**  
**Come cercare i flussi (o i flussi di lavoro)**  
L’esempio `search-flow-templates` seguente cerca tutti i flussi (di lavoro) che contengono il modello di dispositivo Camera.  

```
aws iotthingsgraph search-flow-templates \
    --filters name="DEVICE_MODEL_ID",value="urn:tdm:aws/examples:DeviceModel:Camera"
```
Output:  

```
{
    "summaries": [
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow",
            "revisionNumber": 1,
            "createdAt": 1559247540.292
        },
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Workflow:SecurityFlow",
            "revisionNumber": 3,
            "createdAt": 1548283099.27
        }
    ]
}
```
Per ulteriori informazioni, consulta [Utilizzo dei flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-workflows.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [SearchFlowTemplates AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/search-flow-templates.html)*Command Reference*. 

### `search-system-instances`
<a name="iotthingsgraph_SearchSystemInstances_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`search-system-instances`.

**AWS CLI**  
**Come cercare le istanze di sistema**  
L’esempio `search-system-instances` seguente cerca tutte le istanze di sistema che contengono il sistema specificato.  

```
aws iotthingsgraph search-system-instances \
    --filters name="SYSTEM_TEMPLATE_ID",value="urn:tdm:us-west-2/123456789012/default:System:SecurityFlow"
```
Output:  

```
{
    "summaries": [
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Deployment:DeploymentForSample",
            "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/DeploymentForSample",
            "status": "NOT_DEPLOYED",
            "target": "GREENGRASS",
            "greengrassGroupName": "ThingsGraphGrnGr",
            "createdAt": 1555716314.707,
            "updatedAt": 1555716314.707
        },
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Deployment:MockDeployment",
            "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/MockDeployment",
            "status": "DELETED_IN_TARGET",
            "target": "GREENGRASS",
            "greengrassGroupName": "ThingsGraphGrnGr",
            "createdAt": 1549416462.049,
            "updatedAt": 1549416722.361,
            "greengrassGroupId": "01d04b07-2a51-467f-9d03-0c90b3cdcaaf",
            "greengrassGroupVersionId": "7365aed7-2d3e-4d13-aad8-75443d45eb05"
        },
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Deployment:MockDeployment2",
            "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/MockDeployment2",
            "status": "DEPLOYED_IN_TARGET",
            "target": "GREENGRASS",
            "greengrassGroupName": "ThingsGraphGrnGr",
            "createdAt": 1549572385.774,
            "updatedAt": 1549572418.408,
            "greengrassGroupId": "01d04b07-2a51-467f-9d03-0c90b3cdcaaf",
            "greengrassGroupVersionId": "bfa70ab3-2bf7-409c-a4d4-bc8328ae5b86"
        },
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Deployment:Room215",
            "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/Room215",
            "status": "NOT_DEPLOYED",
            "target": "GREENGRASS",
            "greengrassGroupName": "ThingsGraphGG",
            "createdAt": 1547056918.413,
            "updatedAt": 1547056918.413
        },
        {
            "id": "urn:tdm:us-west-2/123456789012/default:Deployment:Room218",
            "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/Room218",
            "status": "NOT_DEPLOYED",
            "target": "CLOUD",
            "createdAt": 1559249315.208,
            "updatedAt": 1559249315.208
        }
    ]
}
```
Per ulteriori informazioni, consulta [Utilizzo di configurazioni di sistemi e flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-sysdeploy.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [SearchSystemInstances AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/search-system-instances.html)*Command Reference*. 

### `search-system-templates`
<a name="iotthingsgraph_SearchSystemTemplates_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`search-system-templates`.

**AWS CLI**  
**Come cercare il sistema**  
L’esempio `search-system-templates` seguente cerca tutti i sistemi che contengono il flusso specificato.  

```
aws iotthingsgraph search-system-templates \
    --filters name="FLOW_TEMPLATE_ID",value="urn:tdm:us-west-2/123456789012/default:Workflow:SecurityFlow"
```
Output:  

```
{
    "summaries": [
        {
            "id": "urn:tdm:us-west-2/123456789012/default:System:SecurityFlow",
            "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:System/default/SecurityFlow",
            "revisionNumber": 1,
            "createdAt": 1548283099.433
        }
    ]
}
```
Per ulteriori informazioni, consulta [Utilizzo dei flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-workflows.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [SearchSystemTemplates AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/search-system-templates.html)*Command Reference*. 

### `search-things`
<a name="iotthingsgraph_SearchThings_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`search-things`.

**AWS CLI**  
**Come cercare gli elementi associati a dispositivi e modelli di dispositivi**  
L'`search-things`esempio seguente cerca tutti gli elementi associati al HCSR501 MotionSensor dispositivo.  

```
aws iotthingsgraph search-things \
    --entity-id "urn:tdm:aws/examples:Device:HCSR501MotionSensor"
```
Output:  

```
{
    "things": [
        {
            "thingArn": "arn:aws:iot:us-west-2:123456789012:thing/MotionSensor1",
            "thingName": "MotionSensor1"
        },
        {
            "thingArn": "arn:aws:iot:us-west-2:123456789012:thing/TG_MS",
            "thingName": "TG_MS"
        }
    ]
}
```
Per ulteriori informazioni, consulta [Creazione e caricamento di modelli](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-models-gs.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [SearchThings AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/search-things.html)*Command Reference.* 

### `tag-resource`
<a name="iotthingsgraph_TagResource_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`tag-resource`.

**AWS CLI**  
**Come creare un tag per una risorsa**  
L’esempio `tag-resource` seguente rimuove un tag dalla risorsa specificata.  

```
aws iotthingsgraph tag-resource \
    --resource-arn "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/Room218" \
    --tags key="Type",value="Residential"
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Tagging Your AWS IoT Things Graph Resources](https://docs.aws.amazon.com/thingsgraph/latest/ug/tagging-tg.html) nella *AWS IoT Things Graph User Guide*.  
+  Per i dettagli sull'API, consulta [TagResource AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/tag-resource.html)*Command Reference.* 

### `undeploy-system-instance`
<a name="iotthingsgraph_UndeploySystemInstance_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`undeploy-system-instance`.

**AWS CLI**  
**Come annullare l’implementazione di un’istanza di sistema nella relativa destinazione**  
L’esempio `undeploy-system-instance` seguente rimuove un’istanza di sistema dalla relativa destinazione.  

```
aws iotthingsgraph undeploy-system-instance \
    --id "urn:tdm:us-west-2/123456789012/default:Deployment:Room215"
```
Output:  

```
{
    "summary": {
        "id": "urn:tdm:us-west-2/123456789012/default:Deployment:Room215",
        "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/Room215",
        "status": "PENDING_DELETE",
        "target": "GREENGRASS",
        "greengrassGroupName": "ThingsGraphGrnGr",
        "createdAt": 1553189694.255,
        "updatedAt": 1559344549.601,
        "greengrassGroupId": "01d04b07-2a51-467f-9d03-0c90b3cdcaaf",
        "greengrassGroupVersionId": "731b371d-d644-4b67-ac64-3934e99b75d7"
    }
}
```
Per ulteriori informazioni, consulta [Lifecycle Management for AWS IoT Things Graph Entities, Flows, Systems and Deployments](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-lifecycle.html) nella *AWS IoT Things* Graph User Guide.  
+  *Per i dettagli sull'API, consulta [UndeploySystemInstance](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/undeploy-system-instance.html)Command Reference.AWS CLI * 

### `untag-resource`
<a name="iotthingsgraph_UntagResource_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`untag-resource`.

**AWS CLI**  
**Come rimuovere un tag da una risorsa**  
L’esempio `untag-resource` seguente rimuove un tag dalla risorsa specificata.  

```
aws iotthingsgraph untag-resource \
    --resource-arn "arn:aws:iotthingsgraph:us-west-2:123456789012:Deployment/default/Room218" \
    --tag-keys "Type"
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Tagging Your AWS IoT Things Graph Resources](https://docs.aws.amazon.com/thingsgraph/latest/ug/tagging-tg.html) nella *AWS IoT Things Graph User Guide*.  
+  Per i dettagli sull'API, consulta [UntagResource AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/untag-resource.html)*Command Reference.* 

### `update-flow-template`
<a name="iotthingsgraph_UpdateFlowTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`update-flow-template`.

**AWS CLI**  
**Come aggiornare un flusso**  
L’esempio `update-flow-template` seguente aggiorna un flusso (di lavoro). Il valore di `MyFlowDefinition` è il GraphQL che modella il flusso.  

```
aws iotthingsgraph update-flow-template \
    --id "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow" \
    --definition language=GRAPHQL,text="MyFlowDefinition"
```
Output:  

```
{
    "summary": {
        "createdAt": 1559248067.545,
        "id": "urn:tdm:us-west-2/123456789012/default:Workflow:MyFlow",
        "revisionNumber": 2
    }
}
```
Per ulteriori informazioni, consulta [Utilizzo dei flussi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-workflows.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [UpdateFlowTemplate AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/update-flow-template.html)*Command Reference*. 

### `update-system-template`
<a name="iotthingsgraph_UpdateSystemTemplate_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`update-system-template`.

**AWS CLI**  
**Come aggiornare un sistema**  
L’esempio `update-system-template` seguente aggiorna un sistema. Il valore di `MySystemDefinition` è il GraphQL che modella il sistema.  

```
aws iotthingsgraph update-system-template \
    --id "urn:tdm:us-west-2/123456789012/default:System:MySystem" \
    --definition language=GRAPHQL,text="MySystemDefinition"
```
Output:  

```
{
    "summary": {
        "createdAt": 1559249776.254,
        "id": "urn:tdm:us-west-2/123456789012/default:System:MySystem",
        "arn": "arn:aws:iotthingsgraph:us-west-2:123456789012:System/default/MySystem",
        "revisionNumber": 2
    }
}
```
Per ulteriori informazioni, consulta [Creazione dei sistemi](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-sysdeploy-systems.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [UpdateSystemTemplate AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/update-system-template.html)*Command Reference*. 

### `upload-entity-definitions`
<a name="iotthingsgraph_UploadEntityDefinitions_cli_2_topic"></a>

Il seguente esempio di codice mostra come utilizzare`upload-entity-definitions`.

**AWS CLI**  
**Come caricare le definizioni delle entità**  
L’esempio `upload-entity-definitions` seguente carica le definizioni di entità nel tuo namespace. Il valore di `MyEntityDefinitions` è il GraphQL che modella le entità.  

```
aws iotthingsgraph upload-entity-definitions \
    --document language=GRAPHQL,text="MyEntityDefinitions"
```
Output:  

```
{
    "uploadId": "f6294f1e-b109-4bbe-9073-f451a2dda2da"
}
```
Per ulteriori informazioni, consulta [Modellazione delle entità](https://docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-modelmanagement.html) nella *Guida per l’utente di AWS IoT Things Graph*.  
+  Per i dettagli sull'API, consulta [UploadEntityDefinitions AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotthingsgraph/upload-entity-definitions.html)*Command Reference*. 