

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

# ResourcePolicyStatement
<a name="sam-property-function-resourcepolicystatement"></a>

API의 모든 메서드와 경로에 대한 리소스 정책을 구성합니다. 리소스 정책에 대한 자세한 내용은 *API Gateway 개발자 안내서*의 [API Gateway 리소스 정책을 사용하는 액세스 제어](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-resource-policies.html)를 참조하세요.

## 구문
<a name="sam-property-function-resourcepolicystatement-syntax"></a>

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

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

```
  [AwsAccountBlacklist](#sam-function-resourcepolicystatement-awsaccountblacklist): List
  [AwsAccountWhitelist](#sam-function-resourcepolicystatement-awsaccountwhitelist): List
  [CustomStatements](#sam-function-resourcepolicystatement-customstatements): List
  [IntrinsicVpcBlacklist](#sam-function-resourcepolicystatement-intrinsicvpcblacklist): List
  [IntrinsicVpcWhitelist](#sam-function-resourcepolicystatement-intrinsicvpcwhitelist): List
  [IntrinsicVpceBlacklist](#sam-function-resourcepolicystatement-intrinsicvpceblacklist): List
  [IntrinsicVpceWhitelist](#sam-function-resourcepolicystatement-intrinsicvpcewhitelist): List
  [IpRangeBlacklist](#sam-function-resourcepolicystatement-iprangeblacklist): List
  [IpRangeWhitelist](#sam-function-resourcepolicystatement-iprangewhitelist): List
  [SourceVpcBlacklist](#sam-function-resourcepolicystatement-sourcevpcblacklist): List
  [SourceVpcWhitelist](#sam-function-resourcepolicystatement-sourcevpcwhitelist): List
```

## 속성
<a name="sam-property-function-resourcepolicystatement-properties"></a>

 `AwsAccountBlacklist`   <a name="sam-function-resourcepolicystatement-awsaccountblacklist"></a>
차단할 AWS 계정입니다.  
*유형*: 문자열 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `AwsAccountWhitelist`   <a name="sam-function-resourcepolicystatement-awsaccountwhitelist"></a>
허용할 AWS 계정입니다. 이 속성의 예제 사용 예제를 알아보려면 이 페이지 하단의 예제을 참조하세요  
*유형*: 문자열 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `CustomStatements`   <a name="sam-function-resourcepolicystatement-customstatements"></a>
이 API에 적용할 사용자 지정 리소스 정책 설명 목록. 이 속성의 예제 사용 예제를 알아보려면 이 페이지 하단의 예제을 참조하세요  
*유형*: 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `IntrinsicVpcBlacklist`   <a name="sam-function-resourcepolicystatement-intrinsicvpcblacklist"></a>
차단할 Virtual Private Cloud(VPC) )목록입니다. 여기서 각 VPC는 [동적 참조](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html) 또는 `Ref` [내장 함수](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)와 같은 참조로 지정됩니다. 이 속성의 예제 사용 예제를 알아보려면 이 페이지 하단의 예제을 참조하세요  
*유형*: 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `IntrinsicVpcWhitelist`   <a name="sam-function-resourcepolicystatement-intrinsicvpcwhitelist"></a>
[허용할 VPC 목록. 여기서 각 VPC는 [동적 참조](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html) 또는 `Ref` 내장 함수](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)와 같은 참조로 지정됩니다.  
*유형*: 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `IntrinsicVpceBlacklist`   <a name="sam-function-resourcepolicystatement-intrinsicvpceblacklist"></a>
[차단할 VPC 엔드포인트 목록. 여기서 각 VPC 엔드포인트는 [동적 참조](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html) 또는 `Ref` 내장 함수](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)와 같은 참조로 지정됩니다.  
*유형*: 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `IntrinsicVpceWhitelist`   <a name="sam-function-resourcepolicystatement-intrinsicvpcewhitelist"></a>
[허용할 VPC 엔드포인트 목록. 여기서 각 VPC 엔드포인트는 [동적 참조](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html) 또는 `Ref` 내장 함수](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)와 같은 참조로 지정됩니다. 이 속성의 예제 사용 예제를 알아보려면 이 페이지 하단의 예제을 참조하세요  
*유형*: 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `IpRangeBlacklist`   <a name="sam-function-resourcepolicystatement-iprangeblacklist"></a>
차단할 IP 주소 또는 주소 범위. 이 속성의 예제 사용 예제를 알아보려면 이 페이지 하단의 예제을 참조하세요  
*유형*: 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `IpRangeWhitelist`   <a name="sam-function-resourcepolicystatement-iprangewhitelist"></a>
허용할 IP 주소 또는 주소 범위.  
*유형*: 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `SourceVpcBlacklist`   <a name="sam-function-resourcepolicystatement-sourcevpcblacklist"></a>
차단할 소스 VPC 또는 VPC 엔드포인트. 소스 VPC 이름은 `"vpc-"`로 시작하고 소스 VPC 엔드포인트 이름은 `"vpce-"`로 시작해야 합니다. 이 속성의 예제 사용 예제를 알아보려면 이 페이지 하단의 예제을 참조하세요  
*유형*: 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `SourceVpcWhitelist`   <a name="sam-function-resourcepolicystatement-sourcevpcwhitelist"></a>
허용할 소스 VPC 또는 VPC 엔드포인트. 소스 VPC 이름은 `"vpc-"`로 시작하고 소스 VPC 엔드포인트 이름은 `"vpce-"`로 시작해야 합니다.  
*유형*: 목록  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

## 예제
<a name="sam-property-function-resourcepolicystatement--examples"></a>

### 리소스 정책 예시
<a name="sam-property-function-resourcepolicystatement--examples--resource-policy-example"></a>

다음 예제에서는 두 개의 IP 주소와 소스 VPC를 차단하고 AWS 계정을 허용합니다.

#### YAML
<a name="sam-property-function-resourcepolicystatement--examples--resource-policy-example--yaml"></a>

```
Auth:
  ResourcePolicy:
    CustomStatements: [{
                         "Effect": "Allow",
                         "Principal": "*",
                         "Action": "execute-api:Invoke",
                         "Resource": "execute-api:/Prod/GET/pets",
                         "Condition": {
                           "IpAddress": {
                             "aws:SourceIp": "1.2.3.4"
                           }
                         }
                       }]
    IpRangeBlacklist:
      - "10.20.30.40"
      - "1.2.3.4"
    SourceVpcBlacklist:
      - "vpce-1a2b3c4d"
    AwsAccountWhitelist:
      - "111122223333"
    IntrinsicVpcBlacklist:
      - "{{resolve:ssm:SomeVPCReference:1}}" 
      - !Ref MyVPC
    IntrinsicVpceWhitelist:
      - "{{resolve:ssm:SomeVPCEReference:1}}" 
      - !Ref MyVPCE
```