Skip to content

Commit 2ad2262

Browse files
authored
feat(iam): add filtering on multiple IDs on listing endpoints (#1972)
1 parent 70eec6d commit 2ad2262

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

api/iam/v1alpha1/iam_sdk.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ type ListAPIKeysRequest struct {
12541254
// Expired: defines whether to filter out expired API keys or not.
12551255
Expired *bool `json:"-"`
12561256

1257-
// AccessKey: filter by access key.
1257+
// Deprecated: AccessKey: filter by access key (deprecated in favor of `access_keys`).
12581258
AccessKey *string `json:"-"`
12591259

12601260
// Description: filter by description.
@@ -1266,6 +1266,9 @@ type ListAPIKeysRequest struct {
12661266
// BearerType: filter by type of bearer.
12671267
// Default value: unknown_bearer_type
12681268
BearerType BearerType `json:"-"`
1269+
1270+
// AccessKeys: filter by a list of access keys.
1271+
AccessKeys []string `json:"-"`
12691272
}
12701273

12711274
// ListAPIKeysResponse: list api keys response.
@@ -1596,6 +1599,9 @@ type ListPoliciesRequest struct {
15961599

15971600
// Tag: filter by tags containing a given string.
15981601
Tag *string `json:"-"`
1602+
1603+
// PolicyIDs: filter by a list of IDs.
1604+
PolicyIDs []string `json:"-"`
15991605
}
16001606

16011607
// ListPoliciesResponse: list policies response.
@@ -2638,6 +2644,7 @@ func (s *API) ListPolicies(req *ListPoliciesRequest, opts ...scw.RequestOption)
26382644
parameter.AddToQuery(query, "no_principal", req.NoPrincipal)
26392645
parameter.AddToQuery(query, "policy_name", req.PolicyName)
26402646
parameter.AddToQuery(query, "tag", req.Tag)
2647+
parameter.AddToQuery(query, "policy_ids", req.PolicyIDs)
26412648

26422649
scwReq := &scw.ScalewayRequest{
26432650
Method: "GET",
@@ -2889,6 +2896,7 @@ func (s *API) ListAPIKeys(req *ListAPIKeysRequest, opts ...scw.RequestOption) (*
28892896
parameter.AddToQuery(query, "description", req.Description)
28902897
parameter.AddToQuery(query, "bearer_id", req.BearerID)
28912898
parameter.AddToQuery(query, "bearer_type", req.BearerType)
2899+
parameter.AddToQuery(query, "access_keys", req.AccessKeys)
28922900
parameter.AddToQuery(query, "application_id", req.ApplicationID)
28932901
parameter.AddToQuery(query, "user_id", req.UserID)
28942902

0 commit comments

Comments
 (0)