interface AwsApiProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Events.Targets.AwsApiProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awseventstargets#AwsApiProps |
Java | software.amazon.awscdk.services.events.targets.AwsApiProps |
Python | aws_cdk.aws_events_targets.AwsApiProps |
TypeScript (source) | aws-cdk-lib » aws_events_targets » AwsApiProps |
Properties for an AwsApi 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 awsApiProps: events_targets.AwsApiProps = {
action: 'action',
service: 'service',
// the properties below are optional
apiVersion: 'apiVersion',
catchErrorPattern: 'catchErrorPattern',
parameters: parameters,
policyStatement: policyStatement,
};
Properties
Name | Type | Description |
---|---|---|
action | string | The service action to call. |
service | string | The service to call. |
api | string | API version to use for the service. |
catch | string | The regex pattern to use to catch API errors. |
parameters? | any | The parameters for the service action. |
policy | Policy | The IAM policy statement to allow the API call. |
action
Type:
string
The service action to call.
See also: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
service
Type:
string
The service to call.
See also: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
apiVersion?
⚠️ Deprecated: the handler code was migrated to AWS SDK for JavaScript v3, which does not support this feature anymore
Type:
string
(optional)
API version to use for the service.
catchErrorPattern?
Type:
string
(optional, default: do not catch errors)
The regex pattern to use to catch API errors.
The code
property of the
Error
object will be tested against this pattern. If there is a match an
error will not be thrown.
parameters?
Type:
any
(optional, default: no parameters)
The parameters for the service action.
See also: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
policyStatement?
Type:
Policy
(optional, default: extract the permission from the API call)
The IAM policy statement to allow the API call.
Use only if resource restriction is needed.