public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.DirectConnect.Model.DescribeVirtualInterfacesRequest(); if (cmdletContext.ConnectionId != null) { request.ConnectionId = cmdletContext.ConnectionId; } if (cmdletContext.VirtualInterfaceId != null) { request.VirtualInterfaceId = cmdletContext.VirtualInterfaceId; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
/// <summary> /// Initiates the asynchronous execution of the DescribeVirtualInterfaces operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeVirtualInterfaces operation on AmazonDirectConnectClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeVirtualInterfaces /// operation.</returns> public IAsyncResult BeginDescribeVirtualInterfaces(DescribeVirtualInterfacesRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeVirtualInterfacesRequestMarshaller(); var unmarshaller = DescribeVirtualInterfacesResponseUnmarshaller.Instance; return BeginInvoke<DescribeVirtualInterfacesRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Displays all virtual interfaces for an AWS account. Virtual interfaces deleted fewer /// than 15 minutes before DescribeVirtualInterfaces is called are also returned. If a /// connection ID is included then only virtual interfaces associated with this connection /// will be returned. If a virtual interface ID is included then only a single virtual /// interface will be returned. /// /// /// <para> /// A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect location /// and the customer. /// </para> /// /// <para> /// If a connection ID is provided, only virtual interfaces provisioned on the specified /// connection will be returned. If a virtual interface ID is provided, only this particular /// virtual interface will be returned. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeVirtualInterfaces service method.</param> /// /// <returns>The response from the DescribeVirtualInterfaces service method, as returned by DirectConnect.</returns> /// <exception cref="Amazon.DirectConnect.Model.DirectConnectClientException"> /// The API was called with invalid parameters. The error message will contain additional /// details about the cause. /// </exception> /// <exception cref="Amazon.DirectConnect.Model.DirectConnectServerException"> /// A server-side error occurred during the API call. The error message will contain additional /// details about the cause. /// </exception> public DescribeVirtualInterfacesResponse DescribeVirtualInterfaces(DescribeVirtualInterfacesRequest request) { var marshaller = new DescribeVirtualInterfacesRequestMarshaller(); var unmarshaller = DescribeVirtualInterfacesResponseUnmarshaller.Instance; return Invoke<DescribeVirtualInterfacesRequest,DescribeVirtualInterfacesResponse>(request, marshaller, unmarshaller); }
IAsyncResult invokeDescribeVirtualInterfaces(DescribeVirtualInterfacesRequest describeVirtualInterfacesRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeVirtualInterfacesRequestMarshaller().Marshall(describeVirtualInterfacesRequest); var unmarshaller = DescribeVirtualInterfacesResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Displays all virtual interfaces for an AWS account. Virtual interfaces deleted for less than 15 minutes are also returned. If virtual /// interface ID is included then only a single virtual interface will be returned.</para> <para> A virtual interface (VLAN) transmits the /// traffic between the Direct Connect location and the customer.</para> /// </summary> /// /// <param name="describeVirtualInterfacesRequest">Container for the necessary parameters to execute the DescribeVirtualInterfaces service /// method on AmazonDirectConnect.</param> /// /// <returns>The response from the DescribeVirtualInterfaces service method, as returned by AmazonDirectConnect.</returns> /// /// <exception cref="DirectConnectServerException"/> /// <exception cref="DirectConnectClientException"/> public DescribeVirtualInterfacesResponse DescribeVirtualInterfaces(DescribeVirtualInterfacesRequest describeVirtualInterfacesRequest) { IAsyncResult asyncResult = invokeDescribeVirtualInterfaces(describeVirtualInterfacesRequest, null, null, true); return EndDescribeVirtualInterfaces(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the DescribeVirtualInterfaces operation. /// <seealso cref="Amazon.DirectConnect.AmazonDirectConnect.DescribeVirtualInterfaces"/> /// </summary> /// /// <param name="describeVirtualInterfacesRequest">Container for the necessary parameters to execute the DescribeVirtualInterfaces operation on /// AmazonDirectConnect.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking /// EndDescribeVirtualInterfaces operation.</returns> public IAsyncResult BeginDescribeVirtualInterfaces(DescribeVirtualInterfacesRequest describeVirtualInterfacesRequest, AsyncCallback callback, object state) { return invokeDescribeVirtualInterfaces(describeVirtualInterfacesRequest, callback, state, false); }
/// <summary> /// Initiates the asynchronous execution of the DescribeVirtualInterfaces operation. /// <seealso cref="Amazon.DirectConnect.IAmazonDirectConnect.DescribeVirtualInterfaces"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeVirtualInterfaces operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<DescribeVirtualInterfacesResponse> DescribeVirtualInterfacesAsync(DescribeVirtualInterfacesRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeVirtualInterfacesRequestMarshaller(); var unmarshaller = DescribeVirtualInterfacesResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeVirtualInterfacesRequest, DescribeVirtualInterfacesResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Displays all virtual interfaces for an AWS account. Virtual interfaces deleted fewer than 15 minutes before DescribeVirtualInterfaces /// is called are also returned. If a connection ID is included then only virtual interfaces associated with this connection will be returned. /// If a virtual interface ID is included then only a single virtual interface will be returned.</para> <para> A virtual interface (VLAN) /// transmits the traffic between the Direct Connect location and the customer.</para> <para>If a connection ID is provided, only virtual /// interfaces provisioned on the specified connection will be returned. If a virtual interface ID is provided, only this particular virtual /// interface will be returned.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeVirtualInterfaces service /// method on AmazonDirectConnect.</param> /// /// <returns>The response from the DescribeVirtualInterfaces service method, as returned by AmazonDirectConnect.</returns> /// /// <exception cref="T:Amazon.DirectConnect.Model.DirectConnectServerException" /> /// <exception cref="T:Amazon.DirectConnect.Model.DirectConnectClientException" /> public DescribeVirtualInterfacesResponse DescribeVirtualInterfaces(DescribeVirtualInterfacesRequest request) { var task = DescribeVirtualInterfacesAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// <para>Displays all virtual interfaces for an AWS account. Virtual interfaces deleted fewer than 15 minutes before DescribeVirtualInterfaces /// is called are also returned. If a connection ID is included then only virtual interfaces associated with this connection will be returned. /// If a virtual interface ID is included then only a single virtual interface will be returned.</para> <para> A virtual interface (VLAN) /// transmits the traffic between the Direct Connect location and the customer.</para> <para>If a connection ID is provided, only virtual /// interfaces provisioned on the specified connection will be returned. If a virtual interface ID is provided, only this particular virtual /// interface will be returned.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeVirtualInterfaces service /// method on AmazonDirectConnect.</param> /// /// <returns>The response from the DescribeVirtualInterfaces service method, as returned by AmazonDirectConnect.</returns> /// /// <exception cref="T:Amazon.DirectConnect.Model.DirectConnectServerException" /> /// <exception cref="T:Amazon.DirectConnect.Model.DirectConnectClientException" /> public DescribeVirtualInterfacesResponse DescribeVirtualInterfaces(DescribeVirtualInterfacesRequest request) { var task = DescribeVirtualInterfacesAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the DescribeVirtualInterfaces operation. /// <seealso cref="Amazon.DirectConnect.IAmazonDirectConnect"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeVirtualInterfaces operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<DescribeVirtualInterfacesResponse> DescribeVirtualInterfacesAsync(DescribeVirtualInterfacesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeVirtualInterfacesRequestMarshaller(); var unmarshaller = DescribeVirtualInterfacesResponseUnmarshaller.Instance; return InvokeAsync<DescribeVirtualInterfacesRequest,DescribeVirtualInterfacesResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DescribeVirtualInterfaces operation. /// <seealso cref="Amazon.DirectConnect.IAmazonDirectConnect.DescribeVirtualInterfaces"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeVirtualInterfaces operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public async Task<DescribeVirtualInterfacesResponse> DescribeVirtualInterfacesAsync(DescribeVirtualInterfacesRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeVirtualInterfacesRequestMarshaller(); var unmarshaller = DescribeVirtualInterfacesResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeVirtualInterfacesRequest, DescribeVirtualInterfacesResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
private Amazon.DirectConnect.Model.DescribeVirtualInterfacesResponse CallAWSServiceOperation(IAmazonDirectConnect client, Amazon.DirectConnect.Model.DescribeVirtualInterfacesRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Direct Connect", "DescribeVirtualInterfaces"); try { #if DESKTOP return(client.DescribeVirtualInterfaces(request)); #elif CORECLR return(client.DescribeVirtualInterfacesAsync(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; } }