aws-cdk-lib.aws_sam.CfnFunction.ApiEventProperty

interface ApiEventProperty

LanguageType name
.NETAmazon.CDK.AWS.SAM.CfnFunction.ApiEventProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssam#CfnFunction_ApiEventProperty
Javasoftware.amazon.awscdk.services.sam.CfnFunction.ApiEventProperty
Pythonaws_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

NameTypeDescription
methodstringCfnFunction.ApiEventProperty.Method.
pathstringCfnFunction.ApiEventProperty.Path.
auth?IResolvable | AuthPropertyCfnFunction.ApiEventProperty.Auth.
requestModel?IResolvable | RequestModelPropertyCfnFunction.ApiEventProperty.RequestModel.
requestParameters?IResolvable | string | IResolvable | RequestParameterProperty[]CfnFunction.ApiEventProperty.RequestParameters.
restApiId?stringCfnFunction.ApiEventProperty.RestApiId.

method

Type: string

CfnFunction.ApiEventProperty.Method.


path

Type: string

CfnFunction.ApiEventProperty.Path.


auth?

Type: IResolvable | AuthProperty (optional)

CfnFunction.ApiEventProperty.Auth.


requestModel?

Type: IResolvable | RequestModelProperty (optional)

CfnFunction.ApiEventProperty.RequestModel.


requestParameters?

Type: IResolvable | string | IResolvable | RequestParameterProperty[] (optional)

CfnFunction.ApiEventProperty.RequestParameters.


restApiId?

Type: string (optional)

CfnFunction.ApiEventProperty.RestApiId.