Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new SDS fields to usage API #1211

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2022-10-25 14:15:26.509580",
"spec_repo_commit": "ecf2f022"
"regenerated": "2022-10-25 16:38:53.561467",
"spec_repo_commit": "afdd6b70"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-10-25 14:15:26.532267",
"spec_repo_commit": "ecf2f022"
"regenerated": "2022-10-25 16:38:53.576826",
"spec_repo_commit": "afdd6b70"
}
}
}
63 changes: 63 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15677,6 +15677,18 @@ components:
description: Sensitive Data Scanner usage for a given organization for a given
hour.
properties:
apm_scanned_bytes:
description: "The total number of bytes scanned of APM usage across all
usage types by the Sensitive Data Scanner from the start of the given
hour\u2019s month until the given hour."
format: int64
type: integer
events_scanned_bytes:
description: "The total number of bytes scanned of Events usage across all
usage types by the Sensitive Data Scanner from the start of the given
hour\u2019s month until the given hour."
format: int64
type: integer
hour:
description: The hour for the usage.
format: date-time
Expand All @@ -15693,6 +15705,12 @@ components:
public_id:
description: The organization public ID.
type: string
rum_scanned_bytes:
description: "The total number of bytes scanned of RUM usage across all
usage types by the Sensitive Data Scanner from the start of the given
hour\u2019s month until the given hour."
format: int64
type: integer
total_scanned_bytes:
description: "The total number of bytes scanned across all usage types by
the Sensitive Data Scanner from the start of the given hour\u2019s month
Expand Down Expand Up @@ -16120,11 +16138,26 @@ components:
hours in the current date for all organizations.
format: int64
type: integer
sds_apm_scanned_bytes_sum:
description: Sum of all APM bytes scanned with sensitive data scanner over
all hours in the current date for all organizations.
format: int64
type: integer
sds_events_scanned_bytes_sum:
description: Sum of all event stream events bytes scanned with sensitive
data scanner over all hours in the current date for all organizations.
format: int64
type: integer
sds_logs_scanned_bytes_sum:
description: Shows the sum of all bytes scanned of logs usage by the Sensitive
Data Scanner over all hours in the current month for all organizations.
format: int64
type: integer
sds_rum_scanned_bytes_sum:
description: Sum of all RUM bytes scanned with sensitive data scanner over
all hours in the current date for all organizations.
format: int64
type: integer
sds_total_scanned_bytes_sum:
description: Shows the sum of all bytes scanned across all usage types by
the Sensitive Data Scanner over all hours in the current month for all
Expand Down Expand Up @@ -16458,11 +16491,26 @@ components:
hours in the current date for the given org.
format: int64
type: integer
sds_apm_scanned_bytes_sum:
description: Sum of all APM bytes scanned with sensitive data scanner over
all hours in the current date for the given org.
format: int64
type: integer
sds_events_scanned_bytes_sum:
description: Sum of all event stream events bytes scanned with sensitive
data scanner over all hours in the current date for the given org.
format: int64
type: integer
sds_logs_scanned_bytes_sum:
description: Shows the sum of all bytes scanned of logs usage by the Sensitive
Data Scanner over all hours in the current month for the given org.
format: int64
type: integer
sds_rum_scanned_bytes_sum:
description: Sum of all RUM bytes scanned with sensitive data scanner over
all hours in the current date for the given org.
format: int64
type: integer
sds_total_scanned_bytes_sum:
description: Shows the sum of all bytes scanned across all usage types by
the Sensitive Data Scanner over all hours in the current month for the
Expand Down Expand Up @@ -16833,11 +16881,26 @@ components:
hours in the current months for all organizations.
format: int64
type: integer
sds_apm_scanned_bytes_sum:
description: Sum of all APM bytes scanned with sensitive data scanner in
the current months for all organizations.
format: int64
type: integer
sds_events_scanned_bytes_sum:
description: Sum of all event stream events bytes scanned with sensitive
data scanner in the current months for all organizations.
format: int64
type: integer
sds_logs_scanned_bytes_sum:
description: Shows the sum of all bytes scanned of logs usage by the Sensitive
Data Scanner over all hours in the current month for all organizations.
format: int64
type: integer
sds_rum_scanned_bytes_sum:
description: Sum of all RUM bytes scanned with sensitive data scanner in
the current months for all organizations.
format: int64
type: integer
sds_total_scanned_bytes_sum:
description: Shows the sum of all bytes scanned across all usage types by
the Sensitive Data Scanner over all hours in the current month for all
Expand Down
24 changes: 24 additions & 0 deletions src/datadog_api_client/v1/model/usage_sds_hour.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,48 @@ class UsageSDSHour(ModelNormal):
@cached_property
def openapi_types(_):
return {
"apm_scanned_bytes": (int,),
"events_scanned_bytes": (int,),
"hour": (datetime,),
"logs_scanned_bytes": (int,),
"org_name": (str,),
"public_id": (str,),
"rum_scanned_bytes": (int,),
"total_scanned_bytes": (int,),
}

