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

com.cloudsnorkel.cdk.github.runners.ApiGatewayAccessProps Maven / Gradle / Ivy

Go to download

CDK construct to create GitHub Actions self-hosted runners. A webhook listens to events and creates ephemeral runners on the fly.

There is a newer version: 0.14.6
Show newest version
package com.cloudsnorkel.cdk.github.runners;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.380Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps")
@software.amazon.jsii.Jsii.Proxy(ApiGatewayAccessProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ApiGatewayAccessProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) List of IP addresses in CIDR notation that are allowed to access the API Gateway.
     * 

* If not specified on public API Gateway, all IP addresses are allowed. *

* If not specified on private API Gateway, no IP addresses are allowed (but specified security groups are). */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getAllowedIps() { return null; } /** * (experimental) List of security groups that are allowed to access the API Gateway. *

* Only works for private API Gateways with {@link allowedVpc}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getAllowedSecurityGroups() { return null; } /** * (experimental) Create a private API Gateway and allow access from the specified VPC. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getAllowedVpc() { return null; } /** * (experimental) Create a private API Gateway and allow access from the specified VPC endpoints. *

* Use this to make use of existing VPC endpoints or to share an endpoint between multiple functions. The VPC endpoint must point to ec2.InterfaceVpcEndpointAwsService.APIGATEWAY. *

* No other settings are supported when using this option. *

* All endpoints will be allowed access, but only the first one will be used as the URL by the runner system for setting up the webhook, and as setup URL. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getAllowedVpcEndpoints() { return null; } /** * @return a {@link Builder} of {@link ApiGatewayAccessProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link ApiGatewayAccessProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.util.List allowedIps; java.util.List allowedSecurityGroups; software.amazon.awscdk.services.ec2.IVpc allowedVpc; java.util.List allowedVpcEndpoints; /** * Sets the value of {@link ApiGatewayAccessProps#getAllowedIps} * @param allowedIps List of IP addresses in CIDR notation that are allowed to access the API Gateway. * If not specified on public API Gateway, all IP addresses are allowed. *

* If not specified on private API Gateway, no IP addresses are allowed (but specified security groups are). * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder allowedIps(java.util.List allowedIps) { this.allowedIps = allowedIps; return this; } /** * Sets the value of {@link ApiGatewayAccessProps#getAllowedSecurityGroups} * @param allowedSecurityGroups List of security groups that are allowed to access the API Gateway. * Only works for private API Gateways with {@link allowedVpc}. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder allowedSecurityGroups(java.util.List allowedSecurityGroups) { this.allowedSecurityGroups = (java.util.List)allowedSecurityGroups; return this; } /** * Sets the value of {@link ApiGatewayAccessProps#getAllowedVpc} * @param allowedVpc Create a private API Gateway and allow access from the specified VPC. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder allowedVpc(software.amazon.awscdk.services.ec2.IVpc allowedVpc) { this.allowedVpc = allowedVpc; return this; } /** * Sets the value of {@link ApiGatewayAccessProps#getAllowedVpcEndpoints} * @param allowedVpcEndpoints Create a private API Gateway and allow access from the specified VPC endpoints. * Use this to make use of existing VPC endpoints or to share an endpoint between multiple functions. The VPC endpoint must point to ec2.InterfaceVpcEndpointAwsService.APIGATEWAY. *

* No other settings are supported when using this option. *

* All endpoints will be allowed access, but only the first one will be used as the URL by the runner system for setting up the webhook, and as setup URL. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder allowedVpcEndpoints(java.util.List allowedVpcEndpoints) { this.allowedVpcEndpoints = (java.util.List)allowedVpcEndpoints; return this; } /** * Builds the configured instance. * @return a new instance of {@link ApiGatewayAccessProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public ApiGatewayAccessProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link ApiGatewayAccessProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ApiGatewayAccessProps { private final java.util.List allowedIps; private final java.util.List allowedSecurityGroups; private final software.amazon.awscdk.services.ec2.IVpc allowedVpc; private final java.util.List allowedVpcEndpoints; /** * 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.allowedIps = software.amazon.jsii.Kernel.get(this, "allowedIps", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.allowedSecurityGroups = software.amazon.jsii.Kernel.get(this, "allowedSecurityGroups", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.class))); this.allowedVpc = software.amazon.jsii.Kernel.get(this, "allowedVpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class)); this.allowedVpcEndpoints = software.amazon.jsii.Kernel.get(this, "allowedVpcEndpoints", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpcEndpoint.class))); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @SuppressWarnings("unchecked") protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.allowedIps = builder.allowedIps; this.allowedSecurityGroups = (java.util.List)builder.allowedSecurityGroups; this.allowedVpc = builder.allowedVpc; this.allowedVpcEndpoints = (java.util.List)builder.allowedVpcEndpoints; } @Override public final java.util.List getAllowedIps() { return this.allowedIps; } @Override public final java.util.List getAllowedSecurityGroups() { return this.allowedSecurityGroups; } @Override public final software.amazon.awscdk.services.ec2.IVpc getAllowedVpc() { return this.allowedVpc; } @Override public final java.util.List getAllowedVpcEndpoints() { return this.allowedVpcEndpoints; } @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.getAllowedIps() != null) { data.set("allowedIps", om.valueToTree(this.getAllowedIps())); } if (this.getAllowedSecurityGroups() != null) { data.set("allowedSecurityGroups", om.valueToTree(this.getAllowedSecurityGroups())); } if (this.getAllowedVpc() != null) { data.set("allowedVpc", om.valueToTree(this.getAllowedVpc())); } if (this.getAllowedVpcEndpoints() != null) { data.set("allowedVpcEndpoints", om.valueToTree(this.getAllowedVpcEndpoints())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps")); 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; ApiGatewayAccessProps.Jsii$Proxy that = (ApiGatewayAccessProps.Jsii$Proxy) o; if (this.allowedIps != null ? !this.allowedIps.equals(that.allowedIps) : that.allowedIps != null) return false; if (this.allowedSecurityGroups != null ? !this.allowedSecurityGroups.equals(that.allowedSecurityGroups) : that.allowedSecurityGroups != null) return false; if (this.allowedVpc != null ? !this.allowedVpc.equals(that.allowedVpc) : that.allowedVpc != null) return false; return this.allowedVpcEndpoints != null ? this.allowedVpcEndpoints.equals(that.allowedVpcEndpoints) : that.allowedVpcEndpoints == null; } @Override public final int hashCode() { int result = this.allowedIps != null ? this.allowedIps.hashCode() : 0; result = 31 * result + (this.allowedSecurityGroups != null ? this.allowedSecurityGroups.hashCode() : 0); result = 31 * result + (this.allowedVpc != null ? this.allowedVpc.hashCode() : 0); result = 31 * result + (this.allowedVpcEndpoints != null ? this.allowedVpcEndpoints.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy