Skip to content
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
1,080 changes: 1,062 additions & 18 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

168 changes: 168 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8551,6 +8551,27 @@ datadog\_api\_client.v2.model.flaky\_tests\_search\_sort module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_version\_attributes module
----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_version_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_version\_resource\_type module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_version_resource_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_versions\_response module
---------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_versions_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment module
------------------------------------------------------

Expand Down Expand Up @@ -8593,13 +8614,62 @@ datadog\_api\_client.v2.model.fleet\_deployment\_file\_op module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_host module
------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_deployment_host
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_host\_package module
---------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_deployment_host_package
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_hosts\_page module
-------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_deployment_hosts_page
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_operation module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_deployment_operation
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_package module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_deployment_package
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_package\_upgrade\_attributes module
------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_deployment_package_upgrade_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_package\_upgrade\_create module
--------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_deployment_package_upgrade_create
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_package\_upgrade\_create\_request module
-----------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_deployment_package_upgrade_create_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_resource\_type module
----------------------------------------------------------------------

Expand All @@ -8614,6 +8684,13 @@ datadog\_api\_client.v2.model.fleet\_deployment\_response module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment\_response\_meta module
----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_deployment_response_meta
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployments\_page module
-------------------------------------------------------------

Expand All @@ -8635,6 +8712,97 @@ datadog\_api\_client.v2.model.fleet\_deployments\_response\_meta module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule module
----------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_attributes module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_create module
------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_create
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_create\_attributes module
------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_create_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_create\_request module
---------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_create_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_patch module
-----------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_patch
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_patch\_attributes module
-----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_patch_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_patch\_request module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_patch_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_recurrence\_rule module
----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_recurrence_rule
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_resource\_type module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_resource_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_response module
--------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule\_status module
------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedule_status
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedules\_response module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_schedules_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.formula\_limit module
---------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Create a deployment returns "CREATED" response
Create a configuration deployment returns "CREATED" response
"""

from datadog_api_client import ApiClient, Configuration
Expand Down
38 changes: 38 additions & 0 deletions examples/v2/fleet-automation/CreateFleetDeploymentUpgrade.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""
Upgrade hosts returns "CREATED" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi
from datadog_api_client.v2.model.fleet_deployment_package import FleetDeploymentPackage
from datadog_api_client.v2.model.fleet_deployment_package_upgrade_attributes import (
FleetDeploymentPackageUpgradeAttributes,
)
from datadog_api_client.v2.model.fleet_deployment_package_upgrade_create import FleetDeploymentPackageUpgradeCreate
from datadog_api_client.v2.model.fleet_deployment_package_upgrade_create_request import (
FleetDeploymentPackageUpgradeCreateRequest,
)
from datadog_api_client.v2.model.fleet_deployment_resource_type import FleetDeploymentResourceType

body = FleetDeploymentPackageUpgradeCreateRequest(
data=FleetDeploymentPackageUpgradeCreate(
attributes=FleetDeploymentPackageUpgradeAttributes(
filter_query="env:prod AND service:web",
target_packages=[
FleetDeploymentPackage(
name="datadog-agent",
version="7.52.0",
),
],
),
type=FleetDeploymentResourceType.DEPLOYMENT,
),
)

configuration = Configuration()
configuration.unstable_operations["create_fleet_deployment_upgrade"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
response = api_instance.create_fleet_deployment_upgrade(body=body)

print(response)
42 changes: 42 additions & 0 deletions examples/v2/fleet-automation/CreateFleetSchedule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"""
Create a schedule returns "CREATED" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi
from datadog_api_client.v2.model.fleet_schedule_create import FleetScheduleCreate
from datadog_api_client.v2.model.fleet_schedule_create_attributes import FleetScheduleCreateAttributes
from datadog_api_client.v2.model.fleet_schedule_create_request import FleetScheduleCreateRequest
from datadog_api_client.v2.model.fleet_schedule_recurrence_rule import FleetScheduleRecurrenceRule
from datadog_api_client.v2.model.fleet_schedule_resource_type import FleetScheduleResourceType
from datadog_api_client.v2.model.fleet_schedule_status import FleetScheduleStatus

body = FleetScheduleCreateRequest(
data=FleetScheduleCreate(
attributes=FleetScheduleCreateAttributes(
name="Weekly Production Agent Updates",
query="env:prod AND service:web",
rule=FleetScheduleRecurrenceRule(
days_of_week=[
"Mon",
"Wed",
"Fri",
],
maintenance_window_duration=1200,
start_maintenance_window="02:00",
timezone="America/New_York",
),
status=FleetScheduleStatus.ACTIVE,
version_to_latest=0,
),
type=FleetScheduleResourceType.SCHEDULE,
),
)

configuration = Configuration()
configuration.unstable_operations["create_fleet_schedule"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
response = api_instance.create_fleet_schedule(body=body)

print(response)
14 changes: 14 additions & 0 deletions examples/v2/fleet-automation/DeleteFleetSchedule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Delete a schedule returns "Schedule successfully deleted." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi

configuration = Configuration()
configuration.unstable_operations["delete_fleet_schedule"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
api_instance.delete_fleet_schedule(
id="id",
)
8 changes: 2 additions & 6 deletions examples/v2/fleet-automation/GetFleetDeployment.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
"""
Get a deployment by ID returns "OK" response
Get a configuration deployment by ID returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi

# there is a valid "deployment" in the system
DEPLOYMENT_ID = environ["DEPLOYMENT_ID"]

configuration = Configuration()
configuration.unstable_operations["get_fleet_deployment"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
response = api_instance.get_fleet_deployment(
deployment_id=DEPLOYMENT_ID,
deployment_id="deployment_id",
)

print(response)
20 changes: 20 additions & 0 deletions examples/v2/fleet-automation/GetFleetDeployment_1482493803.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Get a deployment by ID returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi

# there is a valid "deployment" in the system
DEPLOYMENT_ID = environ["DEPLOYMENT_ID"]

configuration = Configuration()
configuration.unstable_operations["get_fleet_deployment"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
response = api_instance.get_fleet_deployment(
deployment_id=DEPLOYMENT_ID,
)

print(response)
16 changes: 16 additions & 0 deletions examples/v2/fleet-automation/GetFleetSchedule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
Get a schedule by ID returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi

configuration = Configuration()
configuration.unstable_operations["get_fleet_schedule"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
response = api_instance.get_fleet_schedule(
id="id",
)

print(response)
14 changes: 14 additions & 0 deletions examples/v2/fleet-automation/ListFleetAgentVersions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
List all available Agent versions returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi

configuration = Configuration()
configuration.unstable_operations["list_fleet_agent_versions"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
response = api_instance.list_fleet_agent_versions()

print(response)
14 changes: 14 additions & 0 deletions examples/v2/fleet-automation/ListFleetSchedules.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
List all schedules returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi

configuration = Configuration()
configuration.unstable_operations["list_fleet_schedules"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
response = api_instance.list_fleet_schedules()

print(response)
Loading