Debian Codegraph @

src/auth0/management/actions/executions/client.py

raw symbols SCIP
1 # This file was auto-generated by Fern from our API Definition.
2
3 import typing
4
5 from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6 from ...core.request_options import RequestOptions
7 from ...types.get_action_execution_response_content import GetActionExecutionResponseContent
8 from .raw_client import AsyncRawExecutionsClient, RawExecutionsClient
9
10
11 class ExecutionsClient:
12 def __init__(self, *, client_wrapper: SyncClientWrapper):
13 self._raw_client = RawExecutionsClient(client_wrapper=client_wrapper)
14
15 @property
16 def with_raw_response(self) -> RawExecutionsClient:
17 """
18 Retrieves a raw implementation of this client that returns raw responses.
19
20 Returns
21 -------
22 RawExecutionsClient
23 """
24 return self._raw_client
25
26 def get(
27 self, id: str, *, request_options: typing.Optional[RequestOptions] = None
28 ) -> GetActionExecutionResponseContent:
29 """
30 Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation.
31
32 Parameters
33 ----------
34 id : str
35 The ID of the execution to retrieve.
36
37 request_options : typing.Optional[RequestOptions]
38 Request-specific configuration.
39
40 Returns
41 -------
42 GetActionExecutionResponseContent
43 The execution was retrieved.
44
45 Examples
46 --------
47 from auth0 import Auth0
48
49 client = Auth0(
50 token="YOUR_TOKEN",
51 )
52 client.actions.executions.get(
53 id="id",
54 )
55 """
56 _response = self._raw_client.get(id, request_options=request_options)
57 return _response.data
58
59
60 class AsyncExecutionsClient:
61 def __init__(self, *, client_wrapper: AsyncClientWrapper):
62 self._raw_client = AsyncRawExecutionsClient(client_wrapper=client_wrapper)
63
64 @property
65 def with_raw_response(self) -> AsyncRawExecutionsClient:
66 """
67 Retrieves a raw implementation of this client that returns raw responses.
68
69 Returns
70 -------
71 AsyncRawExecutionsClient
72 """
73 return self._raw_client
74
75 async def get(
76 self, id: str, *, request_options: typing.Optional[RequestOptions] = None
77 ) -> GetActionExecutionResponseContent:
78 """
79 Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation.
80
81 Parameters
82 ----------
83 id : str
84 The ID of the execution to retrieve.
85
86 request_options : typing.Optional[RequestOptions]
87 Request-specific configuration.
88
89 Returns
90 -------
91 GetActionExecutionResponseContent
92 The execution was retrieved.
93
94 Examples
95 --------
96 import asyncio
97
98 from auth0 import AsyncAuth0
99
100 client = AsyncAuth0(
101 token="YOUR_TOKEN",
102 )
103
104
105 async def main() -> None:
106 await client.actions.executions.get(
107 id="id",
108 )
109
110
111 asyncio.run(main())
112 """
113 _response = await self._raw_client.get(id, request_options=request_options)
114 return _response.data