

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# ApiKeys
<a name="sam-property-graphqlapi-apikeys"></a>

建立唯一金鑰，可用於執行需要 API 金鑰GraphQL的操作。

## 語法
<a name="sam-property-graphqlapi-apikeys-syntax"></a>

若要在 AWS Serverless Application Model (AWS SAM) 範本中宣告此實體，請使用下列語法。

### YAML
<a name="sam-property-graphqlapi-apikeys-syntax-yaml"></a>

```
LogicalId:
  ApiKeyId: String
  Description: String
  ExpiresOn: Double
```

## Properties
<a name="sam-property-graphqlapi-apikeys-properties"></a>

`ApiKeyId`  <a name="sam-graphqlapi-apikeys-apikeyid"></a>
API 金鑰的唯一名稱。指定 以覆寫 `LogicalId`值。  
*類型：*字串  
*必要*：是  
*CloudFormation 相容性*：此屬性會直接傳遞至 `AWS::AppSync::ApiKey` 資源的 `[ApiKeyId](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-apikeyid)` 屬性。

`Description`  <a name="sam-graphqlapi-apikeys-description"></a>
描述您的 API 金鑰。  
*類型：*字串  
*必要*：否  
*CloudFormation 相容性*：此屬性會直接傳遞至 `AWS::AppSync::ApiKey` 資源的 `[Description](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-description)` 屬性。

`ExpiresOn`  <a name="sam-graphqlapi-apikeys-expireson"></a>
API 金鑰的到期時間。日期以自 epoch 以來的秒數表示，四捨五入至最接近的整點。  
*類型*：Double  
*必要*：否  
*CloudFormation 相容性*：此屬性會直接傳遞至 `AWS::AppSync::ApiKey` 資源的 `[Expires](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-expires)` 屬性。

`LogicalId`  <a name="sam-graphqlapi-apikeys-logicalid"></a>
API 金鑰的唯一名稱。  
*類型：*字串  
*必要*：是  
*CloudFormation 相容性*：此屬性會直接傳遞至 `AWS::AppSync::ApiKey` 資源的 `[ApiKeyId](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-apikeyid)` 屬性。