MCPcopy Create free account
hub / github.com/coldbrewcloud/coldbrew-cli / UpdateService

Method UpdateService

aws/ecs/client.go:214–242  ·  view source on GitHub ↗
(clusterName, serviceName, taskDefARN string, desiredCount uint16)

Source from the content-addressed store, hash-verified

212}
213
214func (c *Client) UpdateService(clusterName, serviceName, taskDefARN string, desiredCount uint16) (*_ecs.Service, error) {
215 if clusterName == "" {
216 return nil, errors.New("clusterName is empty")
217 }
218 if serviceName == "" {
219 return nil, errors.New("serviceName is empty")
220 }
221 if taskDefARN == "" {
222 return nil, errors.New("taskDefARN is empty")
223 }
224
225 params := &_ecs.UpdateServiceInput{
226 Service: _aws.String(serviceName),
227 Cluster: _aws.String(clusterName),
228 DesiredCount: _aws.Int64(int64(desiredCount)),
229 TaskDefinition: _aws.String(taskDefARN),
230 DeploymentConfiguration: &_ecs.DeploymentConfiguration{
231 MaximumPercent: _aws.Int64(200),
232 MinimumHealthyPercent: _aws.Int64(50),
233 },
234 }
235
236 res, err := c.svc.UpdateService(params)
237 if err != nil {
238 return nil, err
239 }
240
241 return res.Service, nil
242}
243
244func (c *Client) DeleteService(clusterName, serviceName string) error {
245 params := &_ecs.DeleteServiceInput{

Callers 2

updateECSServiceMethod · 0.80
RunMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected