All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.aws.awsprototypingsdk.openapigateway.CustomAuthorizer Maven / Gradle / Ivy

There is a newer version: 0.19.68
Show newest version
package software.aws.awsprototypingsdk.openapigateway;

/**
 * (experimental) An authorizer that uses a lambda function to authorize requests.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-15T05:38:04.573Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.openapigateway.$Module.class, fqn = "@aws-prototyping-sdk/open-api-gateway.CustomAuthorizer")
public class CustomAuthorizer extends software.aws.awsprototypingsdk.openapigateway.Authorizer {

    protected CustomAuthorizer(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected CustomAuthorizer(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param props This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public CustomAuthorizer(final @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.openapigateway.CustomAuthorizerProps props) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(props, "props is required") });
    }

    /**
     * (experimental) The number of seconds during which the authorizer result is cached.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public @org.jetbrains.annotations.NotNull java.lang.Number getAuthorizerResultTtlInSeconds() {
        return software.amazon.jsii.Kernel.get(this, "authorizerResultTtlInSeconds", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
    }

    /**
     * (experimental) The lambda function used to authorize requests.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction getFunction() {
        return software.amazon.jsii.Kernel.get(this, "function", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.class));
    }

    /**
     * (experimental) The source of the identity in an incoming request.
     * 

* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html#cfn-apigateway-authorizer-identitysource */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getIdentitySource() { return software.amazon.jsii.Kernel.get(this, "identitySource", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) The type of custom authorizer. *

* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html#cfn-apigateway-authorizer-type */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.openapigateway.CustomAuthorizerType getType() { return software.amazon.jsii.Kernel.get(this, "type", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.openapigateway.CustomAuthorizerType.class)); } /** * (experimental) A fluent builder for {@link software.aws.awsprototypingsdk.openapigateway.CustomAuthorizer}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create() { return new Builder(); } private final software.aws.awsprototypingsdk.openapigateway.CustomAuthorizerProps.Builder props; private Builder() { this.props = new software.aws.awsprototypingsdk.openapigateway.CustomAuthorizerProps.Builder(); } /** * (experimental) Unique identifier for this authorizer. *

* @return {@code this} * @param authorizerId Unique identifier for this authorizer. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder authorizerId(final java.lang.String authorizerId) { this.props.authorizerId(authorizerId); return this; } /** * (experimental) The lambda function used to authorize requests. *

* @return {@code this} * @param function The lambda function used to authorize requests. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder function(final software.amazon.awscdk.services.lambda.IFunction function) { this.props.function(function); return this; } /** * (experimental) The number of seconds during which the authorizer result is cached. *

* Default: 300 *

* @return {@code this} * @param authorizerResultTtlInSeconds The number of seconds during which the authorizer result is cached. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder authorizerResultTtlInSeconds(final java.lang.Number authorizerResultTtlInSeconds) { this.props.authorizerResultTtlInSeconds(authorizerResultTtlInSeconds); return this; } /** * (experimental) The source of the identity in an incoming request. *

* Default: "method.request.header.Authorization" *

* @return {@code this} * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html#cfn-apigateway-authorizer-identitysource * @param identitySource The source of the identity in an incoming request. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder identitySource(final java.lang.String identitySource) { this.props.identitySource(identitySource); return this; } /** * (experimental) The type of custom authorizer. *

* Default: CustomAuthorizerType.TOKEN *

* @return {@code this} * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html#cfn-apigateway-authorizer-type * @param type The type of custom authorizer. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder type(final software.aws.awsprototypingsdk.openapigateway.CustomAuthorizerType type) { this.props.type(type); return this; } /** * @return a newly built instance of {@link software.aws.awsprototypingsdk.openapigateway.CustomAuthorizer}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.aws.awsprototypingsdk.openapigateway.CustomAuthorizer build() { return new software.aws.awsprototypingsdk.openapigateway.CustomAuthorizer( this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy