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

com.pwrdrvr.microapps.cdk.MicroAppsEdgeToOriginProps Maven / Gradle / Ivy

package com.pwrdrvr.microapps.cdk;

/**
 * (experimental) Properties to initialize an instance of `MicroAppsEdgeToOrigin`.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.75.0 (build 63bb957)", date = "2023-06-14T17:32:47.066Z")
@software.amazon.jsii.Jsii(module = com.pwrdrvr.microapps.cdk.$Module.class, fqn = "@pwrdrvr/microapps-cdk.MicroAppsEdgeToOriginProps")
@software.amazon.jsii.Jsii.Proxy(MicroAppsEdgeToOriginProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface MicroAppsEdgeToOriginProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Adds an X-Forwarded-Host-Header when calling API Gateway.
     * 

* Can only be trusted if signingMode is enabled, which restricts * access to API Gateway to only IAM signed requests. *

* Note: if true, creates OriginRequest Lambda @ Edge function for API Gateway Origin *

* Default: true */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getAddXForwardedHostHeader() { return null; } /** * (experimental) Account IDs allowed for cross-account Function URL invocations. *

* Default: [] */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getAllowedFunctionUrlAccounts() { return null; } /** * (experimental) List of allowed locale prefixes for pages. *

* Default: none *

* Example: *

*

     * : ['en', 'fr', 'es']
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getAllowedLocalePrefixes() { return null; } /** * (experimental) Optional asset name root. *

* Default: - resource names auto assigned *

* Example: *

*

     * microapps
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getAssetNameRoot() { return null; } /** * (experimental) Optional asset name suffix. *

* Default: none *

* Example: *

*

     * -dev-pr-12
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getAssetNameSuffix() { return null; } /** * (experimental) Origin region that API Gateway will be deployed to, used for the config.yml on the Edge function to sign requests for the correct region. *

* Note that Lambda FunctionURLs get the region from the Lambda ARN * and do not need this to be configured. *

* Default: undefined */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getOriginRegion() { return null; } /** * (experimental) RemovalPolicy override for child resources. *

* Default: - per resource default */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.RemovalPolicy getRemovalPolicy() { return null; } /** * (experimental) Replaces Host header (which will be the Edge domain name) with the Origin domain name when enabled. *

* This is necessary when API Gateway has not been configured * with a custom domain name that matches the exact domain name used by the CloudFront * Distribution AND when the OriginRequestPolicy.HeadersBehavior is set * to pass all headers to the origin. *

* Note: if true, creates OriginRequest Lambda @ Edge function for API Gateway Origin *

* Default: true */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getReplaceHostHeader() { return null; } /** * (experimental) Path prefix on the root of the API Gateway Stage. *

* Default: none *

* Example: *

*

     * dev/
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getRootPathPrefix() { return null; } /** * (experimental) Enable invoking API Gateway from the Edge Lambda. *

* Default: false */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getSetupApiGatewayPermissions() { return null; } /** * (experimental) Requires IAM auth on the API Gateway origin if not set to 'none'. *

* 'sign' - Uses request headers for auth. * 'presign' - Uses query string for auth. *

* If enabled, *

* Note: if 'sign' or 'presign', creates OriginRequest Lambda @ Edge function for API Gateway Origin *

* Default: 'sign' */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getSigningMode() { return null; } /** * (experimental) DynamoDB Table Name for apps/versions/rules. *

* Must be a full ARN as this can be cross region. *

* Implies that 2nd generation routing is enabled. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getTableRulesArn() { return null; } /** * @return a {@link Builder} of {@link MicroAppsEdgeToOriginProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link MicroAppsEdgeToOriginProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.Boolean addXForwardedHostHeader; java.util.List allowedFunctionUrlAccounts; java.util.List allowedLocalePrefixes; java.lang.String assetNameRoot; java.lang.String assetNameSuffix; java.lang.String originRegion; software.amazon.awscdk.RemovalPolicy removalPolicy; java.lang.Boolean replaceHostHeader; java.lang.String rootPathPrefix; java.lang.Boolean setupApiGatewayPermissions; java.lang.String signingMode; java.lang.String tableRulesArn; /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getAddXForwardedHostHeader} * @param addXForwardedHostHeader Adds an X-Forwarded-Host-Header when calling API Gateway. * Can only be trusted if signingMode is enabled, which restricts * access to API Gateway to only IAM signed requests. *

* Note: if true, creates OriginRequest Lambda @ Edge function for API Gateway Origin * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder addXForwardedHostHeader(java.lang.Boolean addXForwardedHostHeader) { this.addXForwardedHostHeader = addXForwardedHostHeader; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getAllowedFunctionUrlAccounts} * @param allowedFunctionUrlAccounts Account IDs allowed for cross-account Function URL invocations. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder allowedFunctionUrlAccounts(java.util.List allowedFunctionUrlAccounts) { this.allowedFunctionUrlAccounts = allowedFunctionUrlAccounts; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getAllowedLocalePrefixes} * @param allowedLocalePrefixes List of allowed locale prefixes for pages. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder allowedLocalePrefixes(java.util.List allowedLocalePrefixes) { this.allowedLocalePrefixes = allowedLocalePrefixes; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getAssetNameRoot} * @param assetNameRoot Optional asset name root. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder assetNameRoot(java.lang.String assetNameRoot) { this.assetNameRoot = assetNameRoot; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getAssetNameSuffix} * @param assetNameSuffix Optional asset name suffix. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder assetNameSuffix(java.lang.String assetNameSuffix) { this.assetNameSuffix = assetNameSuffix; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getOriginRegion} * @param originRegion Origin region that API Gateway will be deployed to, used for the config.yml on the Edge function to sign requests for the correct region. * Note that Lambda FunctionURLs get the region from the Lambda ARN * and do not need this to be configured. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder originRegion(java.lang.String originRegion) { this.originRegion = originRegion; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getRemovalPolicy} * @param removalPolicy RemovalPolicy override for child resources. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder removalPolicy(software.amazon.awscdk.RemovalPolicy removalPolicy) { this.removalPolicy = removalPolicy; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getReplaceHostHeader} * @param replaceHostHeader Replaces Host header (which will be the Edge domain name) with the Origin domain name when enabled. * This is necessary when API Gateway has not been configured * with a custom domain name that matches the exact domain name used by the CloudFront * Distribution AND when the OriginRequestPolicy.HeadersBehavior is set * to pass all headers to the origin. *

* Note: if true, creates OriginRequest Lambda @ Edge function for API Gateway Origin * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder replaceHostHeader(java.lang.Boolean replaceHostHeader) { this.replaceHostHeader = replaceHostHeader; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getRootPathPrefix} * @param rootPathPrefix Path prefix on the root of the API Gateway Stage. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder rootPathPrefix(java.lang.String rootPathPrefix) { this.rootPathPrefix = rootPathPrefix; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getSetupApiGatewayPermissions} * @param setupApiGatewayPermissions Enable invoking API Gateway from the Edge Lambda. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder setupApiGatewayPermissions(java.lang.Boolean setupApiGatewayPermissions) { this.setupApiGatewayPermissions = setupApiGatewayPermissions; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getSigningMode} * @param signingMode Requires IAM auth on the API Gateway origin if not set to 'none'. * 'sign' - Uses request headers for auth. * 'presign' - Uses query string for auth. *

* If enabled, *

* Note: if 'sign' or 'presign', creates OriginRequest Lambda @ Edge function for API Gateway Origin * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder signingMode(java.lang.String signingMode) { this.signingMode = signingMode; return this; } /** * Sets the value of {@link MicroAppsEdgeToOriginProps#getTableRulesArn} * @param tableRulesArn DynamoDB Table Name for apps/versions/rules. * Must be a full ARN as this can be cross region. *

* Implies that 2nd generation routing is enabled. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder tableRulesArn(java.lang.String tableRulesArn) { this.tableRulesArn = tableRulesArn; return this; } /** * Builds the configured instance. * @return a new instance of {@link MicroAppsEdgeToOriginProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public MicroAppsEdgeToOriginProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link MicroAppsEdgeToOriginProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MicroAppsEdgeToOriginProps { private final java.lang.Boolean addXForwardedHostHeader; private final java.util.List allowedFunctionUrlAccounts; private final java.util.List allowedLocalePrefixes; private final java.lang.String assetNameRoot; private final java.lang.String assetNameSuffix; private final java.lang.String originRegion; private final software.amazon.awscdk.RemovalPolicy removalPolicy; private final java.lang.Boolean replaceHostHeader; private final java.lang.String rootPathPrefix; private final java.lang.Boolean setupApiGatewayPermissions; private final java.lang.String signingMode; private final java.lang.String tableRulesArn; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.addXForwardedHostHeader = software.amazon.jsii.Kernel.get(this, "addXForwardedHostHeader", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.allowedFunctionUrlAccounts = software.amazon.jsii.Kernel.get(this, "allowedFunctionUrlAccounts", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.allowedLocalePrefixes = software.amazon.jsii.Kernel.get(this, "allowedLocalePrefixes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.assetNameRoot = software.amazon.jsii.Kernel.get(this, "assetNameRoot", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.assetNameSuffix = software.amazon.jsii.Kernel.get(this, "assetNameSuffix", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.originRegion = software.amazon.jsii.Kernel.get(this, "originRegion", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.removalPolicy = software.amazon.jsii.Kernel.get(this, "removalPolicy", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.RemovalPolicy.class)); this.replaceHostHeader = software.amazon.jsii.Kernel.get(this, "replaceHostHeader", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.rootPathPrefix = software.amazon.jsii.Kernel.get(this, "rootPathPrefix", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.setupApiGatewayPermissions = software.amazon.jsii.Kernel.get(this, "setupApiGatewayPermissions", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.signingMode = software.amazon.jsii.Kernel.get(this, "signingMode", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.tableRulesArn = software.amazon.jsii.Kernel.get(this, "tableRulesArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.addXForwardedHostHeader = builder.addXForwardedHostHeader; this.allowedFunctionUrlAccounts = builder.allowedFunctionUrlAccounts; this.allowedLocalePrefixes = builder.allowedLocalePrefixes; this.assetNameRoot = builder.assetNameRoot; this.assetNameSuffix = builder.assetNameSuffix; this.originRegion = builder.originRegion; this.removalPolicy = builder.removalPolicy; this.replaceHostHeader = builder.replaceHostHeader; this.rootPathPrefix = builder.rootPathPrefix; this.setupApiGatewayPermissions = builder.setupApiGatewayPermissions; this.signingMode = builder.signingMode; this.tableRulesArn = builder.tableRulesArn; } @Override public final java.lang.Boolean getAddXForwardedHostHeader() { return this.addXForwardedHostHeader; } @Override public final java.util.List getAllowedFunctionUrlAccounts() { return this.allowedFunctionUrlAccounts; } @Override public final java.util.List getAllowedLocalePrefixes() { return this.allowedLocalePrefixes; } @Override public final java.lang.String getAssetNameRoot() { return this.assetNameRoot; } @Override public final java.lang.String getAssetNameSuffix() { return this.assetNameSuffix; } @Override public final java.lang.String getOriginRegion() { return this.originRegion; } @Override public final software.amazon.awscdk.RemovalPolicy getRemovalPolicy() { return this.removalPolicy; } @Override public final java.lang.Boolean getReplaceHostHeader() { return this.replaceHostHeader; } @Override public final java.lang.String getRootPathPrefix() { return this.rootPathPrefix; } @Override public final java.lang.Boolean getSetupApiGatewayPermissions() { return this.setupApiGatewayPermissions; } @Override public final java.lang.String getSigningMode() { return this.signingMode; } @Override public final java.lang.String getTableRulesArn() { return this.tableRulesArn; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); if (this.getAddXForwardedHostHeader() != null) { data.set("addXForwardedHostHeader", om.valueToTree(this.getAddXForwardedHostHeader())); } if (this.getAllowedFunctionUrlAccounts() != null) { data.set("allowedFunctionUrlAccounts", om.valueToTree(this.getAllowedFunctionUrlAccounts())); } if (this.getAllowedLocalePrefixes() != null) { data.set("allowedLocalePrefixes", om.valueToTree(this.getAllowedLocalePrefixes())); } if (this.getAssetNameRoot() != null) { data.set("assetNameRoot", om.valueToTree(this.getAssetNameRoot())); } if (this.getAssetNameSuffix() != null) { data.set("assetNameSuffix", om.valueToTree(this.getAssetNameSuffix())); } if (this.getOriginRegion() != null) { data.set("originRegion", om.valueToTree(this.getOriginRegion())); } if (this.getRemovalPolicy() != null) { data.set("removalPolicy", om.valueToTree(this.getRemovalPolicy())); } if (this.getReplaceHostHeader() != null) { data.set("replaceHostHeader", om.valueToTree(this.getReplaceHostHeader())); } if (this.getRootPathPrefix() != null) { data.set("rootPathPrefix", om.valueToTree(this.getRootPathPrefix())); } if (this.getSetupApiGatewayPermissions() != null) { data.set("setupApiGatewayPermissions", om.valueToTree(this.getSetupApiGatewayPermissions())); } if (this.getSigningMode() != null) { data.set("signingMode", om.valueToTree(this.getSigningMode())); } if (this.getTableRulesArn() != null) { data.set("tableRulesArn", om.valueToTree(this.getTableRulesArn())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@pwrdrvr/microapps-cdk.MicroAppsEdgeToOriginProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MicroAppsEdgeToOriginProps.Jsii$Proxy that = (MicroAppsEdgeToOriginProps.Jsii$Proxy) o; if (this.addXForwardedHostHeader != null ? !this.addXForwardedHostHeader.equals(that.addXForwardedHostHeader) : that.addXForwardedHostHeader != null) return false; if (this.allowedFunctionUrlAccounts != null ? !this.allowedFunctionUrlAccounts.equals(that.allowedFunctionUrlAccounts) : that.allowedFunctionUrlAccounts != null) return false; if (this.allowedLocalePrefixes != null ? !this.allowedLocalePrefixes.equals(that.allowedLocalePrefixes) : that.allowedLocalePrefixes != null) return false; if (this.assetNameRoot != null ? !this.assetNameRoot.equals(that.assetNameRoot) : that.assetNameRoot != null) return false; if (this.assetNameSuffix != null ? !this.assetNameSuffix.equals(that.assetNameSuffix) : that.assetNameSuffix != null) return false; if (this.originRegion != null ? !this.originRegion.equals(that.originRegion) : that.originRegion != null) return false; if (this.removalPolicy != null ? !this.removalPolicy.equals(that.removalPolicy) : that.removalPolicy != null) return false; if (this.replaceHostHeader != null ? !this.replaceHostHeader.equals(that.replaceHostHeader) : that.replaceHostHeader != null) return false; if (this.rootPathPrefix != null ? !this.rootPathPrefix.equals(that.rootPathPrefix) : that.rootPathPrefix != null) return false; if (this.setupApiGatewayPermissions != null ? !this.setupApiGatewayPermissions.equals(that.setupApiGatewayPermissions) : that.setupApiGatewayPermissions != null) return false; if (this.signingMode != null ? !this.signingMode.equals(that.signingMode) : that.signingMode != null) return false; return this.tableRulesArn != null ? this.tableRulesArn.equals(that.tableRulesArn) : that.tableRulesArn == null; } @Override public final int hashCode() { int result = this.addXForwardedHostHeader != null ? this.addXForwardedHostHeader.hashCode() : 0; result = 31 * result + (this.allowedFunctionUrlAccounts != null ? this.allowedFunctionUrlAccounts.hashCode() : 0); result = 31 * result + (this.allowedLocalePrefixes != null ? this.allowedLocalePrefixes.hashCode() : 0); result = 31 * result + (this.assetNameRoot != null ? this.assetNameRoot.hashCode() : 0); result = 31 * result + (this.assetNameSuffix != null ? this.assetNameSuffix.hashCode() : 0); result = 31 * result + (this.originRegion != null ? this.originRegion.hashCode() : 0); result = 31 * result + (this.removalPolicy != null ? this.removalPolicy.hashCode() : 0); result = 31 * result + (this.replaceHostHeader != null ? this.replaceHostHeader.hashCode() : 0); result = 31 * result + (this.rootPathPrefix != null ? this.rootPathPrefix.hashCode() : 0); result = 31 * result + (this.setupApiGatewayPermissions != null ? this.setupApiGatewayPermissions.hashCode() : 0); result = 31 * result + (this.signingMode != null ? this.signingMode.hashCode() : 0); result = 31 * result + (this.tableRulesArn != null ? this.tableRulesArn.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy