interface ApiEventProperty
| Language | Type name | 
|---|---|
  .NET | Amazon.CDK.AWS.SAM.CfnFunction.ApiEventProperty | 
  Go | github.com/aws/aws-cdk-go/awscdk/v2/awssam#CfnFunction_ApiEventProperty | 
  Java | software.amazon.awscdk.services.sam.CfnFunction.ApiEventProperty | 
  Python | aws_cdk.aws_sam.CfnFunction.ApiEventProperty | 
  TypeScript  | aws-cdk-lib » aws_sam » CfnFunction » ApiEventProperty | 
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sam as sam } from 'aws-cdk-lib';
declare const customStatements: any;
const apiEventProperty: sam.CfnFunction.ApiEventProperty = {
  method: 'method',
  path: 'path',
  // the properties below are optional
  auth: {
    apiKeyRequired: false,
    authorizationScopes: ['authorizationScopes'],
    authorizer: 'authorizer',
    resourcePolicy: {
      awsAccountBlacklist: ['awsAccountBlacklist'],
      awsAccountWhitelist: ['awsAccountWhitelist'],
      customStatements: [customStatements],
      intrinsicVpcBlacklist: ['intrinsicVpcBlacklist'],
      intrinsicVpceBlacklist: ['intrinsicVpceBlacklist'],
      intrinsicVpceWhitelist: ['intrinsicVpceWhitelist'],
      intrinsicVpcWhitelist: ['intrinsicVpcWhitelist'],
      ipRangeBlacklist: ['ipRangeBlacklist'],
      ipRangeWhitelist: ['ipRangeWhitelist'],
      sourceVpcBlacklist: ['sourceVpcBlacklist'],
      sourceVpcWhitelist: ['sourceVpcWhitelist'],
    },
  },
  requestModel: {
    model: 'model',
    // the properties below are optional
    required: false,
    validateBody: false,
    validateParameters: false,
  },
  requestParameters: ['requestParameters'],
  restApiId: 'restApiId',
};
Properties
| Name | Type | Description | 
|---|---|---|
| method | string | |
| path | string | |
| auth? | IResolvable | Auth | |
| request | IResolvable | Request | |
| request | IResolvable | (string | IResolvable | Request)[] | |
| rest | string | 
method
Type:
string
path
Type:
string
auth?
Type:
IResolvable | Auth
(optional)
requestModel?
Type:
IResolvable | Request
(optional)
requestParameters?
Type:
IResolvable | (string | IResolvable | Request)[]
(optional)
restApiId?
Type:
string
(optional)

 .NET
 Go
 Java
 Python
 TypeScript