

Las traducciones son generadas a través de traducción automática. En caso de conflicto entre la traducción y la version original de inglés, prevalecerá la version en inglés.

# AWS::Serverless::SimpleTable
<a name="sam-resource-simpletable"></a>

Crea una tabla de DynamoDB con una clave principal de atributo único. Resulta útil cuando solo es necesario acceder a los datos mediante una clave principal.

Para obtener características más avanzadas, utilice un recurso [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html) en CloudFormation. Estos recursos se pueden utilizar en AWS SAM. Son completos y proporcionan una mayor personalización, como [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-keyschema.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-keyschema.html) y [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-resourcepolicy.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-resourcepolicy.html).

**nota**  
Cuando despliega en AWS CloudFormation, AWS SAM transforma sus AWS SAM recursos en CloudFormation recursos. Para obtener más información, consulte [CloudFormation Recursos generados para AWS SAM](sam-specification-generated-resources.md).

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

Para declarar esta entidad en tu plantilla AWS Serverless Application Model (AWS SAM), usa la siguiente sintaxis.

### 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
```

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

 `PointInTimeRecoverySpecification`   <a name="sam-simpletable-pointintimerecoveryspecification"></a>
La configuración utilizada para habilitar la recuperación a un momento dado.  
*Tipo*: [PointInTimeRecoverySpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-pointintimerecoveryspecification.html)  
*Obligatorio*: no  
*CloudFormation compatibilidad*: esta propiedad se pasa directamente a la `[PointInTimeRecoverySpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-pointintimerecoveryspecification.html)` propiedad de un `AWS::DynamoDB::Table` recurso.

 `PrimaryKey`   <a name="sam-simpletable-primarykey"></a>
Nombre y tipo de atributo que se utilizará como clave principal de la tabla. Si no se proporciona, la clave principal será `String` con un valor de `id`.  
El valor de esta propiedad no se puede modificar después de crear este recurso.
*Tipo:* [PrimaryKeyObject](sam-property-simpletable-primarykeyobject.md)  
*Obligatorio*: no  
*CloudFormation compatibilidad*: esta propiedad es exclusiva AWS SAM y no tiene un CloudFormation equivalente.

 `ProvisionedThroughput`   <a name="sam-simpletable-provisionedthroughput"></a>
Lea y escriba la información de aprovisionamiento de rendimiento.  
Si `ProvisionedThroughput` no se especifica, `BillingMode` se especificará como `PAY_PER_REQUEST`.  
*Tipo:* [ProvisionedThroughputObject](sam-property-simpletable-provisionedthroughputobject.md)  
*Obligatorio*: no  
*CloudFormation compatibilidad*: esta propiedad se pasa directamente a la `[ProvisionedThroughput](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-provisionedthroughput.html)` propiedad de un `AWS::DynamoDB::Table` recurso.

 `SSESpecification`   <a name="sam-simpletable-ssespecification"></a>
Especifica la configuración para habilitar el cifrado del lado del servidor.  
*Tipo:* [SSESpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ssespecification.html)  
*Obligatorio*: no  
*CloudFormation compatibilidad*: esta propiedad se pasa directamente a la `[SSESpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ssespecification.html)` propiedad de un `AWS::DynamoDB::Table` recurso.

 `TableName`   <a name="sam-simpletable-tablename"></a>
Nombre de la tabla de DynamoDB.  
*Tipo:* cadena  
*Obligatorio*: no  
*CloudFormation compatibilidad*: esta propiedad se pasa directamente a la `[TableName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-tablename)` propiedad de un `AWS::DynamoDB::Table` recurso.

 `Tags`   <a name="sam-simpletable-tags"></a>
Un mapa (cadena a cadena) que especifica las etiquetas que se van a añadir a este SimpleTable. Para obtener más información sobre las claves y los valores válidos de las etiquetas, consulta la [etiqueta de recursos](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) en la *Guía del usuario de AWS CloudFormation *.  
*Tipo*: mapa  
*Obligatorio*: no  
*CloudFormation compatibilidad*: esta propiedad es similar a la `[Tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-tags)` propiedad de un `AWS::DynamoDB::Table` recurso. La propiedad Tags de SAM consta de pares clave-valor; en CloudFormation ella, consiste en una lista de objetos Tag.

## valores devueltos
<a name="sam-resource-simpletable-return-values"></a>

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

Cuando se proporciona el ID lógico de este recurso a la función intrínseca Ref, esta devuelve el nombre del recurso de la función de Lambda subyacente.

Para obtener más información sobre el uso de la función `Ref`, consulta [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) en la *Guía del usuario de AWS CloudFormation *. 

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

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

Ejemplo de 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
```

# PrimaryKeyObject
<a name="sam-property-simpletable-primarykeyobject"></a>

