Skip to content

Commit 953ea46

Browse files
feat(api): api update
1 parent 1a1599f commit 953ea46

File tree

4 files changed

+425
-238
lines changed

4 files changed

+425
-238
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1742
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-babe0d060817f6b0b5be1c3cb585e4e56cae6202c4569b3e5681b856fa38a98a.yml
3-
openapi_spec_hash: 5799886c97f4447ddbfce4c6fccf3fe1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-210311486e08edcaebbdb9f768581abcf93a533da2ba5a0dbdae8571a0dd47cd.yml
3+
openapi_spec_hash: 89af9166237af6fcdc5d0b138ab9e73a
44
config_hash: cb36b26a5fcc81fa60c65016b1e74f0a

src/cloudflare/resources/accounts/logs/audit.py

Lines changed: 54 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -52,30 +52,30 @@ def list(
5252
account_id: str,
5353
before: Union[str, date],
5454
since: Union[str, date],
55-
account_name: str | NotGiven = NOT_GIVEN,
56-
action_result: Literal["success", "failure"] | NotGiven = NOT_GIVEN,
57-
action_type: Literal["create", "delete", "view", "update"] | NotGiven = NOT_GIVEN,
58-
actor_context: Literal["api_key", "api_token", "dash", "oauth", "origin_ca_key"] | NotGiven = NOT_GIVEN,
59-
actor_email: str | NotGiven = NOT_GIVEN,
60-
actor_id: str | NotGiven = NOT_GIVEN,
61-
actor_ip_address: str | NotGiven = NOT_GIVEN,
62-
actor_token_id: str | NotGiven = NOT_GIVEN,
63-
actor_token_name: str | NotGiven = NOT_GIVEN,
64-
actor_type: Literal["cloudflare_admin", "account", "user"] | NotGiven = NOT_GIVEN,
65-
audit_log_id: str | NotGiven = NOT_GIVEN,
55+
account_name: audit_list_params.AccountName | NotGiven = NOT_GIVEN,
56+
action_result: audit_list_params.ActionResult | NotGiven = NOT_GIVEN,
57+
action_type: audit_list_params.ActionType | NotGiven = NOT_GIVEN,
58+
actor_context: audit_list_params.ActorContext | NotGiven = NOT_GIVEN,
59+
actor_email: audit_list_params.ActorEmail | NotGiven = NOT_GIVEN,
60+
actor_id: audit_list_params.ActorID | NotGiven = NOT_GIVEN,
61+
actor_ip_address: audit_list_params.ActorIPAddress | NotGiven = NOT_GIVEN,
62+
actor_token_id: audit_list_params.ActorTokenID | NotGiven = NOT_GIVEN,
63+
actor_token_name: audit_list_params.ActorTokenName | NotGiven = NOT_GIVEN,
64+
actor_type: audit_list_params.ActorType | NotGiven = NOT_GIVEN,
65+
audit_log_id: audit_list_params.AuditLogID | NotGiven = NOT_GIVEN,
6666
cursor: str | NotGiven = NOT_GIVEN,
6767
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
6868
limit: float | NotGiven = NOT_GIVEN,
69-
raw_cf_rayid: str | NotGiven = NOT_GIVEN,
70-
raw_method: str | NotGiven = NOT_GIVEN,
71-
raw_status_code: int | NotGiven = NOT_GIVEN,
72-
raw_uri: str | NotGiven = NOT_GIVEN,
73-
resource_id: str | NotGiven = NOT_GIVEN,
74-
resource_product: str | NotGiven = NOT_GIVEN,
75-
resource_scope: Literal["accounts", "user", "zones"] | NotGiven = NOT_GIVEN,
76-
resource_type: str | NotGiven = NOT_GIVEN,
77-
zone_id: str | NotGiven = NOT_GIVEN,
78-
zone_name: str | NotGiven = NOT_GIVEN,
69+
raw_cf_rayid: audit_list_params.RawCfRayID | NotGiven = NOT_GIVEN,
70+
raw_method: audit_list_params.RawMethod | NotGiven = NOT_GIVEN,
71+
raw_status_code: audit_list_params.RawStatusCode | NotGiven = NOT_GIVEN,
72+
raw_uri: audit_list_params.RawURI | NotGiven = NOT_GIVEN,
73+
resource_id: audit_list_params.ResourceID | NotGiven = NOT_GIVEN,
74+
resource_product: audit_list_params.ResourceProduct | NotGiven = NOT_GIVEN,
75+
resource_scope: audit_list_params.ResourceScope | NotGiven = NOT_GIVEN,
76+
resource_type: audit_list_params.ResourceType | NotGiven = NOT_GIVEN,
77+
zone_id: audit_list_params.ZoneID | NotGiven = NOT_GIVEN,
78+
zone_name: audit_list_params.ZoneName | NotGiven = NOT_GIVEN,
7979
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8080
# The extra values given here take precedence over values defined on the client or passed to this method.
8181
extra_headers: Headers | None = None,
@@ -94,33 +94,13 @@ def list(
9494
Args:
9595
account_id: The unique id that identifies the account.
9696
97-
before: Filters actions based on a given timestamp in the format yyyy-mm-dd, returning
98-
only logs that occurred on and before the specified date.
97+
before: Limits the returned results to logs older than the specified date. This can be a
98+
date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that
99+
conforms to RFC3339.
99100
100-
since: Filters actions based on a given timestamp in the format yyyy-mm-dd, returning
101-
only logs that occurred on and after the specified date.
102-
103-
account_name: Filters by the account name.
104-
105-
action_result: Whether the action was successful or not.
106-
107-
action_type: Filters by the action type.
108-
109-
actor_context: Filters by the actor context.
110-
111-
actor_email: Filters by the actor's email address.
112-
113-
actor_id: Filters by the actor ID. This can be either the Account ID or User ID.
114-
115-
actor_ip_address: The IP address where the action was initiated.
116-
117-
actor_token_id: Filters by the API token ID when the actor context is an api_token or oauth.
118-
119-
actor_token_name: Filters by the API token name when the actor context is an api_token or oauth.
120-
121-
actor_type: Filters by the actor type.
122-
123-
audit_log_id: Finds a specific log by its ID.
101+
since: Limits the returned results to logs newer than the specified date. This can be a
102+
date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that
103+
conforms to RFC3339.
124104
125105
cursor: The cursor is an opaque token used to paginate through large sets of records. It
126106
indicates the position from which to continue when requesting the next set of
@@ -132,28 +112,6 @@ def list(
132112
limit: The number limits the objects to return. The cursor attribute may be used to
133113
iterate over the next batch of objects if there are more than the limit.
134114
135-
raw_cf_rayid: Filters by the response CF Ray ID.
136-
137-
raw_method: The HTTP method for the API call.
138-
139-
raw_status_code: The response status code that was returned.
140-
141-
raw_uri: Filters by the request URI.
142-
143-
resource_id: Filters by the resource ID.
144-
145-
resource_product: Filters audit logs by the Cloudflare product associated with the changed
146-
resource.
147-
148-
resource_scope: Filters by the resource scope, specifying whether the resource is associated
149-
with an user, an account, or a zone.
150-
151-
resource_type: Filters audit logs based on the unique type of resource changed by the action.
152-
153-
zone_id: Filters by the zone ID.
154-
155-
zone_name: Filters by the zone name associated with the change.
156-
157115
extra_headers: Send extra headers
158116
159117
extra_query: Add additional query parameters to the request
@@ -234,30 +192,30 @@ def list(
234192
account_id: str,
235193
before: Union[str, date],
236194
since: Union[str, date],
237-
account_name: str | NotGiven = NOT_GIVEN,
238-
action_result: Literal["success", "failure"] | NotGiven = NOT_GIVEN,
239-
action_type: Literal["create", "delete", "view", "update"] | NotGiven = NOT_GIVEN,
240-
actor_context: Literal["api_key", "api_token", "dash", "oauth", "origin_ca_key"] | NotGiven = NOT_GIVEN,
241-
actor_email: str | NotGiven = NOT_GIVEN,
242-
actor_id: str | NotGiven = NOT_GIVEN,
243-
actor_ip_address: str | NotGiven = NOT_GIVEN,
244-
actor_token_id: str | NotGiven = NOT_GIVEN,
245-
actor_token_name: str | NotGiven = NOT_GIVEN,
246-
actor_type: Literal["cloudflare_admin", "account", "user"] | NotGiven = NOT_GIVEN,
247-
audit_log_id: str | NotGiven = NOT_GIVEN,
195+
account_name: audit_list_params.AccountName | NotGiven = NOT_GIVEN,
196+
action_result: audit_list_params.ActionResult | NotGiven = NOT_GIVEN,
197+
action_type: audit_list_params.ActionType | NotGiven = NOT_GIVEN,
198+
actor_context: audit_list_params.ActorContext | NotGiven = NOT_GIVEN,
199+
actor_email: audit_list_params.ActorEmail | NotGiven = NOT_GIVEN,
200+
actor_id: audit_list_params.ActorID | NotGiven = NOT_GIVEN,
201+
actor_ip_address: audit_list_params.ActorIPAddress | NotGiven = NOT_GIVEN,
202+
actor_token_id: audit_list_params.ActorTokenID | NotGiven = NOT_GIVEN,
203+
actor_token_name: audit_list_params.ActorTokenName | NotGiven = NOT_GIVEN,
204+
actor_type: audit_list_params.ActorType | NotGiven = NOT_GIVEN,
205+
audit_log_id: audit_list_params.AuditLogID | NotGiven = NOT_GIVEN,
248206
cursor: str | NotGiven = NOT_GIVEN,
249207
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
250208
limit: float | NotGiven = NOT_GIVEN,
251-
raw_cf_rayid: str | NotGiven = NOT_GIVEN,
252-
raw_method: str | NotGiven = NOT_GIVEN,
253-
raw_status_code: int | NotGiven = NOT_GIVEN,
254-
raw_uri: str | NotGiven = NOT_GIVEN,
255-
resource_id: str | NotGiven = NOT_GIVEN,
256-
resource_product: str | NotGiven = NOT_GIVEN,
257-
resource_scope: Literal["accounts", "user", "zones"] | NotGiven = NOT_GIVEN,
258-
resource_type: str | NotGiven = NOT_GIVEN,
259-
zone_id: str | NotGiven = NOT_GIVEN,
260-
zone_name: str | NotGiven = NOT_GIVEN,
209+
raw_cf_rayid: audit_list_params.RawCfRayID | NotGiven = NOT_GIVEN,
210+
raw_method: audit_list_params.RawMethod | NotGiven = NOT_GIVEN,
211+
raw_status_code: audit_list_params.RawStatusCode | NotGiven = NOT_GIVEN,
212+
raw_uri: audit_list_params.RawURI | NotGiven = NOT_GIVEN,
213+
resource_id: audit_list_params.ResourceID | NotGiven = NOT_GIVEN,
214+
resource_product: audit_list_params.ResourceProduct | NotGiven = NOT_GIVEN,
215+
resource_scope: audit_list_params.ResourceScope | NotGiven = NOT_GIVEN,
216+
resource_type: audit_list_params.ResourceType | NotGiven = NOT_GIVEN,
217+
zone_id: audit_list_params.ZoneID | NotGiven = NOT_GIVEN,
218+
zone_name: audit_list_params.ZoneName | NotGiven = NOT_GIVEN,
261219
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
262220
# The extra values given here take precedence over values defined on the client or passed to this method.
263221
extra_headers: Headers | None = None,
@@ -276,33 +234,13 @@ def list(
276234
Args:
277235
account_id: The unique id that identifies the account.
278236
279-
before: Filters actions based on a given timestamp in the format yyyy-mm-dd, returning
280-
only logs that occurred on and before the specified date.
237+
before: Limits the returned results to logs older than the specified date. This can be a
238+
date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that
239+
conforms to RFC3339.
281240
282-
since: Filters actions based on a given timestamp in the format yyyy-mm-dd, returning
283-
only logs that occurred on and after the specified date.
284-
285-
account_name: Filters by the account name.
286-
287-
action_result: Whether the action was successful or not.
288-
289-
action_type: Filters by the action type.
290-
291-
actor_context: Filters by the actor context.
292-
293-
actor_email: Filters by the actor's email address.
294-
295-
actor_id: Filters by the actor ID. This can be either the Account ID or User ID.
296-
297-
actor_ip_address: The IP address where the action was initiated.
298-
299-
actor_token_id: Filters by the API token ID when the actor context is an api_token or oauth.
300-
301-
actor_token_name: Filters by the API token name when the actor context is an api_token or oauth.
302-
303-
actor_type: Filters by the actor type.
304-
305-
audit_log_id: Finds a specific log by its ID.
241+
since: Limits the returned results to logs newer than the specified date. This can be a
242+
date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that
243+
conforms to RFC3339.
306244
307245
cursor: The cursor is an opaque token used to paginate through large sets of records. It
308246
indicates the position from which to continue when requesting the next set of
@@ -314,28 +252,6 @@ def list(
314252
limit: The number limits the objects to return. The cursor attribute may be used to
315253
iterate over the next batch of objects if there are more than the limit.
316254
317-
raw_cf_rayid: Filters by the response CF Ray ID.
318-
319-
raw_method: The HTTP method for the API call.
320-
321-
raw_status_code: The response status code that was returned.
322-
323-
raw_uri: Filters by the request URI.
324-
325-
resource_id: Filters by the resource ID.
326-
327-
resource_product: Filters audit logs by the Cloudflare product associated with the changed
328-
resource.
329-
330-
resource_scope: Filters by the resource scope, specifying whether the resource is associated
331-
with an user, an account, or a zone.
332-
333-
resource_type: Filters audit logs based on the unique type of resource changed by the action.
334-
335-
zone_id: Filters by the zone ID.
336-
337-
zone_name: Filters by the zone name associated with the change.
338-
339255
extra_headers: Send extra headers
340256
341257
extra_query: Add additional query parameters to the request

0 commit comments

Comments
 (0)