Skip to content
v2.277.0

EventSourceProperty Struct ​

Example ​

ts
// 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';
const eventSourceProperty: sam.CfnStateMachine.EventSourceProperty = {
  properties: {
    method: 'method',
    path: 'path',

    // the properties below are optional
    restApiId: 'restApiId',
  },
  type: 'type',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sam as sam

event_source_property = sam.CfnStateMachine.EventSourceProperty(
    properties=sam.CfnStateMachine.ApiEventProperty(
        method="method",
        path="path",

        # the properties below are optional
        rest_api_id="restApiId"
    ),
    type="type"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sam.*;

EventSourceProperty eventSourceProperty = EventSourceProperty.builder()
        .properties(ApiEventProperty.builder()
                .method("method")
                .path("path")

                // the properties below are optional
                .restApiId("restApiId")
                .build())
        .type("type")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SAM;

var eventSourceProperty = new EventSourceProperty {
    Properties = new ApiEventProperty {
        Method = "method",
        Path = "path",

        // the properties below are optional
        RestApiId = "restApiId"
    },
    Type = "type"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

eventSourceProperty := &EventSourceProperty{
	Properties: &ApiEventProperty{
		Method: jsii.String("method"),
		Path: jsii.String("path"),

		// the properties below are optional
		RestApiId: jsii.String("restApiId"),
	},
	Type: jsii.String("type"),
}

Properties ​