Class AwsApi.Builder
java.lang.Object
software.amazon.awscdk.services.events.targets.AwsApi.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AwsApi>
- Enclosing class:
AwsApi
@Stability(Stable)
public static final class AwsApi.Builder
extends Object
implements software.amazon.jsii.Builder<AwsApi>
A fluent builder for
AwsApi
.-
Method Summary
Modifier and TypeMethodDescriptionThe service action to call.apiVersion
(String apiVersion) Deprecated.the handler code was migrated to AWS SDK for JavaScript v3, which does not support this feature anymorebuild()
catchErrorPattern
(String catchErrorPattern) The regex pattern to use to catch API errors.static AwsApi.Builder
create()
parameters
(Object parameters) The parameters for the service action.policyStatement
(PolicyStatement policyStatement) The IAM policy statement to allow the API call.The service to call.
-
Method Details
-
create
- Returns:
- a new instance of
AwsApi.Builder
.
-
action
The service action to call.- Parameters:
action
- The service action to call. This parameter is required.- Returns:
this
- See Also:
-
service
The service to call.- Parameters:
service
- The service to call. This parameter is required.- Returns:
this
- See Also:
-
apiVersion
Deprecated.the handler code was migrated to AWS SDK for JavaScript v3, which does not support this feature anymore(deprecated) API version to use for the service.- Parameters:
apiVersion
- API version to use for the service. This parameter is required.- Returns:
this
-
catchErrorPattern
The regex pattern to use to catch API errors.The
code
property of theError
object will be tested against this pattern. If there is a match an error will not be thrown.Default: - do not catch errors
- Parameters:
catchErrorPattern
- The regex pattern to use to catch API errors. This parameter is required.- Returns:
this
-
parameters
The parameters for the service action.Default: - no parameters
- Parameters:
parameters
- The parameters for the service action. This parameter is required.- Returns:
this
- See Also:
-
policyStatement
The IAM policy statement to allow the API call.Use only if resource restriction is needed.
Default: - extract the permission from the API call
- Parameters:
policyStatement
- The IAM policy statement to allow the API call. This parameter is required.- Returns:
this
-
build
-