Create creates a new LaunchSpec and returns its ID.
(ctx context.Context, spec LaunchSpec)
| 259 | |
| 260 | // Create creates a new LaunchSpec and returns its ID. |
| 261 | func (x *awsOceanLaunchSpecService) Create(ctx context.Context, spec LaunchSpec) (string, error) { |
| 262 | input := &awsoc.CreateLaunchSpecInput{ |
| 263 | LaunchSpec: spec.Obj().(*awsoc.LaunchSpec), |
| 264 | } |
| 265 | |
| 266 | output, err := x.svc.CreateLaunchSpec(ctx, input) |
| 267 | if err != nil { |
| 268 | return "", err |
| 269 | } |
| 270 | |
| 271 | return fi.ValueOf(output.LaunchSpec.ID), nil |
| 272 | } |
| 273 | |
| 274 | // Read returns an existing LaunchSpec by ID. |
| 275 | func (x *awsOceanLaunchSpecService) Read(ctx context.Context, specID string) (LaunchSpec, error) { |