Skip to content

Commit c0009a8

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 4796132 of spec repo (#191)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 9d3c356 commit c0009a8

13 files changed

+141
-50
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.4.0",
7-
"regenerated": "2020-12-15 12:13:29.100642",
8-
"spec_repo_commit": "690ad2a"
7+
"regenerated": "2020-12-16 12:20:23.743894",
8+
"spec_repo_commit": "4796132"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.0",
12-
"regenerated": "2020-12-15 12:13:39.491922",
13-
"spec_repo_commit": "690ad2a"
12+
"regenerated": "2020-12-16 12:20:34.655262",
13+
"spec_repo_commit": "4796132"
1414
}
1515
}
1616
}

docs/README.md

Lines changed: 104 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,112 @@
11
# datadog-api-client-python
22

3-
Collection of all of the Datadog public endpoints. For the official documentation, see the [Datadog API Reference](https://docs.datadoghq.com/api/).
3+
This repository contains a Python API client for the [Datadog API](https://docs.datadoghq.com/api/).
4+
The code is generated using [openapi-generator](https://github.com/OpenAPITools/openapi-generator)
5+
and [apigentools](https://github.com/DataDog/apigentools).
46

5-
This python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
7+
Datadog API Collection
68

7-
Need help? Reach out to our awesome [support team](https://www.datadoghq.com/support/).
9+
- API version: 1.0
10+
11+
Collection of all Datadog Public endpoints.
12+
13+
For more information, please visit [https://www.datadoghq.com/support/](https://www.datadoghq.com/support/)
14+
15+
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
16+
17+
## Requirements
18+
19+
Building and using the API client library requires:
20+
21+
1. Python 3.6+
22+
23+
## Installation
24+
25+
To install the API client library, simply execute:
26+
27+
```shell
28+
pip install datadog-api-client
29+
```
30+
31+
## Getting Started
32+
33+
Please follow the [installation](#installation) instruction and execute the following Python code:
34+
35+
```python
36+
import os
37+
from dateutil.parser import parse as dateutil_parser
38+
import datadog_api_client.v1
39+
from datadog_api_client.v1.api import aws_integration_api
40+
from datadog_api_client.v1.models import *
41+
from pprint import pprint
42+
43+
# Defining the host is optional and defaults to https://api.datadoghq.com
44+
# See configuration.py for a list of all supported configuration parameters.
45+
configuration = datadog_api_client.v1.Configuration(
46+
host = "https://api.datadoghq.com"
47+
)
48+
49+
# The client must configure the authentication and authorization parameters
50+
# in accordance with the API server security policy.
51+
# Examples for each auth method are provided below, use the example that
52+
# satisfies your auth use case.
53+
54+
# Configure API key authorization: apiKeyAuth
55+
configuration.api_key['apiKeyAuth'] = os.getenv('DD_CLIENT_API_KEY')
56+
57+
# Configure API key authorization: appKeyAuth
58+
configuration.api_key['appKeyAuth'] = os.getenv('DD_CLIENT_APP_KEY')
59+
60+
# Enter a context with an instance of the API client
61+
with datadog_api_client.v1.ApiClient(configuration) as api_client:
62+
# Create an instance of the API class
63+
api_instance = aws_integration_api.AWSIntegrationApi(api_client)
64+
body = AWSAccount(
65+
access_key_id="access_key_id_example",
66+
account_id="1234567",
67+
account_specific_namespace_rules={
68+
"key": True,
69+
},
70+
excluded_regions=["us-east-1","us-west-2"],
71+
filter_tags=["<KEY>:<VALUE>"],
72+
host_tags=["<KEY>:<VALUE>"],
73+
role_name="DatadogAWSIntegrationRole",
74+
secret_access_key="secret_access_key_example",
75+
) # AWSAccount | AWS Request Object
76+
77+
# example passing only required values which don't have defaults set
78+
try:
79+
# Create an AWS integration
80+
api_response = api_instance.create_aws_account(body)
81+
pprint(api_response)
82+
except datadog_api_client.v1.ApiException as e:
83+
print("Exception when calling AWSIntegrationApi->create_aws_account: %s\n" % e)
84+
```
85+
86+
### Unstable Endpoints
87+
88+
This client includes access to Datadog API endpoints while they are in an unstable state and may undergo breaking changes. An extra configuration step is required to enable these endpoints:
89+
90+
```python
91+
configuration.unstable_operations["<OperationName>"] = True
92+
```
93+
94+
where `<OperationName>` is the name of the method used to interact with that endpoint. For example: `list_log_indexes`, or `get_logs_index`
95+
96+
## Documentation for API Endpoints and Models
97+
98+
Documentation for API endpoints and models can be found under the [`docs`](/docs) directory.
99+
100+
## Documentation for Authorization
101+
102+
Authenticate with the API by providing your API and Application keys in the configuration:
103+
104+
```python
105+
configuration.api_key["apiKeyAuth"] = "YOUR_API_KEY"
106+
configuration.api_key["appKeyAuth"] = "YOUR_APPLICATION_KEY"
107+
```
8108

9109
## Author
10110

11111
112+

src/datadog_api_client/v1/api/aws_integration_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def __create_aws_tag_filter(
173173
>>> result = thread.get()
174174
175175
Args:
176-
body (AWSTagFilterCreateRequest): Set an AWS tag filter using an &#x60;aws_account_identifier&#x60;, &#x60;namespace&#x60;, and filtering string. Namespace options are &#x60;application_elb&#x60;, &#x60;elb&#x60;, &#x60;lambda&#x60;, &#x60;network_elb&#x60;, &#x60;rds&#x60;, &#x60;sqs&#x60;, and &#x60;custom&#x60;.
176+
body (AWSTagFilterCreateRequest): Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string. Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`.
177177
178178
Keyword Args:
179179
_return_http_data_only (bool): response data without head status
@@ -568,7 +568,7 @@ def __delete_aws_tag_filter(
568568
>>> result = thread.get()
569569
570570
Args:
571-
body (AWSTagFilterDeleteRequest): Delete a tag filtering entry for a given AWS account and &#x60;dd-aws&#x60; namespace.
571+
body (AWSTagFilterDeleteRequest): Delete a tag filtering entry for a given AWS account and `dd-aws` namespace.
572572
573573
Keyword Args:
574574
_return_http_data_only (bool): response data without head status
@@ -955,7 +955,7 @@ def __list_aws_tag_filters(
955955
>>> result = thread.get()
956956
957957
Args:
958-
account_id (str): Only return AWS filters that matches this &#x60;account_id&#x60;.
958+
account_id (str): Only return AWS filters that matches this `account_id`.
959959
960960
Keyword Args:
961961
_return_http_data_only (bool): response data without head status

src/datadog_api_client/v1/api/azure_integration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def __update_azure_host_filters(
398398
>>> result = thread.get()
399399
400400
Args:
401-
body (AzureAccount): Update a Datadog-Azure integration&#39;s host filters request body.
401+
body (AzureAccount): Update a Datadog-Azure integration's host filters request body.
402402
403403
Keyword Args:
404404
_return_http_data_only (bool): response data without head status

src/datadog_api_client/v1/api/logs_indexes_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def __update_logs_index(
389389
390390
Args:
391391
name (str): Name of the log index.
392-
body (LogsIndexUpdateRequest): Object containing the new &#x60;LogsIndexUpdateRequest&#x60;.
392+
body (LogsIndexUpdateRequest): Object containing the new `LogsIndexUpdateRequest`.
393393
394394
Keyword Args:
395395
_return_http_data_only (bool): response data without head status

src/datadog_api_client/v1/api/metrics_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def __list_metrics(
296296
>>> result = thread.get()
297297
298298
Args:
299-
q (str): Query string to search metrics upon. Must be prefixed with &#x60;metrics:&#x60;.
299+
q (str): Query string to search metrics upon. Must be prefixed with `metrics:`.
300300
301301
Keyword Args:
302302
_return_http_data_only (bool): response data without head status

src/datadog_api_client/v1/api/organizations_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def __get_org(
173173
>>> result = thread.get()
174174
175175
Args:
176-
public_id (str): The &#x60;public_id&#x60; of the organization you are operating within.
176+
public_id (str): The `public_id` of the organization you are operating within.
177177
178178
Keyword Args:
179179
_return_http_data_only (bool): response data without head status
@@ -402,7 +402,7 @@ def __update_org(
402402
>>> result = thread.get()
403403
404404
Args:
405-
public_id (str): The &#x60;public_id&#x60; of the organization you are operating within.
405+
public_id (str): The `public_id` of the organization you are operating within.
406406
body (Organization):
407407
408408
Keyword Args:
@@ -533,7 +533,7 @@ def __upload_id_p_for_org(
533533
>>> result = thread.get()
534534
535535
Args:
536-
public_id (str): The &#x60;public_id&#x60; of the organization you are operating with
536+
public_id (str): The `public_id` of the organization you are operating with
537537
idp_file (file_type): The path to the XML metadata file you wish to upload.
538538
539539
Keyword Args:

src/datadog_api_client/v1/api/service_level_objectives_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ def __get_slo_history(
666666
667667
Args:
668668
slo_id (str): The ID of the service level objective object.
669-
from_ts (int): The &#x60;from&#x60; timestamp for the query window in epoch seconds.
670-
to_ts (int): The &#x60;to&#x60; timestamp for the query window in epoch seconds.
669+
from_ts (int): The `from` timestamp for the query window in epoch seconds.
670+
to_ts (int): The `to` timestamp for the query window in epoch seconds.
671671
672672
Keyword Args:
673673
_return_http_data_only (bool): response data without head status

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def __get_incident_management(
207207
>>> result = thread.get()
208208
209209
Args:
210-
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
210+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
211211
212212
Keyword Args:
213213
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
@@ -333,7 +333,7 @@ def __get_ingested_spans(
333333
>>> result = thread.get()
334334
335335
Args:
336-
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
336+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
337337
338338
Keyword Args:
339339
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
@@ -831,7 +831,7 @@ def __get_tracing_without_limits(
831831
>>> result = thread.get()
832832
833833
Args:
834-
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
834+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
835835
836836
Keyword Args:
837837
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
@@ -957,7 +957,7 @@ def __get_usage_analyzed_logs(
957957
>>> result = thread.get()
958958
959959
Args:
960-
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
960+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
961961
962962
Keyword Args:
963963
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
@@ -1084,7 +1084,7 @@ def __get_usage_attribution(
10841084
>>> result = thread.get()
10851085
10861086
Args:
1087-
start_month (datetime): Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage beginning in this month. Maximum of 15 months ago.
1087+
start_month (datetime): Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago.
10881088
fields (str): The specified field to search results for.
10891089
10901090
Keyword Args:
@@ -1597,7 +1597,7 @@ def __get_usage_indexed_spans(
15971597
>>> result = thread.get()
15981598
15991599
Args:
1600-
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
1600+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
16011601
16021602
Keyword Args:
16031603
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
@@ -2108,7 +2108,7 @@ def __get_usage_network_flows(
21082108
>>> result = thread.get()
21092109
21102110
Args:
2111-
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
2111+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
21122112
21132113
Keyword Args:
21142114
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
@@ -2360,7 +2360,7 @@ def __get_usage_profiling(
23602360
>>> result = thread.get()
23612361
23622362
Args:
2363-
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
2363+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
23642364
23652365
Keyword Args:
23662366
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
@@ -2618,7 +2618,7 @@ def __get_usage_snmp(
26182618
>>> result = thread.get()
26192619
26202620
Args:
2621-
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
2621+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
26222622
26232623
Keyword Args:
26242624
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
@@ -2744,7 +2744,7 @@ def __get_usage_summary(
27442744
>>> result = thread.get()
27452745
27462746
Args:
2747-
start_month (datetime): Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage beginning in this month. Maximum of 15 months ago.
2747+
start_month (datetime): Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago.
27482748
27492749
Keyword Args:
27502750
end_month (datetime): Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month.. [optional]

src/datadog_api_client/v1/configuration.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class Configuration(object):
6868
:param server_operation_variables: Mapping from operation ID to a mapping with
6969
string values to replace variables in templated server configuration.
7070
The validation of enums is performed for variables with defined enum values before.
71+
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
72+
in PEM format
7173
7274
:Example:
7375
@@ -100,6 +102,7 @@ def __init__(self, host=None,
100102
disabled_client_side_validations="",
101103
server_index=None, server_variables=None,
102104
server_operation_index=None, server_operation_variables=None,
105+
ssl_ca_cert=None,
103106
):
104107
"""Constructor
105108
"""
@@ -165,7 +168,7 @@ def __init__(self, host=None,
165168
Set this to false to skip verifying SSL certificate when calling API
166169
from https server.
167170
"""
168-
self.ssl_ca_cert = None
171+
self.ssl_ca_cert = ssl_ca_cert
169172
"""Set this to customize the certificate file to verify the peer.
170173
"""
171174
self.cert_file = None

0 commit comments

Comments
 (0)