# EventSourceProperty

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
};
```

Golang:

```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

- `properties`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnStateMachine.ApiEventProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnStateMachine.ApiEventProperty.html) | [CfnStateMachine.CloudWatchEventEventProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnStateMachine.CloudWatchEventEventProperty.html) | [CfnStateMachine.EventBridgeRuleEventProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnStateMachine.EventBridgeRuleEventProperty.html) | [CfnStateMachine.ScheduleEventProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnStateMachine.ScheduleEventProperty.html) (required)

- `type`: string (required)
