software.amazon.awsconstructs.services.cognitoapigatewaylambda.CognitoToApiGatewayToLambda Maven / Gradle / Ivy
package software.amazon.awsconstructs.services.cognitoapigatewaylambda;
@javax.annotation.Generated(value = "jsii-pacmak/1.31.0 (build 6fa403d)", date = "2021-07-19T01:55:11.381Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.cognitoapigatewaylambda.$Module.class, fqn = "@aws-solutions-constructs/aws-cognito-apigateway-lambda.CognitoToApiGatewayToLambda")
public class CognitoToApiGatewayToLambda extends software.amazon.awscdk.core.Construct {
protected CognitoToApiGatewayToLambda(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CognitoToApiGatewayToLambda(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 CognitoToApiGatewayToLambda(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awsconstructs.services.cognitoapigatewaylambda.CognitoToApiGatewayToLambdaProps 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 void addAuthorizers() {
software.amazon.jsii.Kernel.call(this, "addAuthorizers", software.amazon.jsii.NativeType.VOID);
}
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.apigateway.CfnAuthorizer getApiGatewayAuthorizer() {
return software.amazon.jsii.Kernel.get(this, "apiGatewayAuthorizer", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apigateway.CfnAuthorizer.class));
}
public @org.jetbrains.annotations.NotNull 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));
}
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.NotNull software.amazon.awscdk.services.cognito.UserPool getUserPool() {
return software.amazon.jsii.Kernel.get(this, "userPool", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cognito.UserPool.class));
}
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cognito.UserPoolClient getUserPoolClient() {
return software.amazon.jsii.Kernel.get(this, "userPoolClient", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cognito.UserPoolClient.class));
}
/**
* A fluent builder for {@link software.amazon.awsconstructs.services.cognitoapigatewaylambda.CognitoToApiGatewayToLambda}.
*/
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.amazon.awscdk.core.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.amazon.awscdk.core.Construct scope;
private final java.lang.String id;
private final software.amazon.awsconstructs.services.cognitoapigatewaylambda.CognitoToApiGatewayToLambdaProps.Builder props;
private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new software.amazon.awsconstructs.services.cognitoapigatewaylambda.CognitoToApiGatewayToLambdaProps.Builder();
}
/**
* Optional user provided props to override the default props for the API Gateway.
*
* Default: - Default props are used
*
* @return {@code this}
* @param apiGatewayProps Optional user provided props to override the default props for the API Gateway. This parameter is required.
*/
public Builder apiGatewayProps(final java.lang.Object apiGatewayProps) {
this.props.apiGatewayProps(apiGatewayProps);
return this;
}
/**
* Optional user provided props to override the default props.
*
* Default: - Default props are used
*
* @return {@code this}
* @param cognitoUserPoolClientProps Optional user provided props to override the default props. This parameter is required.
*/
public Builder cognitoUserPoolClientProps(final java.lang.Object cognitoUserPoolClientProps) {
this.props.cognitoUserPoolClientProps(cognitoUserPoolClientProps);
return this;
}
/**
* Optional user provided props to override the default props.
*
* Default: - Default props are used
*
* @return {@code this}
* @param cognitoUserPoolProps Optional user provided props to override the default props. This parameter is required.
*/
public Builder cognitoUserPoolProps(final software.amazon.awscdk.services.cognito.UserPoolProps cognitoUserPoolProps) {
this.props.cognitoUserPoolProps(cognitoUserPoolProps);
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;
}
/**
* @returns a newly built instance of {@link software.amazon.awsconstructs.services.cognitoapigatewaylambda.CognitoToApiGatewayToLambda}.
*/
@Override
public software.amazon.awsconstructs.services.cognitoapigatewaylambda.CognitoToApiGatewayToLambda build() {
return new software.amazon.awsconstructs.services.cognitoapigatewaylambda.CognitoToApiGatewayToLambda(
this.scope,
this.id,
this.props.build()
);
}
}
}