

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

# EventSource
<a name="sam-property-function-eventsource"></a>

L'oggetto che descrive l'origine degli eventi che attivano la funzione. Ogni evento è costituito da un tipo e da un insieme di proprietà che dipendono da quel tipo. Per ulteriori informazioni sulle proprietà di ciascuna fonte di eventi, consultate l'argomento corrispondente a quel tipo.

## Sintassi
<a name="sam-property-function-eventsource-syntax"></a>

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

### YAML
<a name="sam-property-function-eventsource-syntax.yaml"></a>

```
  [Properties](#sam-function-eventsource-properties): {{AlexaSkill | Api | CloudWatchEvent | CloudWatchLogs | Cognito | DocumentDB | DynamoDB | EventBridgeRule | HttpApi | IoTRule | Kinesis | MQ | MSK | S3 | Schedule | ScheduleV2 | SelfManagedKafka | SNS | SQS}}
  [Type](#sam-function-eventsource-type): {{String}}
```

## Properties
<a name="sam-property-function-eventsource-properties"></a>

 `Properties`   <a name="sam-function-eventsource-properties"></a>
Oggetto che descrive le proprietà di questa mappatura degli eventi. L'insieme di proprietà deve essere conforme al tipo definito.  
*Tipo* [[[[: [AlexaSkill](sam-property-function-alexaskill.md)\| [Api](sam-property-function-api.md) \| \| [CloudWatchEvent](sam-property-function-cloudwatchevent.md)\| [Cognito [CloudWatchLogs](sam-property-function-cloudwatchlogs.md)](sam-property-function-cognito.md)\| DocumentDB \| [[DynamoDB](sam-property-function-dynamodb.md)](sam-property-function-documentdb.md) \| \| [Io \| Kinesis \| [MQ EventBridgeRule[EventBridgeRule](sam-property-function-eventbridgerule.md)](sam-property-function-msk.md) \| MSK HttpApi[HttpApi](sam-property-function-httpapi.md) \| S3 TRule](sam-property-function-iotrule.md)[\| Pianificazione](sam-property-function-kinesis.md)[\| ScheduleV2 [\|](sam-property-function-mq.md) \| SNS \| SQS [SelfManagedKafka](sam-property-function-selfmanagedkafka.md)](sam-property-function-s3.md)](sam-property-function-sqs.md)](sam-property-function-sns.md)](sam-property-function-schedulev2.md)](sam-property-function-schedule.md)  
*Obbligatorio:* sì  
*CloudFormation compatibilità*: Questa proprietà è unica e non ha un equivalente. AWS SAM CloudFormation 

 `Type`   <a name="sam-function-eventsource-type"></a>
Il tipo di evento,  
*Valori validi*: `AlexaSkill` `Api``CloudWatchEvent`,`CloudWatchLogs`,`Cognito`,`DocumentDB`,`DynamoDB`,`EventBridgeRule`,`HttpApi`,`IoTRule`,`Kinesis`, `MQ``MSK`,`S3`,`Schedule`,`ScheduleV2`,`SelfManagedKafka`,`SNS`, `SQS`  
▬*Tipo:* stringa  
*Obbligatorio:* sì  
*CloudFormation compatibilità*: questa proprietà è unica AWS SAM e non ha un CloudFormation equivalente.

## Esempi
<a name="sam-property-function-eventsource--examples"></a>

### APIEvent
<a name="sam-property-function-eventsource--examples--apievent"></a>

Esempio di utilizzo di un evento API

#### YAML
<a name="sam-property-function-eventsource--examples--apievent--yaml"></a>

```
ApiEvent:
  Type: Api
  Properties:
    Method: get
    Path: /group/{user}
    RestApiId: 
      Ref: MyApi
```