Java 类com.amazonaws.services.ec2.model.CreateVpcResult 实例源码

项目:photon-model    文件:AWSNetworkClient.java   
/**
 * Creates the VPC and returns the VPC id
 */
public String createVPC(String subnetCidr) {
    CreateVpcRequest req = new CreateVpcRequest().withCidrBlock(subnetCidr);
    CreateVpcResult vpc = this.client.createVpc(req);

    return vpc.getVpc().getVpcId();
}
项目:aws-sdk-java-resources    文件:EC2Impl.java   
@Override
public Vpc createVpc(CreateVpcRequest request,
        ResultCapture<CreateVpcResult> extractor) {

    ActionResult result = service.performAction("CreateVpc", request,
            extractor);

    if (result == null) return null;
    return new VpcImpl(result.getResource());
}
项目:aws-sdk-java-resources    文件:EC2Impl.java   
@Override
public Vpc createVpc(String cidrBlock, ResultCapture<CreateVpcResult>
        extractor) {

    CreateVpcRequest request = new CreateVpcRequest()
        .withCidrBlock(cidrBlock);
    return createVpc(request, extractor);
}
项目:aws-mock    文件:BaseTest.java   
/**
 * Create VPC.
 *
 * @param cidrBlock the cidr block
 * @param instanceTenancy the instance tenancy
 * @return New vpc
 */
protected final Vpc createVpc(final String cidrBlock, final String instanceTenancy) {
    CreateVpcRequest req = new CreateVpcRequest();
    req.setCidrBlock(cidrBlock);
    req.setInstanceTenancy(instanceTenancy);
    CreateVpcResult result = amazonEC2Client.createVpc(req);
    return result.getVpc();
}
项目:elasticsearch_my    文件:AmazonEC2Mock.java   
@Override
public CreateVpcResult createVpc(CreateVpcRequest createVpcRequest) throws AmazonServiceException, AmazonClientException {
    throw new UnsupportedOperationException("Not supported in mock");
}
项目:aws-sdk-java-resources    文件:EC2Impl.java   
@Override
public Vpc createVpc(String cidrBlock) {
    return createVpc(cidrBlock, (ResultCapture<CreateVpcResult>)null);
}
项目:aws-sdk-java-resources    文件:EC2.java   
/**
 * Performs the <code>CreateVpc</code> action and use a ResultCapture to
 * retrieve the low-level client response.
 *
 * <p>
 *
 * @return The <code>Vpc</code> resource object associated with the result
 *         of this action.
 * @see CreateVpcRequest
 */
com.amazonaws.resources.ec2.Vpc createVpc(CreateVpcRequest request,
        ResultCapture<CreateVpcResult> extractor);
项目:aws-sdk-java-resources    文件:EC2.java   
/**
 * The convenient method form for the <code>CreateVpc</code> action.
 *
 * @see #createVpc(CreateVpcRequest, ResultCapture)
 */
com.amazonaws.resources.ec2.Vpc createVpc(String cidrBlock,
        ResultCapture<CreateVpcResult> extractor);