

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Api
<a name="sam-property-statemachine-statemachineapi"></a>

`Api` 이벤트 소스 유형을 설명하는 객체. [AWS::Serverless::Api](sam-resource-api.md) 리소스가 정의된 경우 경로 및 메서드 값은 API의 OpenAPI 정의에 있는 작업과 일치해야 합니다.

## 구문
<a name="sam-property-statemachine-statemachineapi-syntax"></a>

 AWS Serverless Application Model (AWS SAM) 템플릿에서이 개체를 선언하려면 다음 구문을 사용합니다.

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

```
  [Auth](#sam-statemachine-statemachineapi-auth): ApiStateMachineAuth
  [Method](#sam-statemachine-statemachineapi-method): String
  [Path](#sam-statemachine-statemachineapi-path): String
  [RestApiId](#sam-statemachine-statemachineapi-restapiid): String
  UnescapeMappingTemplate: Boolean
```

## 속성
<a name="sam-property-statemachine-statemachineapi-properties"></a>

 `Auth`   <a name="sam-statemachine-statemachineapi-auth"></a>
이 API, 경로 및 메서드의 권한 부여 구성.  
이 속성을 사용하면 `DefaultAuthorizer`가 지정되지 않은 경우 개별 경로에 대한 API의 `DefaultAuthorizer` 설정을 재정의하거나 기본 `ApiKeyRequired` 설정을 재정의할 수 있습니다.  
*유형*: [ApiStateMachineAuth](sam-property-statemachine-apistatemachineauth.md)  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `Method`   <a name="sam-statemachine-statemachineapi-method"></a>
이 함수가 호출되는 HTTP 메서드.  
*유형*: 문자열  
*필수 항목 여부:* 예  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `Path`   <a name="sam-statemachine-statemachineapi-path"></a>
이 함수가 호출되는 Uri 경로입니다. `/`로 값을 시작합니다.  
*유형*: 문자열  
*필수 항목 여부:* 예  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `RestApiId`   <a name="sam-statemachine-statemachineapi-restapiid"></a>
`RestApi` 리소스의 식별자로, 지정된 경로와 메서드를 사용하는 작업이 포함되어야 합니다. 일반적으로 이 템플릿에 정의된 [AWS::Serverless::Api](sam-resource-api.md) 리소스를 참조하도록 설정됩니다.  
이 속성을 정의하지 않으면는 생성된 `OpenApi` 문서를 사용하여 기본 [AWS::Serverless::Api](sam-resource-api.md) 리소스를 AWS SAM 생성합니다. 해당 리소스에는 `RestApiId`를 지정하지 않은 동일한 템플릿의 `Api` 이벤트에 의해 정의된 모든 경로와 메서드가 통합되어 있습니다.  
이 속성은 다른 템플릿에 정의된 [AWS::Serverless::Api](sam-resource-api.md) 리소스를 참조할 수 없습니다.  
*유형*: 문자열  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `UnescapeMappingTemplate`   <a name="sam-statemachine-statemachineapi-unescapemappingtemplate"></a>
상태 시스템에 전달되는 입력에서 `\'`를 `'`로 대체하여 이스케이프 해제합니다. 입력에 작은따옴표가 포함된 경우 사용합니다.  
`False`로 설정되었고 입력에 작은따옴표가 포함된 경우 오류가 발생합니다.
*유형*: 부울  
*필수 항목 여부*: 아니요  
*기본값*: False  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 동등한 속성이 CloudFormation 없습니다.

## 예제
<a name="sam-property-statemachine-statemachineapi--examples"></a>

### ApiEvent
<a name="sam-property-statemachine-statemachineapi--examples--apievent"></a>

다음은 `Api` 유형의 이벤트 예입니다.

#### YAML
<a name="sam-property-statemachine-statemachineapi--examples--apievent--yaml"></a>

```
Events:
  ApiEvent:
    Type: Api
    Properties:
      Path: /path
      Method: get
```