software.amazon.awsconstructs.services.apigatewaylambda.ApiGatewayToLambda Maven / Gradle / Ivy
Show all versions of apigatewaylambda Show documentation
package software.amazon.awsconstructs.services.apigatewaylambda;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.92.0 (build db7f27d)", date = "2023-12-01T15:55:27.055Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.apigatewaylambda.$Module.class, fqn = "@aws-solutions-constructs/aws-apigateway-lambda.ApiGatewayToLambda")
public class ApiGatewayToLambda extends software.constructs.Construct {
protected ApiGatewayToLambda(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected ApiGatewayToLambda(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope - represents the scope for all the resources.
This parameter is required.
* @param id - this is a a scope-unique id.
This parameter is required.
* @param props - user provided props for the construct.
This parameter is required.
*/
public ApiGatewayToLambda(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awsconstructs.services.apigatewaylambda.ApiGatewayToLambdaProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apigateway.RestApi getApiGateway() {
return software.amazon.jsii.Kernel.get(this, "apiGateway", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apigateway.RestApi.class));
}
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.logs.LogGroup getApiGatewayLogGroup() {
return software.amazon.jsii.Kernel.get(this, "apiGatewayLogGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.LogGroup.class));
}
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.Function getLambdaFunction() {
return software.amazon.jsii.Kernel.get(this, "lambdaFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Function.class));
}
public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.Role getApiGatewayCloudWatchRole() {
return software.amazon.jsii.Kernel.get(this, "apiGatewayCloudWatchRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.Role.class));
}
/**
* A fluent builder for {@link software.amazon.awsconstructs.services.apigatewaylambda.ApiGatewayToLambda}.
*/
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope - represents the scope for all the resources.
This parameter is required.
* @param id - this is a a scope-unique id.
This parameter is required.
*/
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final software.amazon.awsconstructs.services.apigatewaylambda.ApiGatewayToLambdaProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new software.amazon.awsconstructs.services.apigatewaylambda.ApiGatewayToLambdaProps.Builder();
}
/**
* Optional user-provided props to override the default props for the API.
*
* Default: - Default props are used.
*
* @return {@code this}
* @param apiGatewayProps Optional user-provided props to override the default props for the API. This parameter is required.
*/
public Builder apiGatewayProps(final java.lang.Object apiGatewayProps) {
this.props.apiGatewayProps(apiGatewayProps);
return this;
}
/**
* Existing instance of Lambda Function object, providing both this and lambdaFunctionProps
will cause an error.
*
* Default: - None
*
* @return {@code this}
* @param existingLambdaObj Existing instance of Lambda Function object, providing both this and lambdaFunctionProps
will cause an error. This parameter is required.
*/
public Builder existingLambdaObj(final software.amazon.awscdk.services.lambda.Function existingLambdaObj) {
this.props.existingLambdaObj(existingLambdaObj);
return this;
}
/**
* User provided props to override the default props for the Lambda function.
*
* Default: - Default props are used.
*
* @return {@code this}
* @param lambdaFunctionProps User provided props to override the default props for the Lambda function. This parameter is required.
*/
public Builder lambdaFunctionProps(final software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) {
this.props.lambdaFunctionProps(lambdaFunctionProps);
return this;
}
/**
* User provided props to override the default props for the CloudWatchLogs LogGroup.
*
* Default: - Default props are used
*
* @return {@code this}
* @param logGroupProps User provided props to override the default props for the CloudWatchLogs LogGroup. This parameter is required.
*/
public Builder logGroupProps(final software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) {
this.props.logGroupProps(logGroupProps);
return this;
}
/**
* @return a newly built instance of {@link software.amazon.awsconstructs.services.apigatewaylambda.ApiGatewayToLambda}.
*/
@Override
public software.amazon.awsconstructs.services.apigatewaylambda.ApiGatewayToLambda build() {
return new software.amazon.awsconstructs.services.apigatewaylambda.ApiGatewayToLambda(
this.scope,
this.id,
this.props.build()
);
}
}
}