To use this function add it to the class library file named OrchestratorPluginAWSService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorPluginAWSService.ts
Description: Orchestrator Function to Create a AWS EC2 Vpn Connection
Private Function: EC2VpnConnectionCreate
privateEC2VpnConnectionCreate(objAWSClient:AWSClient,objEC2VpnGateway:EC2VpnGateway,objEC2TransitGateway:EC2TransitGateway,objEC2CustomerGateway:EC2CustomerGateway,objEC2VpnConnectionOptionsSpecification:EC2VpnConnectionOptionsSpecification):EC2VpnConnection{
letobjAmazonEC2Client:AmazonEC2Client=objAWSClient.getAmazonEC2Client();
letobjEC2CreateVpnConnectionRequest:EC2CreateVpnConnectionRequest=newEC2CreateVpnConnectionRequest();
objEC2CreateVpnConnectionRequest.setType("ipsec.1");
objEC2CreateVpnConnectionRequest.setVpnGatewayId(objEC2VpnGateway.getVpnGatewayId());
objEC2CreateVpnConnectionRequest.setCustomerGatewayId(objEC2CustomerGateway.getCustomerGatewayId());
objEC2CreateVpnConnectionRequest.setTransitGatewayId(objEC2TransitGateway.getTransitGatewayId());
objEC2CreateVpnConnectionRequest.setOptions(objEC2VpnConnectionOptionsSpecification);
letobjEC2CreateVpnConnectionResult:EC2CreateVpnConnectionResult=objAmazonEC2Client.createVpnConnection(objEC2CreateVpnConnectionRequest);
letobjEC2VpnConnection:EC2VpnConnection=objEC2CreateVpnConnectionResult.getVpnConnection();
returnobjEC2VpnConnection;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
