

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# ApiUsagePlan
<a name="sam-property-api-apiusageplan"></a>

Konfiguriert einen Nutzungsplan für eine API-Gateway-API. Weitere Informationen zu Nutzungsplänen finden Sie unter [Nutzungspläne mit API-Schlüsseln erstellen und verwenden](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) im *API Gateway Developer Guide*.

## Syntax
<a name="sam-property-api-apiusageplan-syntax"></a>

Verwenden Sie die folgende Syntax, um diese Entität in Ihrer Vorlage AWS Serverless Application Model (AWS SAM) zu deklarieren.

### YAML
<a name="sam-property-api-apiusageplan-syntax.yaml"></a>

```
  [CreateUsagePlan](#sam-api-apiusageplan-createusageplan): String
  [Description](#sam-api-apiusageplan-description): String
  [Quota](#sam-api-apiusageplan-quota): [QuotaSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-quota)
  [Tags](#sam-api-apiusageplan-tags): List
  [Throttle](#sam-api-apiusageplan-throttle): [ThrottleSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-throttle)
  [UsagePlanName](#sam-api-apiusageplan-usageplanname): String
```

## Eigenschaften
<a name="sam-property-api-apiusageplan-properties"></a>

 `CreateUsagePlan`   <a name="sam-api-apiusageplan-createusageplan"></a>
Legt fest, wie dieser Nutzungsplan konfiguriert ist. Gültige Werte sind `PER_API`, `SHARED` und `NONE`.  
`PER_API`erstellt [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html), und [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplankey.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplankey.html)Ressourcen, die für diese API spezifisch sind. Diese Ressourcen haben IDs den logischen Wert von `<api-logical-id>UsagePlan` `<api-logical-id>ApiKey``<api-logical-id>UsagePlanKey`, und.  
`SHARED`erstellt [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html), und [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplankey.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplankey.html)Ressourcen, die von allen APIs gemeinsam genutzt werden, die auch `CreateUsagePlan: SHARED` in derselben AWS SAM Vorlage enthalten sind. Diese Ressourcen haben IDs den logischen Wert von `ServerlessUsagePlan` `ServerlessApiKey``ServerlessUsagePlanKey`, und. Wenn Sie diese Option verwenden, empfehlen wir, zusätzliche Konfigurationen für diesen Nutzungsplan nur für eine API-Ressource hinzuzufügen, um widersprüchliche Definitionen und einen unsicheren Status zu vermeiden.  
`NONE`deaktiviert die Erstellung oder Verknüpfung eines Nutzungsplans mit dieser API. Dies ist nur erforderlich, wenn `SHARED` oder in der [Abschnitt „Globals“ der Vorlage AWS SAM](sam-specification-template-anatomy-globals.md) angegeben `PER_API` ist.  
*Zulässige Werte*: `PER_API`, `SHARED` und `NONE`  
*Typ:* Zeichenfolge  
*Erforderlich*: Ja  
*CloudFormation Kompatibilität*: Diese Eigenschaft ist einzigartig für AWS SAM und hat kein CloudFormation Äquivalent.

 `Description`   <a name="sam-api-apiusageplan-description"></a>
Eine Beschreibung des Nutzungsplans.  
*Typ:* Zeichenfolge  
*Required*: No  
*CloudFormation Kompatibilität*: Diese Eigenschaft wird direkt an die `[Description](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-description)` Eigenschaft einer `AWS::ApiGateway::UsagePlan` Ressource übergeben.

 `Quota`   <a name="sam-api-apiusageplan-quota"></a>
Konfiguriert die Anzahl von Anforderungen, die Benutzer innerhalb eines bestimmten Intervalls vornehmen können.  
*Typ:* [QuotaSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-quota)  
*Required*: No  
*CloudFormation Kompatibilität*: Diese Eigenschaft wird direkt an die `[Quota](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-quota)` Eigenschaft einer `AWS::ApiGateway::UsagePlan` Ressource übergeben.

 `Tags`   <a name="sam-api-apiusageplan-tags"></a>
Ein Array an beliebigen Tags (Schlüssel-Wert-Paaren), die dem Nutzungsplan zugewiesen werden sollen.  
Diese Eigenschaft verwendet den [CloudFormation Tag-Typ](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).  
*Typ*: Liste  
*Required*: No  
*CloudFormation Kompatibilität*: Diese Eigenschaft wird direkt an die `[Tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-tags)` Eigenschaft einer `AWS::ApiGateway::UsagePlan` Ressource übergeben.

 `Throttle`   <a name="sam-api-apiusageplan-throttle"></a>
Konfiguriert die gesamte Anforderungsrate (durchschnittliche Anforderungen pro Sekunde) und die Steigerungskapazität.  
*Typ:* [ThrottleSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-throttle)  
*Required*: No  
*CloudFormation Kompatibilität*: Diese Eigenschaft wird direkt an die `[Throttle](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-throttle)` Eigenschaft einer `AWS::ApiGateway::UsagePlan` Ressource übergeben.

 `UsagePlanName`   <a name="sam-api-apiusageplan-usageplanname"></a>
Ein Name für den Nutzungsplan.  
*Typ:* Zeichenfolge  
*Required*: No  
*CloudFormation Kompatibilität*: Diese Eigenschaft wird direkt an die `[UsagePlanName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-usageplanname)` Eigenschaft einer `AWS::ApiGateway::UsagePlan` Ressource übergeben.

## Beispiele
<a name="sam-property-api-apiusageplan--examples"></a>

### UsagePlan
<a name="sam-property-api-apiusageplan--examples--usageplan"></a>

Im Folgenden finden Sie ein Beispiel für einen Nutzungsplan.

#### YAML
<a name="sam-property-api-apiusageplan--examples--usageplan--yaml"></a>

```
Auth:
  UsagePlan:
    CreateUsagePlan: PER_API
    Description: Usage plan for this API
    Quota:
      Limit: 500
      Period: MONTH
    Throttle:
      BurstLimit: 100
      RateLimit: 50
    Tags:
      - Key: TagName
        Value: TagValue
```