attribute_map = {
"apm_scanned_bytes": "apm_scanned_bytes",
"events_scanned_bytes": "events_scanned_bytes",
"hour": "hour",
"logs_scanned_bytes": "logs_scanned_bytes",
"org_name": "org_name",
"public_id": "public_id",
"rum_scanned_bytes": "rum_scanned_bytes",
"total_scanned_bytes": "total_scanned_bytes",
}

def __init__(
self_,
apm_scanned_bytes: Union[int, UnsetType] = unset,
events_scanned_bytes: Union[int, UnsetType] = unset,
hour: Union[datetime, UnsetType] = unset,
logs_scanned_bytes: Union[int, UnsetType] = unset,
org_name: Union[str, UnsetType] = unset,
public_id: Union[str, UnsetType] = unset,
rum_scanned_bytes: Union[int, UnsetType] = unset,
total_scanned_bytes: Union[int, UnsetType] = unset,
**kwargs,
):
"""
Sensitive Data Scanner usage for a given organization for a given hour.

:param apm_scanned_bytes: The total number of bytes scanned of APM usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
:type apm_scanned_bytes: int, optional

:param events_scanned_bytes: The total number of bytes scanned of Events usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
:type events_scanned_bytes: int, optional

:param hour: The hour for the usage.
:type hour: datetime, optional

Expand All @@ -57,9 +72,16 @@ def __init__(
:param public_id: The organization public ID.
:type public_id: str, optional

:param rum_scanned_bytes: The total number of bytes scanned of RUM usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
:type rum_scanned_bytes: int, optional

:param total_scanned_bytes: The total number of bytes scanned across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
:type total_scanned_bytes: int, optional
"""
if apm_scanned_bytes is not unset:
kwargs["apm_scanned_bytes"] = apm_scanned_bytes
if events_scanned_bytes is not unset:
kwargs["events_scanned_bytes"] = events_scanned_bytes
if hour is not unset:
kwargs["hour"] = hour
if logs_scanned_bytes is not unset:
Expand All @@ -68,6 +90,8 @@ def __init__(
kwargs["org_name"] = org_name
if public_id is not unset:
kwargs["public_id"] = public_id
if rum_scanned_bytes is not unset:
kwargs["rum_scanned_bytes"] = rum_scanned_bytes
if total_scanned_bytes is not unset:
kwargs["total_scanned_bytes"] = total_scanned_bytes
super().__init__(kwargs)
24 changes: 24 additions & 0 deletions src/datadog_api_client/v1/model/usage_summary_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ def openapi_types(_):
"rum_session_count_sum": (int,),
"rum_total_session_count_sum": (int,),
"rum_units_sum": (int,),
"sds_apm_scanned_bytes_sum": (int,),
"sds_events_scanned_bytes_sum": (int,),
"sds_logs_scanned_bytes_sum": (int,),
"sds_rum_scanned_bytes_sum": (int,),
"sds_total_scanned_bytes_sum": (int,),
"synthetics_browser_check_calls_count_sum": (int,),
"synthetics_check_calls_count_sum": (int,),
Expand Down Expand Up @@ -152,7 +155,10 @@ def openapi_types(_):
"rum_session_count_sum": "rum_session_count_sum",
"rum_total_session_count_sum": "rum_total_session_count_sum",
"rum_units_sum": "rum_units_sum",
"sds_apm_scanned_bytes_sum": "sds_apm_scanned_bytes_sum",
"sds_events_scanned_bytes_sum": "sds_events_scanned_bytes_sum",
"sds_logs_scanned_bytes_sum": "sds_logs_scanned_bytes_sum",
"sds_rum_scanned_bytes_sum": "sds_rum_scanned_bytes_sum",
"sds_total_scanned_bytes_sum": "sds_total_scanned_bytes_sum",
"synthetics_browser_check_calls_count_sum": "synthetics_browser_check_calls_count_sum",
"synthetics_check_calls_count_sum": "synthetics_check_calls_count_sum",
Expand Down Expand Up @@ -222,7 +228,10 @@ def __init__(
rum_session_count_sum: Union[int, UnsetType] = unset,
rum_total_session_count_sum: Union[int, UnsetType] = unset,
rum_units_sum: Union[int, UnsetType] = unset,
sds_apm_scanned_bytes_sum: Union[int, UnsetType] = unset,
sds_events_scanned_bytes_sum: Union[int, UnsetType] = unset,
sds_logs_scanned_bytes_sum: Union[int, UnsetType] = unset,
sds_rum_scanned_bytes_sum: Union[int, UnsetType] = unset,
sds_total_scanned_bytes_sum: Union[int, UnsetType] = unset,
synthetics_browser_check_calls_count_sum: Union[int, UnsetType] = unset,
synthetics_check_calls_count_sum: Union[int, UnsetType] = unset,
Expand Down Expand Up @@ -411,9 +420,18 @@ def __init__(
:param rum_units_sum: Shows the sum of all browser and mobile RUM units over all hours in the current date for all organizations.
:type rum_units_sum: int, optional

:param sds_apm_scanned_bytes_sum: Sum of all APM bytes scanned with sensitive data scanner over all hours in the current date for all organizations.
:type sds_apm_scanned_bytes_sum: int, optional

:param sds_events_scanned_bytes_sum: Sum of all event stream events bytes scanned with sensitive data scanner over all hours in the current date for all organizations.
:type sds_events_scanned_bytes_sum: int, optional

:param sds_logs_scanned_bytes_sum: Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for all organizations.
:type sds_logs_scanned_bytes_sum: int, optional

:param sds_rum_scanned_bytes_sum: Sum of all RUM bytes scanned with sensitive data scanner over all hours in the current date for all organizations.
:type sds_rum_scanned_bytes_sum: int, optional

:param sds_total_scanned_bytes_sum: Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over all hours in the current month for all organizations.
:type sds_total_scanned_bytes_sum: int, optional

Expand Down Expand Up @@ -550,8 +568,14 @@ def __init__(
kwargs["rum_total_session_count_sum"] = rum_total_session_count_sum
if rum_units_sum is not unset:
kwargs["rum_units_sum"] = rum_units_sum
if sds_apm_scanned_bytes_sum is not unset:
kwargs["sds_apm_scanned_bytes_sum"] = sds_apm_scanned_bytes_sum
if sds_events_scanned_bytes_sum is not unset:
kwargs["sds_events_scanned_bytes_sum"] = sds_events_scanned_bytes_sum
if sds_logs_scanned_bytes_sum is not unset:
kwargs["sds_logs_scanned_bytes_sum"] = sds_logs_scanned_bytes_sum
if sds_rum_scanned_bytes_sum is not unset:
kwargs["sds_rum_scanned_bytes_sum"] = sds_rum_scanned_bytes_sum
if sds_total_scanned_bytes_sum is not unset:
kwargs["sds_total_scanned_bytes_sum"] = sds_total_scanned_bytes_sum
if synthetics_browser_check_calls_count_sum is not unset:
Expand Down
24 changes: 24 additions & 0 deletions src/datadog_api_client/v1/model/usage_summary_date_org.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ def openapi_types(_):
"rum_session_count_sum": (int,),
"rum_total_session_count_sum": (int,),
"rum_units_sum": (int,),
"sds_apm_scanned_bytes_sum": (int,),
"sds_events_scanned_bytes_sum": (int,),
"sds_logs_scanned_bytes_sum": (int,),
"sds_rum_scanned_bytes_sum": (int,),
"sds_total_scanned_bytes_sum": (int,),
"synthetics_browser_check_calls_count_sum": (int,),
"synthetics_check_calls_count_sum": (int,),
Expand Down Expand Up @@ -149,7 +152,10 @@ def openapi_types(_):
"rum_session_count_sum": "rum_session_count_sum",
"rum_total_session_count_sum": "rum_total_session_count_sum",
"rum_units_sum": "rum_units_sum",
"sds_apm_scanned_bytes_sum": "sds_apm_scanned_bytes_sum",
"sds_events_scanned_bytes_sum": "sds_events_scanned_bytes_sum",
"sds_logs_scanned_bytes_sum": "sds_logs_scanned_bytes_sum",
"sds_rum_scanned_bytes_sum": "sds_rum_scanned_bytes_sum",
"sds_total_scanned_bytes_sum": "sds_total_scanned_bytes_sum",
"synthetics_browser_check_calls_count_sum": "synthetics_browser_check_calls_count_sum",
"synthetics_check_calls_count_sum": "synthetics_check_calls_count_sum",
Expand Down Expand Up @@ -221,7 +227,10 @@ def __init__(
rum_session_count_sum: Union[int, UnsetType] = unset,
rum_total_session_count_sum: Union[int, UnsetType] = unset,
rum_units_sum: Union[int, UnsetType] = unset,
sds_apm_scanned_bytes_sum: Union[int, UnsetType] = unset,
sds_events_scanned_bytes_sum: Union[int, UnsetType] = unset,
sds_logs_scanned_bytes_sum: Union[int, UnsetType] = unset,
sds_rum_scanned_bytes_sum: Union[int, UnsetType] = unset,
sds_total_scanned_bytes_sum: Union[int, UnsetType] = unset,
synthetics_browser_check_calls_count_sum: Union[int, UnsetType] = unset,
synthetics_check_calls_count_sum: Union[int, UnsetType] = unset,
Expand Down Expand Up @@ -416,9 +425,18 @@ def __init__(
:param rum_units_sum: Shows the sum of all browser and mobile RUM units over all hours in the current date for the given org.
:type rum_units_sum: int, optional

:param sds_apm_scanned_bytes_sum: Sum of all APM bytes scanned with sensitive data scanner over all hours in the current date for the given org.
:type sds_apm_scanned_bytes_sum: int, optional

:param sds_events_scanned_bytes_sum: Sum of all event stream events bytes scanned with sensitive data scanner over all hours in the current date for the given org.
:type sds_events_scanned_bytes_sum: int, optional

:param sds_logs_scanned_bytes_sum: Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for the given org.
:type sds_logs_scanned_bytes_sum: int, optional

:param sds_rum_scanned_bytes_sum: Sum of all RUM bytes scanned with sensitive data scanner over all hours in the current date for the given org.
:type sds_rum_scanned_bytes_sum: int, optional

:param sds_total_scanned_bytes_sum: Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over all hours in the current month for the given org.
:type sds_total_scanned_bytes_sum: int, optional

Expand Down Expand Up @@ -559,8 +577,14 @@ def __init__(
kwargs["rum_total_session_count_sum"] = rum_total_session_count_sum
if rum_units_sum is not unset:
kwargs["rum_units_sum"] = rum_units_sum
if sds_apm_scanned_bytes_sum is not unset:
kwargs["sds_apm_scanned_bytes_sum"] = sds_apm_scanned_bytes_sum
if sds_events_scanned_bytes_sum is not unset:
kwargs["sds_events_scanned_bytes_sum"] = sds_events_scanned_bytes_sum
if sds_logs_scanned_bytes_sum is not unset:
kwargs["sds_logs_scanned_bytes_sum"] = sds_logs_scanned_bytes_sum
if sds_rum_scanned_bytes_sum is not unset:
kwargs["sds_rum_scanned_bytes_sum"] = sds_rum_scanned_bytes_sum
if sds_total_scanned_bytes_sum is not unset:
kwargs["sds_total_scanned_bytes_sum"] = sds_total_scanned_bytes_sum
if synthetics_browser_check_calls_count_sum is not unset:
Expand Down
Loading