class AwsApi
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Events.Targets.AwsApi |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awseventstargets#AwsApi |
![]() | software.amazon.awscdk.services.events.targets.AwsApi |
![]() | aws_cdk.aws_events_targets.AwsApi |
![]() | aws-cdk-lib » aws_events_targets » AwsApi |
Implements
IRule
Use an AWS Lambda function that makes API calls as an event rule target.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_events_targets as events_targets } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
declare const parameters: any;
declare const policyStatement: iam.PolicyStatement;
const awsApi = new events_targets.AwsApi({
action: 'action',
service: 'service',
// the properties below are optional
apiVersion: 'apiVersion',
catchErrorPattern: 'catchErrorPattern',
parameters: parameters,
policyStatement: policyStatement,
});
Initializer
new AwsApi(props: AwsApiProps)
Parameters
- props
Aws
Api Props
Methods
Name | Description |
---|---|
bind(rule, id?) | Returns a RuleTarget that can be used to trigger this AwsApi as a result from an EventBridge event. |
bind(rule, id?)
public bind(rule: IRule, id?: string): RuleTargetConfig
Parameters
- rule
IRule
- id
string
Returns
Returns a RuleTarget that can be used to trigger this AwsApi as a result from an EventBridge event.