Skip to content

Commit 1432d92

Browse files
authored
feat(serverless): change UpdateTriggerRequest to only be able to update a few fields (#1618)
1 parent e5858e8 commit 1432d92

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

api/function/v1beta1/function_sdk.go

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,31 +1039,7 @@ type TriggerSqsClientConfig struct {
10391039
SecretKey string `json:"secret_key"`
10401040
}
10411041

1042-
type UpdateTriggerRequestMnqNatsClientConfig struct {
1043-
MnqNamespaceID string `json:"mnq_namespace_id"`
1044-
1045-
Subject string `json:"subject"`
1046-
1047-
MnqProjectID string `json:"mnq_project_id"`
1048-
1049-
MnqRegion string `json:"mnq_region"`
1050-
}
1051-
1052-
type UpdateTriggerRequestMnqSqsClientConfig struct {
1053-
MnqNamespaceID string `json:"mnq_namespace_id"`
1054-
1055-
Queue string `json:"queue"`
1056-
1057-
MnqProjectID string `json:"mnq_project_id"`
1058-
1059-
MnqRegion string `json:"mnq_region"`
1060-
}
1061-
10621042
type UpdateTriggerRequestSqsClientConfig struct {
1063-
Endpoint string `json:"endpoint"`
1064-
1065-
QueueURL string `json:"queue_url"`
1066-
10671043
AccessKey string `json:"access_key"`
10681044

10691045
SecretKey string `json:"secret_key"`
@@ -2628,14 +2604,8 @@ type UpdateTriggerRequest struct {
26282604

26292605
Description *string `json:"description"`
26302606

2631-
// Precisely one of ScwNatsConfig, ScwSqsConfig, SqsConfig must be set.
2632-
ScwSqsConfig *UpdateTriggerRequestMnqSqsClientConfig `json:"scw_sqs_config,omitempty"`
2633-
2634-
// Precisely one of ScwNatsConfig, ScwSqsConfig, SqsConfig must be set.
2607+
// Precisely one of SqsConfig must be set.
26352608
SqsConfig *UpdateTriggerRequestSqsClientConfig `json:"sqs_config,omitempty"`
2636-
2637-
// Precisely one of ScwNatsConfig, ScwSqsConfig, SqsConfig must be set.
2638-
ScwNatsConfig *UpdateTriggerRequestMnqNatsClientConfig `json:"scw_nats_config,omitempty"`
26392609
}
26402610

26412611
func (s *API) UpdateTrigger(req *UpdateTriggerRequest, opts ...scw.RequestOption) (*Trigger, error) {

0 commit comments

Comments
 (0)