@@ -432,6 +432,41 @@ def get(
432432 cast_to = cast (Type [Optional [GatewayRule ]], ResultWrapper [GatewayRule ]),
433433 )
434434
435+ def list_tenant (
436+ self ,
437+ * ,
438+ account_id : str ,
439+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
440+ # The extra values given here take precedence over values defined on the client or passed to this method.
441+ extra_headers : Headers | None = None ,
442+ extra_query : Query | None = None ,
443+ extra_body : Body | None = None ,
444+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
445+ ) -> SyncSinglePage [GatewayRule ]:
446+ """
447+ List Zero Trust Gateway rules for the parent account of an account in the MSP
448+ configuration.
449+
450+ Args:
451+ extra_headers: Send extra headers
452+
453+ extra_query: Add additional query parameters to the request
454+
455+ extra_body: Add additional JSON properties to the request
456+
457+ timeout: Override the client-level default timeout for this request, in seconds
458+ """
459+ if not account_id :
460+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
461+ return self ._get_api_list (
462+ f"/accounts/{ account_id } /gateway/rules/tenant" ,
463+ page = SyncSinglePage [GatewayRule ],
464+ options = make_request_options (
465+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
466+ ),
467+ model = GatewayRule ,
468+ )
469+
435470 def reset_expiration (
436471 self ,
437472 rule_id : str ,
@@ -880,6 +915,41 @@ async def get(
880915 cast_to = cast (Type [Optional [GatewayRule ]], ResultWrapper [GatewayRule ]),
881916 )
882917
918+ def list_tenant (
919+ self ,
920+ * ,
921+ account_id : str ,
922+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
923+ # The extra values given here take precedence over values defined on the client or passed to this method.
924+ extra_headers : Headers | None = None ,
925+ extra_query : Query | None = None ,
926+ extra_body : Body | None = None ,
927+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
928+ ) -> AsyncPaginator [GatewayRule , AsyncSinglePage [GatewayRule ]]:
929+ """
930+ List Zero Trust Gateway rules for the parent account of an account in the MSP
931+ configuration.
932+
933+ Args:
934+ extra_headers: Send extra headers
935+
936+ extra_query: Add additional query parameters to the request
937+
938+ extra_body: Add additional JSON properties to the request
939+
940+ timeout: Override the client-level default timeout for this request, in seconds
941+ """
942+ if not account_id :
943+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
944+ return self ._get_api_list (
945+ f"/accounts/{ account_id } /gateway/rules/tenant" ,
946+ page = AsyncSinglePage [GatewayRule ],
947+ options = make_request_options (
948+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
949+ ),
950+ model = GatewayRule ,
951+ )
952+
883953 async def reset_expiration (
884954 self ,
885955 rule_id : str ,
@@ -944,6 +1014,9 @@ def __init__(self, rules: RulesResource) -> None:
9441014 self .get = to_raw_response_wrapper (
9451015 rules .get ,
9461016 )
1017+ self .list_tenant = to_raw_response_wrapper (
1018+ rules .list_tenant ,
1019+ )
9471020 self .reset_expiration = to_raw_response_wrapper (
9481021 rules .reset_expiration ,
9491022 )
@@ -968,6 +1041,9 @@ def __init__(self, rules: AsyncRulesResource) -> None:
9681041 self .get = async_to_raw_response_wrapper (
9691042 rules .get ,
9701043 )
1044+ self .list_tenant = async_to_raw_response_wrapper (
1045+ rules .list_tenant ,
1046+ )
9711047 self .reset_expiration = async_to_raw_response_wrapper (
9721048 rules .reset_expiration ,
9731049 )
@@ -992,6 +1068,9 @@ def __init__(self, rules: RulesResource) -> None:
9921068 self .get = to_streamed_response_wrapper (
9931069 rules .get ,
9941070 )
1071+ self .list_tenant = to_streamed_response_wrapper (
1072+ rules .list_tenant ,
1073+ )
9951074 self .reset_expiration = to_streamed_response_wrapper (
9961075 rules .reset_expiration ,
9971076 )
@@ -1016,6 +1095,9 @@ def __init__(self, rules: AsyncRulesResource) -> None:
10161095 self .get = async_to_streamed_response_wrapper (
10171096 rules .get ,
10181097 )
1098+ self .list_tenant = async_to_streamed_response_wrapper (
1099+ rules .list_tenant ,
1100+ )
10191101 self .reset_expiration = async_to_streamed_response_wrapper (
10201102 rules .reset_expiration ,
10211103 )
0 commit comments