

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# ApiStateMachineAuth
<a name="sam-property-statemachine-apistatemachineauth"></a>

特定の API、パス、およびメソッドに対して、イベントレベルで認可を設定します。

## 構文
<a name="sam-property-statemachine-apistatemachineauth-syntax"></a>

 AWS Serverless Application Model (AWS SAM) テンプレートでこのエンティティを宣言するには、次の構文を使用します。

### YAML
<a name="sam-property-statemachine-apistatemachineauth-syntax.yaml"></a>

```
  [ApiKeyRequired](#sam-statemachine-apistatemachineauth-apikeyrequired): {{Boolean}}
  [AuthorizationScopes](#sam-statemachine-apistatemachineauth-authorizationscopes): {{List}}
  [Authorizer](#sam-statemachine-apistatemachineauth-authorizer): {{String}}
  [ResourcePolicy](#sam-statemachine-apistatemachineauth-resourcepolicy): {{ResourcePolicyStatement}}
```

## プロパティ
<a name="sam-property-statemachine-apistatemachineauth-properties"></a>

 `ApiKeyRequired`   <a name="sam-statemachine-apistatemachineauth-apikeyrequired"></a>
この API、パス、およびメソッドの API キーが必要です。  
型: ブール  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `AuthorizationScopes`   <a name="sam-statemachine-apistatemachineauth-authorizationscopes"></a>
この API、パス、およびメソッドに適用する認可スコープです。  
指定するスコープは、`DefaultAuthorizer` プロパティが適用するスコープ (指定されている場合) を上書きします。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `Authorizer`   <a name="sam-statemachine-apistatemachineauth-authorizer"></a>
特定のステートマシンの `Authorizer` です。  
API のグローバルオーソライザーが指定されているときにこのステートマシンを公開したい場合は、`Authorizer` を `NONE` に設定してグローバルオーソライザーを上書きします。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `ResourcePolicy`   <a name="sam-statemachine-apistatemachineauth-resourcepolicy"></a>
API とパスのリソースポリシーを設定します。  
*タイプ*: [ResourcePolicyStatement](sam-property-statemachine-resourcepolicystatement.md)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

## 例
<a name="sam-property-statemachine-apistatemachineauth--examples"></a>

### Statemachine-Auth
<a name="sam-property-statemachine-apistatemachineauth--examples--statemachine-auth"></a>

以下の例は、ステートマシンレベルで認可を指定します。

#### YAML
<a name="sam-property-statemachine-apistatemachineauth--examples--statemachine-auth--yaml"></a>

```
Auth:
  ApiKeyRequired: true
  Authorizer: NONE
```