Class AwsApiProps.Builder
java.lang.Object
software.amazon.awscdk.services.events.targets.AwsApiProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AwsApiProps>
- Enclosing interface:
- AwsApiProps
@Stability(Stable)
public static final class AwsApiProps.Builder
extends Object
implements software.amazon.jsii.Builder<AwsApiProps>
A builder for
AwsApiProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofAwsApiInput.getAction()apiVersion(String apiVersion) Sets the value ofAwsApiInput.getApiVersion()build()Builds the configured instance.catchErrorPattern(String catchErrorPattern) Sets the value ofAwsApiInput.getCatchErrorPattern()parameters(Object parameters) Sets the value ofAwsApiInput.getParameters()policyStatement(PolicyStatement policyStatement) Sets the value ofAwsApiProps.getPolicyStatement()Sets the value ofAwsApiInput.getService()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
policyStatement
Sets the value ofAwsApiProps.getPolicyStatement()- Parameters:
policyStatement- The IAM policy statement to allow the API call. Use only if resource restriction is needed.- Returns:
this
-
action
Sets the value ofAwsApiInput.getAction()- Parameters:
action- The service action to call. This parameter is required.- Returns:
this
-
service
Sets the value ofAwsApiInput.getService()- Parameters:
service- The service to call. This parameter is required.- Returns:
this
-
apiVersion
Sets the value ofAwsApiInput.getApiVersion()- Parameters:
apiVersion- API version to use for the service.- Returns:
this
-
catchErrorPattern
Sets the value ofAwsApiInput.getCatchErrorPattern()- Parameters:
catchErrorPattern- The regex pattern to use to catch API errors. Thecodeproperty of theErrorobject will be tested against this pattern. If there is a match an error will not be thrown.- Returns:
this
-
parameters
Sets the value ofAwsApiInput.getParameters()- Parameters:
parameters- The parameters for the service action.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AwsApiProps>- Returns:
- a new instance of
AwsApiProps - Throws:
NullPointerException- if any required attribute was not provided
-