Skip to content

ApiGatewayAccessProps Struct ​

Initializer ​

ts
import { ApiGatewayAccessProps } from '@cloudsnorkel/cdk-github-runners'

const apiGatewayAccessProps: ApiGatewayAccessProps = { ... }
python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.ApiGatewayAccessProps(
  access_log_group: ILogGroup = None,
  allowed_ips: typing.List[str] = None,
  allowed_security_groups: typing.List[ISecurityGroup] = None,
  allowed_vpc: IVpc = None,
  allowed_vpc_endpoints: typing.List[IVpcEndpoint] = None,
  logging_level: MethodLoggingLevel = None
)
java
import com.cloudsnorkel.cdk.github.runners.ApiGatewayAccessProps;

ApiGatewayAccessProps.builder()
//  .accessLogGroup(ILogGroup)
//  .allowedIps(java.util.List<java.lang.String>)
//  .allowedSecurityGroups(java.util.List<ISecurityGroup>)
//  .allowedVpc(IVpc)
//  .allowedVpcEndpoints(java.util.List<IVpcEndpoint>)
//  .loggingLevel(MethodLoggingLevel)
    .build();
csharp
using CloudSnorkel;

new ApiGatewayAccessProps {
    ILogGroup AccessLogGroup = null,
    string[] AllowedIps = null,
    ISecurityGroup[] AllowedSecurityGroups = null,
    IVpc AllowedVpc = null,
    IVpcEndpoint[] AllowedVpcEndpoints = null,
    MethodLoggingLevel LoggingLevel = null
};
go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

&cloudsnorkelcdkgithubrunners.ApiGatewayAccessProps {
	AccessLogGroup: github.com/aws/aws-cdk-go/awscdk/v2.aws_logs.ILogGroup,
	AllowedIps: *[]*string,
	AllowedSecurityGroups: *[]github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.ISecurityGroup,
	AllowedVpc: github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.IVpc,
	AllowedVpcEndpoints: *[]github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.IVpcEndpoint,
	LoggingLevel: github.com/aws/aws-cdk-go/awscdk/v2.aws_apigateway.MethodLoggingLevel,
}

Properties ​

accessLogGroupaccess_log_groupaccessLogGroupAccessLogGroupAccessLogGroup ​

accessLogGroup?: ILogGroup

access_log_group?: ILogGroup

accessLogGroup?: ILogGroup

AccessLogGroup?: ILogGroup

AccessLogGroup?: ILogGroup

Log group for access logs, with one JSON line for each request.

API Gateway can only write logs once the account has a CloudWatch Logs role. See https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html

Default: no access logs

allowedIpsallowed_ipsallowedIpsAllowedIpsAllowedIps ​

allowedIps?: string[]

allowed_ips?: typing.List[str]

allowedIps?: java.util.List<java.lang.String>

AllowedIps?: string[]

AllowedIps?: *[]*string

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).

allowedSecurityGroupsallowed_security_groupsallowedSecurityGroupsAllowedSecurityGroupsAllowedSecurityGroups ​

allowedSecurityGroups?: ISecurityGroup[]

allowed_security_groups?: typing.List[ISecurityGroup]

allowedSecurityGroups?: java.util.List<ISecurityGroup>

AllowedSecurityGroups?: ISecurityGroup[]

AllowedSecurityGroups?: *[]ISecurityGroup

List of security groups that are allowed to access the API Gateway.

Only works for private API Gateways with ApiGatewayAccessProps.allowedVpc.

allowedVpcallowed_vpcallowedVpcAllowedVpcAllowedVpc ​

allowedVpc?: IVpc

allowed_vpc?: IVpc

allowedVpc?: IVpc

AllowedVpc?: IVpc

AllowedVpc?: IVpc

Create a private API Gateway and allow access from the specified VPC.

allowedVpcEndpointsallowed_vpc_endpointsallowedVpcEndpointsAllowedVpcEndpointsAllowedVpcEndpoints ​

allowedVpcEndpoints?: IVpcEndpoint[]

allowed_vpc_endpoints?: typing.List[IVpcEndpoint]

allowedVpcEndpoints?: java.util.List<IVpcEndpoint>

AllowedVpcEndpoints?: IVpcEndpoint[]

AllowedVpcEndpoints?: *[]IVpcEndpoint

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.

loggingLevellogging_levelloggingLevelLoggingLevelLoggingLevel ​

loggingLevel?: MethodLoggingLevel

logging_level?: MethodLoggingLevel

loggingLevel?: MethodLoggingLevel

LoggingLevel?: MethodLoggingLevel

LoggingLevel?: MethodLoggingLevel

Level of execution logs. API Gateway writes them to its own log group named API-Gateway-Execution-Logs_{rest-api-id}/{stage}.

Like access logs, these need a CloudWatch Logs role in the account.

Default: no execution logs

Released under the Apache-2.0 License.