Interface ApiGatewayProps

All Superinterfaces:, TargetBaseProps
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:38.454Z") @Stability(Stable) public interface ApiGatewayProps extends, TargetBaseProps
Customize the API Gateway Event Target.


 Rule rule = Rule.Builder.create(this, "Rule")
 Function fn = Function.Builder.create(this, "MyFunc")
         .code(Code.fromInline("exports.handler = e => {}"))
 LambdaRestApi restApi = LambdaRestApi.Builder.create(this, "MyRestAPI").handler(fn).build();
 Queue dlq = new Queue(this, "DeadLetterQueue");
                 "Header1", "header1"))
                 "QueryParam1", "query-param-1"))
  • Method Details

    • getEventRole

      @Stability(Stable) @Nullable default IRole getEventRole()
      The role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.

      Default: - a new role will be created

    • getHeaderParameters

      @Stability(Stable) @Nullable default Map<String,String> getHeaderParameters()
      The headers to be set when requesting API.

      Default: no header parameters

    • getMethod

      @Stability(Stable) @Nullable default String getMethod()
      The method for api resource invoked by the rule.

      Default: '*' that treated as ANY

    • getPath

      @Stability(Stable) @Nullable default String getPath()
      The api resource invoked by the rule.

      We can use wildcards('*') to specify the path. In that case, an equal number of real values must be specified for pathParameterValues.

      Default: '/'

    • getPathParameterValues

      @Stability(Stable) @Nullable default List<String> getPathParameterValues()
      The path parameter values to be used to populate to wildcards("*") of requesting api path.

      Default: no path parameters

    • getPostBody

      @Stability(Stable) @Nullable default RuleTargetInput getPostBody()
      This will be the post request body send to the API.

      Default: the entire EventBridge event

    • getQueryStringParameters

      @Stability(Stable) @Nullable default Map<String,String> getQueryStringParameters()
      The query parameters to be set when requesting API.

      Default: no querystring parameters

    • getStage

      @Stability(Stable) @Nullable default String getStage()
      The deploy stage of api gateway invoked by the rule.

      Default: the value of deploymentStage.stageName of target api gateway.

    • builder

      @Stability(Stable) static ApiGatewayProps.Builder builder()
      a ApiGatewayProps.Builder of ApiGatewayProps