Search in sources :

Example 1 with Insert

use of com.google.api.services.compute.Compute.InstanceGroups.Insert in project cloudbreak by hortonworks.

the class GcpInstanceGroupResourceBuilder method build.

@Override
public CloudResource build(GcpContext context, AuthenticatedContext auth, Group group, Network network, Security security, CloudResource resource) throws Exception {
    LOGGER.info("Building GCP instancegroup {} for project {}", group.getName(), context.getProjectId());
    Insert insert = context.getCompute().instanceGroups().insert(context.getProjectId(), context.getLocation().getAvailabilityZone().value(), new InstanceGroup().setName(resource.getName()));
    return executeOperationalRequest(resource, insert);
}
Also used : Insert(com.google.api.services.compute.Compute.InstanceGroups.Insert) InstanceGroup(com.google.api.services.compute.model.InstanceGroup)

Aggregations

Insert (com.google.api.services.compute.Compute.InstanceGroups.Insert)1 InstanceGroup (com.google.api.services.compute.model.InstanceGroup)1