Skip to content

Commit

Permalink
feat: implement GetAwsHybridMachinePools func
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-ibra committed Dec 6, 2024
1 parent 23da619 commit e6fc295
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions client/hybrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ func (h *V1Client) PutAwsHybridConfig(configUID string, hybridConfig *models.V1A
return err
}

// GetAwsHybridMachinePools returns the specified AWS Cluster's Edge-Native machine pool configuration
func (h *V1Client) GetAwsHybridMachinePools(configUID, machinePoolName string) (*models.V1HybridEdgeNativeMachinePoolConfig, error) {
params := clientv1.NewV1AwsCloudConfigsEdgeNativeMachinePoolGetParamsWithContext(h.ctx).
WithConfigUID(configUID).
WithMachinePoolName(machinePoolName)

resp, err := h.Client.V1AwsCloudConfigsEdgeNativeMachinePoolGet(params)
if err != nil {
return nil, err
}

return resp.Payload, nil
}

// CreateAwsHybridMachinePool creates a Hybrid AWS cloud config's Edge-Native machine pool
func (h *V1Client) CreateAwsHybridMachinePool(configUID string, machinePoolConfig *models.V1HybridEdgeNativeMachinePoolConfigEntity) error {
params := clientv1.NewV1AwsCloudConfigsEdgeNativeUIDMachinePoolCreateParamsWithContext(h.ctx).
Expand Down

0 comments on commit e6fc295

Please sign in to comment.