Skip to content

Commit e2cfe2a

Browse files
approving deployment group work
1 parent 4df1be7 commit e2cfe2a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

stack_deployment_groups.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ type StackDeploymentGroups interface {
1414

1515
// Read retrieves a stack deployment group by its ID.
1616
Read(ctx context.Context, stackDeploymentGroupID string) (*StackDeploymentGroup, error)
17+
18+
ApproveAllPlans(ctx context.Context, stackDeploymentGroupID string) error
1719
}
1820

1921
type DeploymentGroupStatus string
@@ -99,3 +101,16 @@ func (s stackDeploymentGroups) Read(ctx context.Context, stackDeploymentGroupID
99101

100102
return sdg, nil
101103
}
104+
105+
func (s stackDeploymentGroups) ApproveAllPlans(ctx context.Context, stackDeploymentGroupID string) error {
106+
if !validStringID(&stackDeploymentGroupID) {
107+
return fmt.Errorf("invalid stack deployment group ID: %s", stackDeploymentGroupID)
108+
}
109+
110+
req, err := s.client.NewRequest("POST", fmt.Sprintf("stack-deployment-groups/%s/approve-all-plans", url.PathEscape(stackDeploymentGroupID)), nil)
111+
if err != nil {
112+
return err
113+
}
114+
115+
return req.Do(ctx, nil)
116+
}

0 commit comments

Comments
 (0)