java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apprunner.alpha.VpcConnector
All Implemented Interfaces:
IResource, IVpcConnector, IConnectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-27T16:51:07.121Z") @Stability(Experimental) public class VpcConnector extends Resource implements IVpcConnector
(experimental) The App Runner 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();
 
  • Constructor Details

    • VpcConnector

      protected VpcConnector(software.amazon.jsii.JsiiObjectRef objRef)
    • VpcConnector

      protected VpcConnector(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • VpcConnector

      @Stability(Experimental) public VpcConnector(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VpcConnectorProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromVpcConnectorAttributes

      @Stability(Experimental) @NotNull public static IVpcConnector fromVpcConnectorAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VpcConnectorAttributes attrs)
      (experimental) Import from VPC connector attributes.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • getConnections

      @Stability(Experimental) @NotNull public Connections getConnections()
      (experimental) Allows specifying security group connections for the VPC connector.
      Specified by:
      getConnections in interface IConnectable
    • getVpcConnectorArn

      @Stability(Experimental) @NotNull public String getVpcConnectorArn()
      (experimental) The ARN of the VPC connector.
      Specified by:
      getVpcConnectorArn in interface IVpcConnector
    • getVpcConnectorName

      @Stability(Experimental) @NotNull public String getVpcConnectorName()
      (experimental) The name of the VPC connector.
      Specified by:
      getVpcConnectorName in interface IVpcConnector
    • getVpcConnectorRevision

      @Stability(Experimental) @NotNull public Number getVpcConnectorRevision()
      (experimental) The revision of the VPC connector.
      Specified by:
      getVpcConnectorRevision in interface IVpcConnector