コード例 #1
0
        public async Task <AttachInternetGatewayResponse> AttachInternetGatewayAsync(string internetGatewayId, string vpcId)
        {
            var request = new AttachInternetGatewayRequest
            {
                InternetGatewayId = internetGatewayId,
                VpcId             = vpcId
            };

            var response = await _cloudComputeClient.AttachInternetGatewayAsync(request);

            return(response);
        }
コード例 #2
0
 private Amazon.EC2.Model.AttachInternetGatewayResponse CallAWSServiceOperation(IAmazonEC2 client, Amazon.EC2.Model.AttachInternetGatewayRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Elastic Compute Cloud (EC2)", "AttachInternetGateway");
     try
     {
         #if DESKTOP
         return(client.AttachInternetGateway(request));
         #elif CORECLR
         return(client.AttachInternetGatewayAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }