@@ -144,6 +144,35 @@ func (r *GatewayRuleService) Get(ctx context.Context, ruleID string, query Gatew
144144 return
145145}
146146
147+ // List Zero Trust Gateway rules for the parent account of an account in the MSP
148+ // configuration.
149+ func (r * GatewayRuleService ) ListTenant (ctx context.Context , query GatewayRuleListTenantParams , opts ... option.RequestOption ) (res * pagination.SinglePage [GatewayRule ], err error ) {
150+ var raw * http.Response
151+ opts = slices .Concat (r .Options , opts )
152+ opts = append ([]option.RequestOption {option .WithResponseInto (& raw )}, opts ... )
153+ if query .AccountID .Value == "" {
154+ err = errors .New ("missing required account_id parameter" )
155+ return
156+ }
157+ path := fmt .Sprintf ("accounts/%s/gateway/rules/tenant" , query .AccountID )
158+ cfg , err := requestconfig .NewRequestConfig (ctx , http .MethodGet , path , nil , & res , opts ... )
159+ if err != nil {
160+ return nil , err
161+ }
162+ err = cfg .Execute ()
163+ if err != nil {
164+ return nil , err
165+ }
166+ res .SetPageConfig (cfg , raw )
167+ return res , nil
168+ }
169+
170+ // List Zero Trust Gateway rules for the parent account of an account in the MSP
171+ // configuration.
172+ func (r * GatewayRuleService ) ListTenantAutoPaging (ctx context.Context , query GatewayRuleListTenantParams , opts ... option.RequestOption ) * pagination.SinglePageAutoPager [GatewayRule ] {
173+ return pagination .NewSinglePageAutoPager (r .ListTenant (ctx , query , opts ... ))
174+ }
175+
147176// Resets the expiration of a Zero Trust Gateway Rule if its duration elapsed and
148177// it has a default duration. The Zero Trust Gateway Rule must have values for both
149178// `expiration.expires_at` and `expiration.duration`.
@@ -2001,6 +2030,10 @@ func (r GatewayRuleGetResponseEnvelopeSuccess) IsKnown() bool {
20012030 return false
20022031}
20032032
2033+ type GatewayRuleListTenantParams struct {
2034+ AccountID param.Field [string ] `path:"account_id,required"`
2035+ }
2036+
20042037type GatewayRuleResetExpirationParams struct {
20052038 AccountID param.Field [string ] `path:"account_id,required"`
20062039}
0 commit comments