

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::Serverless::SimpleTable

Crea una tabella DynamoDB con una chiave primaria ad attributo singolo. È utile quando è necessario accedere ai dati solo tramite una chiave primaria.

Per funzionalità più avanzate, usa un [AWS::DynamoDB::Table](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html) risorsa in CloudFormation. Queste risorse possono essere utilizzate in AWS SAM. Sono completi e forniscono ulteriori personalizzazioni, tra cui [key schema](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-keyschema.html) e [resource policy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-resourcepolicy.html) personalizzazione.

Questa risorsa supporta anche `Connectors` risorsa `Attribute`. Per ulteriori informazioni, consulta [Gestione delle autorizzazioni delle risorse con AWS SAM connettori](managing-permissions-connectors.md).

**Nota**  
Quando esegui il deployment su AWS CloudFormation, AWS SAM trasforma il tuo AWS SAM risorse in CloudFormation risorse. Per ulteriori informazioni, consulta [Generato CloudFormation risorse per AWS SAM](sam-specification-generated-resources.md).

## Sintassi
<a name="sam-resource-simpletable-syntax"></a>

Per dichiarare questa entità nel tuo AWS Serverless Application Model (AWS SAM) modello, utilizzare la seguente sintassi.

### YAML
<a name="sam-resource-simpletable-syntax.yaml"></a>

```
Type: AWS::Serverless::SimpleTable
Properties:
  PointInTimeRecoverySpecification: {{[PointInTimeRecoverySpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-pointintimerecoveryspecification.html)}}
  [PrimaryKey](#sam-simpletable-primarykey): {{PrimaryKeyObject}}
  [ProvisionedThroughput](#sam-simpletable-provisionedthroughput): {{ProvisionedThroughputObject}}
  [SSESpecification](#sam-simpletable-ssespecification): {{[SSESpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ssespecification.html)}}
  [TableName](#sam-simpletable-tablename): {{String}}
  [Tags](#sam-simpletable-tags): {{Map}}
```

## Properties
<a name="sam-resource-simpletable-properties"></a>

 `PointInTimeRecoverySpecification`   <a name="sam-simpletable-pointintimerecoveryspecification"></a>
Le impostazioni utilizzate per consentire il ripristino point-in-time.  
*Digitare*: [ PointInTimeRecoverySpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-pointintimerecoveryspecification.html)  
*Obbligatorio:* no  
*CloudFormation compatibilità*: Questa proprietà viene passata direttamente al `[PointInTimeRecoverySpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-pointintimerecoveryspecification.html)` proprietà di un `AWS::DynamoDB::Table` risorsa.

 `PrimaryKey`   <a name="sam-simpletable-primarykey"></a>
Nome e tipo di attributo da utilizzare come chiave primaria della tabella. Se non viene fornita, la chiave primaria sarà una `String` con un valore di `id`.  
Il valore di questa proprietà non può essere modificato dopo la creazione della risorsa.
*Tipo:* [PrimaryKeyObject](sam-property-simpletable-primarykeyobject.md)  
*Obbligatorio:* no  
*CloudFormation compatibilità*: Questa proprietà è unica per AWS SAM e non ha un CloudFormation equivalente.

 `ProvisionedThroughput`   <a name="sam-simpletable-provisionedthroughput"></a>
Leggere e scrivere informazioni sul throughput provisioning.  
Se `ProvisionedThroughput` non è specificato `BillingMode` sarà specificato come `PAY_PER_REQUEST`.  
*Tipo:* [ProvisionedThroughputObject](sam-property-simpletable-provisionedthroughputobject.md)  
*Obbligatorio:* no  
*CloudFormation compatibilità*: Questa proprietà viene passata direttamente al `[ProvisionedThroughput](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-provisionedthroughput.html)` proprietà di un `AWS::DynamoDB::Table` risorsa.

 `SSESpecification`   <a name="sam-simpletable-ssespecification"></a>
Specifica le impostazioni per abilitare la crittografia lato server.  
*Type*: [SSESpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ssespecification.html)  
*Obbligatorio:* no  
*CloudFormation compatibilità*: Questa proprietà viene passata direttamente al `[SSESpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ssespecification.html)` proprietà di un `AWS::DynamoDB::Table` risorsa.

 `TableName`   <a name="sam-simpletable-tablename"></a>
Nome per la tabella DynamoDB.  
▬*Tipo:* stringa  
*Obbligatorio:* no  
*CloudFormation compatibilità*: Questa proprietà viene passata direttamente al `[TableName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-tablename)` proprietà di un `AWS::DynamoDB::Table` risorsa.

 `Tags`   <a name="sam-simpletable-tags"></a>
Una mappa (da stringa a stringa) che specifica i tag da aggiungere a questa SimpleTable. Per informazioni dettagliate sulle chiavi e sui valori validi per i tag, vedi [Tag di risorsa](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) nel *AWS CloudFormation Guida per l'utente*.  
*Tipo*: Mappa  
*Obbligatorio:* no  
*CloudFormation compatibilità*: Questa proprietà è simile alla `[Tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-tags)` proprietà di un `AWS::DynamoDB::Table` risorsa. La proprietà Tags in SAM è composta da Key:Value coppie; in CloudFormation è costituito da un elenco di oggetti Tag.

## Valori restituiti
<a name="sam-resource-simpletable-return-values"></a>

### Ref
<a name="sam-resource-simpletable-return-values-ref"></a>

Quando l'ID logico di questa risorsa viene fornito alla funzione intrinseca Ref, restituisce il nome della risorsa della tabella DynamoDB sottostante.

Per ulteriori informazioni sull'uso di `Ref` funzione, vedere [`Ref`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) nel *AWS CloudFormation Guida per l'utente*. 

## Esempi
<a name="sam-resource-simpletable--examples"></a>

### SimpleTableExample
<a name="sam-resource-simpletable--examples--simpletableexample"></a>

Esempio di a SimpleTable

#### YAML
<a name="sam-resource-simpletable--examples--simpletableexample--yaml"></a>

```
Properties:
  TableName: my-table
  PrimaryKey:
    Name: MyPrimaryKey
    Type: String
  ProvisionedThroughput:
    ReadCapacityUnits: {{5}}
    WriteCapacityUnits: {{5}}
  Tags:
    Department: Engineering
    AppType: Serverless
```