Skip to content
v2.278.0

CfnVpcConnectorProps Struct ​

Properties for defining a CfnVpcConnector.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apprunner as apprunner } from 'aws-cdk-lib';
const cfnVpcConnectorProps: apprunner.CfnVpcConnectorProps = {
  subnets: ['subnets'],

  // the properties below are optional
  securityGroups: ['securityGroups'],
  tags: [{
    key: 'key',
    value: 'value',
  }],
  vpcConnectorName: 'vpcConnectorName',
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apprunner as apprunner

cfn_vpc_connector_props = apprunner.CfnVpcConnectorProps(
    subnets=["subnets"],

    # the properties below are optional
    security_groups=["securityGroups"],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    vpc_connector_name="vpcConnectorName"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apprunner.*;

CfnVpcConnectorProps cfnVpcConnectorProps = CfnVpcConnectorProps.builder()
        .subnets(List.of("subnets"))

        // the properties below are optional
        .securityGroups(List.of("securityGroups"))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .vpcConnectorName("vpcConnectorName")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppRunner;

var cfnVpcConnectorProps = new CfnVpcConnectorProps {
    Subnets = new [] { "subnets" },

    // the properties below are optional
    SecurityGroups = new [] { "securityGroups" },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    VpcConnectorName = "vpcConnectorName"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnVpcConnectorProps := &CfnVpcConnectorProps{
	Subnets: []*string{
		jsii.String("subnets"),
	},

	// the properties below are optional
	SecurityGroups: []interface{}{
		jsii.String("securityGroups"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	VpcConnectorName: jsii.String("vpcConnectorName"),
}

Properties ​

securityGroupsoptionalstring | ISecurityGroupRef[]security_groupsoptionaltyping.List[typing.Union[str, ISecurityGroupRef]]securityGroupsoptionalList<String>SecurityGroupsoptionalstring[]SecurityGroupsoptional*[]interface{} #
A list of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets.

If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.

subnetsstring[]subnetstyping.List[str]subnetsList<String>Subnetsstring[]Subnets*[]*string required #
A list of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC.

Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.

App Runner only supports subnets of IP address type IPv4 and dual stack (IPv4 and IPv6).

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
A list of metadata items that you can associate with your VPC connector resource.

A tag is a key-value pair.

A VpcConnector is immutable, so you cannot update its tags. To change the tags, replace the resource. To replace a VpcConnector , you must provide a new combination of security groups.

vpcConnectorNameoptionalstringvpc_connector_nameoptionalstrvpcConnectorNameoptionalStringVpcConnectorNameoptionalstringVpcConnectorNameoptional*string #
A name for the VPC connector.

If you don't specify a name, CloudFormation generates a name for your VPC connector.