Class VpcLink
Define a new VPC Link Specifies an API Gateway VPC link for a HTTP API to access resources in an Amazon Virtual Private Cloud (VPC).
Inherited Members
Namespace: Amazon.CDK.AWS.Apigatewayv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class VpcLink : Resource, IVpcLink, IResource
Syntax (vb)
Public Class VpcLink
Inherits Resource
Implements IVpcLink, IResource
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
using Amazon.CDK.AwsApigatewayv2Integrations;
var vpc = new Vpc(this, "VPC");
var alb = new ApplicationLoadBalancer(this, "AppLoadBalancer", new ApplicationLoadBalancerProps { Vpc = vpc });
var vpcLink = new VpcLink(this, "VpcLink", new VpcLinkProps { Vpc = vpc });
// Creating an HTTP ALB Integration:
var albIntegration = new HttpAlbIntegration("ALBIntegration", alb.Listeners[0], new HttpAlbIntegrationProps { });
Synopsis
Constructors
VpcLink(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
VpcLink(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
VpcLink(Construct, String, IVpcLinkProps) |
Properties
Vpc | The VPC to which this VPC Link is associated with. |
VpcLinkId | Physical ID of the VpcLink resource. |
Methods
AddSecurityGroups(ISecurityGroup[]) | Adds the provided security groups to the vpc link. |
AddSubnets(ISubnet[]) | Adds the provided subnets to the vpc link. |
FromVpcLinkAttributes(Construct, String, IVpcLinkAttributes) | Import a VPC Link by specifying its attributes. |
Constructors
VpcLink(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected VpcLink(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
VpcLink(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected VpcLink(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
VpcLink(Construct, String, IVpcLinkProps)
public VpcLink(Construct scope, string id, IVpcLinkProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IVpcLinkProps
Properties
Vpc
The VPC to which this VPC Link is associated with.
public virtual IVpc Vpc { get; }
Property Value
VpcLinkId
Physical ID of the VpcLink resource.
public virtual string VpcLinkId { get; }
Property Value
System.String
Methods
AddSecurityGroups(ISecurityGroup[])
Adds the provided security groups to the vpc link.
public virtual void AddSecurityGroups(params ISecurityGroup[] groups)
Parameters
- groups ISecurityGroup[]
AddSubnets(ISubnet[])
Adds the provided subnets to the vpc link.
public virtual void AddSubnets(params ISubnet[] subnets)
Parameters
- subnets ISubnet[]
FromVpcLinkAttributes(Construct, String, IVpcLinkAttributes)
Import a VPC Link by specifying its attributes.
public static IVpcLink FromVpcLinkAttributes(Construct scope, string id, IVpcLinkAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IVpcLinkAttributes
Returns