El objeto que describe las propiedades de una clave principal.

## Sintaxis
<a name="sam-property-simpletable-primarykeyobject-syntax"></a>

Para declarar esta entidad en tu plantilla AWS Serverless Application Model (AWS SAM), usa la siguiente sintaxis.

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

```
  [Name](#sam-simpletable-primarykeyobject-name): String
  [Type](#sam-simpletable-primarykeyobject-type): String
```

## Propiedades
<a name="sam-property-simpletable-primarykeyobject-properties"></a>

 `Name`   <a name="sam-simpletable-primarykeyobject-name"></a>
Nombre de atributo de la clave principal.  
*Tipo:* cadena  
*Obligatorio*: sí  
*CloudFormation compatibilidad*: esta propiedad se pasa directamente a la `[AttributeName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-attributedef.html#cfn-dynamodb-attributedef-attributename)` propiedad del tipo de `AWS::DynamoDB::Table` `AttributeDefinition` datos.  
*Notas adicionales*: Esta propiedad también se transfiere a la [AttributeName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-keyschema.html#aws-properties-dynamodb-keyschema-attributename)propiedad de un tipo de `AWS::DynamoDB::Table KeySchema` datos.

 `Type`   <a name="sam-simpletable-primarykeyobject-type"></a>
El tipo de datos de la clave principal.  
*Valores válidos*: `String`, `Number`, `Binary`  
*Tipo:* cadena  
*Obligatorio*: sí  
*CloudFormation compatibilidad*: esta propiedad se pasa directamente a la `[AttributeType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-attributedef.html#cfn-dynamodb-attributedef-attributename-attributetype)` propiedad del tipo de `AWS::DynamoDB::Table` `AttributeDefinition` datos.

## Ejemplos
<a name="sam-property-simpletable-primarykeyobject--examples"></a>

### PrimaryKey
<a name="sam-property-simpletable-primarykeyobject--examples--primarykey"></a>

Ejemplo de clave principal

#### YAML
<a name="sam-property-simpletable-primarykeyobject--examples--primarykey--yaml"></a>

```
Properties:
  PrimaryKey:
    Name: MyPrimaryKey
    Type: String
```

# ProvisionedThroughputObject
<a name="sam-property-simpletable-provisionedthroughputobject"></a>

El objeto describe las propiedades de un rendimiento aprovisionado.

## Sintaxis
<a name="sam-property-simpletable-provisionedthroughputobject-syntax"></a>

Para declarar esta entidad en tu plantilla AWS Serverless Application Model (AWS SAM), usa la siguiente sintaxis.

### YAML
<a name="w2aac13c22c41c19b5b5"></a>

```
  [ReadCapacityUnits](#sam-simpletable-provisionedthroughputobject-readcapacityunits): Integer
  [WriteCapacityUnits](#sam-simpletable-provisionedthroughputobject-writecapacityunits): Integer
```

## Propiedades
<a name="sam-property-simpletable-provisionedthroughputobject-properties"></a>

 `ReadCapacityUnits`   <a name="sam-simpletable-provisionedthroughputobject-readcapacityunits"></a>
El número máximo de lecturas altamente coherentes consumidas por segundo antes de que DynamoDB devuelva una excepción `ThrottlingException`.  
*Tipo*: entero  
*Obligatorio*: sí  
*CloudFormation compatibilidad*: esta propiedad se pasa directamente a la `[ReadCapacityUnits](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-provisionedthroughput.html#aws-properties-dynamodb-table-provisionedthroughput-properties)` propiedad del tipo de `AWS::DynamoDB::Table` `ProvisionedThroughput` datos.

 `WriteCapacityUnits`   <a name="sam-simpletable-provisionedthroughputobject-writecapacityunits"></a>
El número máximo de escrituras consumidas por segundo antes de que DynamoDB devuelve una excepción `ThrottlingException`.  
*Tipo*: entero  
*Obligatorio*: sí  
*CloudFormation compatibilidad*: esta propiedad se pasa directamente a la `[WriteCapacityUnits](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-provisionedthroughput.html#aws-properties-dynamodb-table-provisionedthroughput-properties)` propiedad del tipo de `AWS::DynamoDB::Table` `ProvisionedThroughput` datos.

## Ejemplos
<a name="sam-property-simpletable-provisionedthroughputobject--examples"></a>

### ProvisionedThroughput
<a name="sam-property-simpletable-provisionedthroughputobject--examples--provisionedthroughput"></a>

Ejemplo del rendimiento aprovisionado

#### YAML
<a name="sam-property-simpletable-provisionedthroughputobject--examples--provisionedthroughput--yaml"></a>

```
Properties:
   ProvisionedThroughput:
     ReadCapacityUnits: 5
     WriteCapacityUnits: 5
```