Create creates a new InstanceGroup and returns its ID.
(ctx context.Context, group InstanceGroup)
| 156 | |
| 157 | // Create creates a new InstanceGroup and returns its ID. |
| 158 | func (x *awsOceanService) Create(ctx context.Context, group InstanceGroup) (string, error) { |
| 159 | input := &awsoc.CreateClusterInput{ |
| 160 | Cluster: group.Obj().(*awsoc.Cluster), |
| 161 | } |
| 162 | |
| 163 | output, err := x.svc.CreateCluster(ctx, input) |
| 164 | if err != nil { |
| 165 | return "", err |
| 166 | } |
| 167 | |
| 168 | return fi.ValueOf(output.Cluster.ID), nil |
| 169 | } |
| 170 | |
| 171 | // Read returns an existing InstanceGroup by ID. |
| 172 | func (x *awsOceanService) Read(ctx context.Context, clusterID string) (InstanceGroup, error) { |
nothing calls this directly
no test coverage detected