Interface VpcConnectorProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
VpcConnectorProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:11.381Z") @Stability(Experimental) public interface VpcConnectorProps extends software.amazon.jsii.JsiiSerializable
(experimental) Properties of the AppRunner VPC Connector.

Example:

 import software.amazon.awscdk.services.ec2.*;
 Vpc vpc = Vpc.Builder.create(this, "Vpc")
         .ipAddresses(IpAddresses.cidr("10.0.0.0/16"))
         .build();
 VpcConnector vpcConnector = VpcConnector.Builder.create(this, "VpcConnector")
         .vpc(vpc)
         .vpcSubnets(vpc.selectSubnets(SubnetSelection.builder().subnetType(SubnetType.PUBLIC).build()))
         .vpcConnectorName("MyVpcConnector")
         .build();
 Service.Builder.create(this, "Service")
         .source(Source.fromEcrPublic(EcrPublicProps.builder()
                 .imageConfiguration(ImageConfiguration.builder().port(8000).build())
                 .imageIdentifier("public.ecr.aws/aws-containers/hello-app-runner:latest")
                 .build()))
         .vpcConnector(vpcConnector)
         .build();
 
  • Method Details

    • getVpc

      @Stability(Experimental) @NotNull IVpc getVpc()
      (experimental) The VPC for the VPC Connector.
    • getSecurityGroups

      @Stability(Experimental) @Nullable default List<ISecurityGroup> getSecurityGroups()
      (experimental) A list of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets.

      Default: - a new security group will be created in the specified VPC

    • getVpcConnectorName

      @Stability(Experimental) @Nullable default String getVpcConnectorName()
      (experimental) The name for the VpcConnector.

      Default: - a name generated by CloudFormation

    • getVpcSubnets

      @Stability(Experimental) @Nullable default SubnetSelection getVpcSubnets()
      (experimental) Where to place the VPC Connector within the VPC.

      Default: - Private subnets.

    • builder

      @Stability(Experimental) static VpcConnectorProps.Builder builder()
      Returns:
      a VpcConnectorProps.Builder of VpcConnectorProps