/** * Create a new AWS NIC in the default subnet */ public static String createNICDirectlyWithEC2Client (AmazonEC2Client client, VerificationHost host, String subnetId) { // create the new AWS NIC CreateNetworkInterfaceRequest createNewNic = new CreateNetworkInterfaceRequest() .withSubnetId(subnetId); CreateNetworkInterfaceResult createNewNicResult = client .createNetworkInterface(createNewNic); return createNewNicResult.getNetworkInterface().getNetworkInterfaceId(); }
@Override public NetworkInterface createNetworkInterface(CreateNetworkInterfaceRequest request, ResultCapture<CreateNetworkInterfaceResult> extractor) { ActionResult result = resource.performAction("CreateNetworkInterface", request, extractor); if (result == null) return null; return new NetworkInterfaceImpl(result.getResource()); }
@Override public NetworkInterface createNetworkInterface(CreateNetworkInterfaceRequest request, ResultCapture<CreateNetworkInterfaceResult> extractor) { ActionResult result = service.performAction("CreateNetworkInterface", request, extractor); if (result == null) return null; return new NetworkInterfaceImpl(result.getResource()); }
@Override public CreateNetworkInterfaceResult createNetworkInterface(CreateNetworkInterfaceRequest createNetworkInterfaceRequest) throws AmazonServiceException, AmazonClientException { throw new UnsupportedOperationException("Not supported in mock"); }
@Override public NetworkInterface createNetworkInterface(CreateNetworkInterfaceRequest request) { return createNetworkInterface(request, null); }
/** * Performs the <code>CreateNetworkInterface</code> action. * * <p> * * @return The <code>NetworkInterface</code> resource object associated with * the result of this action. * @see CreateNetworkInterfaceRequest */ com.amazonaws.resources.ec2.NetworkInterface createNetworkInterface( CreateNetworkInterfaceRequest request);
/** * Performs the <code>CreateNetworkInterface</code> action and use a * ResultCapture to retrieve the low-level client response. * * <p> * * @return The <code>NetworkInterface</code> resource object associated with * the result of this action. * @see CreateNetworkInterfaceRequest */ com.amazonaws.resources.ec2.NetworkInterface createNetworkInterface( CreateNetworkInterfaceRequest request, ResultCapture<CreateNetworkInterfaceResult> extractor);
/** * Performs the <code>CreateNetworkInterface</code> action. * * <p> * The following request parameters will be populated from the data of this * <code>Subnet</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><code>SubnetId</code></b> * - mapped from the <code>Id</code> identifier. * </li> * </ul> * * <p> * * @return The <code>NetworkInterface</code> resource object associated with * the result of this action. * @see CreateNetworkInterfaceRequest */ NetworkInterface createNetworkInterface(CreateNetworkInterfaceRequest request);
/** * Performs the <code>CreateNetworkInterface</code> action and use a * ResultCapture to retrieve the low-level client response. * * <p> * The following request parameters will be populated from the data of this * <code>Subnet</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><code>SubnetId</code></b> * - mapped from the <code>Id</code> identifier. * </li> * </ul> * * <p> * * @return The <code>NetworkInterface</code> resource object associated with * the result of this action. * @see CreateNetworkInterfaceRequest */ NetworkInterface createNetworkInterface(CreateNetworkInterfaceRequest request, ResultCapture<CreateNetworkInterfaceResult> extractor);