Skip to content

Add AWS filtering endpoints #168

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

Merged
merged 1 commit into from
Nov 24, 2020
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.3.0",
"regenerated": "2020-11-24 11:32:41.427732",
"spec_repo_commit": "edb67b7"
"regenerated": "2020-11-24 15:02:29.562802",
"spec_repo_commit": "217b6e8"
},
"v2": {
"apigentools_version": "1.3.0",
"regenerated": "2020-11-24 11:32:52.753559",
"spec_repo_commit": "edb67b7"
"regenerated": "2020-11-24 15:02:41.111923",
"spec_repo_commit": "217b6e8"
}
}
}
262 changes: 262 additions & 0 deletions docs/v1/AWSIntegrationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ All URIs are relative to *https://api.datadoghq.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_aws_account**](AWSIntegrationApi.md#create_aws_account) | **POST** /api/v1/integration/aws | Create an AWS integration
[**create_aws_tag_filter**](AWSIntegrationApi.md#create_aws_tag_filter) | **POST** /api/v1/integration/aws/filtering | Set an AWS tag filter
[**create_new_aws_external_id**](AWSIntegrationApi.md#create_new_aws_external_id) | **PUT** /api/v1/integration/aws/generate_new_external_id | Generate a new external ID
[**delete_aws_account**](AWSIntegrationApi.md#delete_aws_account) | **DELETE** /api/v1/integration/aws | Delete an AWS integration
[**delete_aws_tag_filter**](AWSIntegrationApi.md#delete_aws_tag_filter) | **DELETE** /api/v1/integration/aws/filtering | Delete a tag filtering entry
[**list_available_aws_namespaces**](AWSIntegrationApi.md#list_available_aws_namespaces) | **GET** /api/v1/integration/aws/available_namespace_rules | List namespace rules
[**list_aws_accounts**](AWSIntegrationApi.md#list_aws_accounts) | **GET** /api/v1/integration/aws | List all AWS integrations
[**list_aws_tag_filters**](AWSIntegrationApi.md#list_aws_tag_filters) | **GET** /api/v1/integration/aws/filtering | Get all AWS tag filters
[**update_aws_account**](AWSIntegrationApi.md#update_aws_account) | **PUT** /api/v1/integration/aws | Update an AWS integration


Expand Down Expand Up @@ -114,6 +117,94 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **create_aws_tag_filter**
> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} create_aws_tag_filter(body)

Set an AWS tag filter

Set an AWS tag filter.

### Example

* Api Key Authentication (apiKeyAuth):
* Api Key Authentication (appKeyAuth):
```python
import os
from dateutil.parser import parse as dateutil_parser
import datadog_api_client.v1
from datadog_api_client.v1.api import aws_integration_api
from datadog_api_client.v1.models import *
from pprint import pprint
# Defining the host is optional and defaults to https://api.datadoghq.com
# See configuration.py for a list of all supported configuration parameters.
configuration = datadog_api_client.v1.Configuration(
host = "https://api.datadoghq.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKeyAuth
configuration.api_key['apiKeyAuth'] = os.getenv('DD_CLIENT_API_KEY')

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKeyAuth'] = 'Bearer'

# Configure API key authorization: appKeyAuth
configuration.api_key['appKeyAuth'] = os.getenv('DD_CLIENT_APP_KEY')

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['appKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with datadog_api_client.v1.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = aws_integration_api.AWSIntegrationApi(api_client)
body = AWSTagFilterCreateRequest(
account_id="1234567",
namespace=AWSNamespace("elb"),
tag_filter_str="prod*",
) # 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`.

# example passing only required values which don't have defaults set
try:
# Set an AWS tag filter
api_response = api_instance.create_aws_tag_filter(body)
pprint(api_response)
except datadog_api_client.v1.ApiException as e:
print("Exception when calling AWSIntegrationApi->create_aws_tag_filter: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**AWSTagFilterCreateRequest**](AWSTagFilterCreateRequest.md)| 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`. |

### Return type

**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**

### Authorization

[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**403** | Authentication Error | - |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **create_new_aws_external_id**
> AWSAccountCreateResponse create_new_aws_external_id(body)

Expand Down Expand Up @@ -317,6 +408,93 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **delete_aws_tag_filter**
> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_aws_tag_filter(body)

Delete a tag filtering entry

Delete a tag filtering entry.

### Example

* Api Key Authentication (apiKeyAuth):
* Api Key Authentication (appKeyAuth):
```python
import os
from dateutil.parser import parse as dateutil_parser
import datadog_api_client.v1
from datadog_api_client.v1.api import aws_integration_api
from datadog_api_client.v1.models import *
from pprint import pprint
# Defining the host is optional and defaults to https://api.datadoghq.com
# See configuration.py for a list of all supported configuration parameters.
configuration = datadog_api_client.v1.Configuration(
host = "https://api.datadoghq.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKeyAuth
configuration.api_key['apiKeyAuth'] = os.getenv('DD_CLIENT_API_KEY')

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKeyAuth'] = 'Bearer'

# Configure API key authorization: appKeyAuth
configuration.api_key['appKeyAuth'] = os.getenv('DD_CLIENT_APP_KEY')

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['appKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with datadog_api_client.v1.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = aws_integration_api.AWSIntegrationApi(api_client)
body = AWSTagFilterDeleteRequest(
aws_account_identifier="FAKEAC0FAKEAC2FAKEAC",
namespace=AWSNamespace("elb"),
) # AWSTagFilterDeleteRequest | Delete a tag filtering entry for a given AWS account and `dd-aws` namespace.

# example passing only required values which don't have defaults set
try:
# Delete a tag filtering entry
api_response = api_instance.delete_aws_tag_filter(body)
pprint(api_response)
except datadog_api_client.v1.ApiException as e:
print("Exception when calling AWSIntegrationApi->delete_aws_tag_filter: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**AWSTagFilterDeleteRequest**](AWSTagFilterDeleteRequest.md)| Delete a tag filtering entry for a given AWS account and `dd-aws` namespace. |

### Return type

**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**

### Authorization

[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**403** | Authentication Error | - |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **list_available_aws_namespaces**
> [str] list_available_aws_namespaces()

Expand Down Expand Up @@ -485,6 +663,90 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **list_aws_tag_filters**
> AWSTagFilterListResponse list_aws_tag_filters(account_id)

Get all AWS tag filters

Get all AWS tag filters.

### Example

* Api Key Authentication (apiKeyAuth):
* Api Key Authentication (appKeyAuth):
```python
import os
from dateutil.parser import parse as dateutil_parser
import datadog_api_client.v1
from datadog_api_client.v1.api import aws_integration_api
from datadog_api_client.v1.models import *
from pprint import pprint
# Defining the host is optional and defaults to https://api.datadoghq.com
# See configuration.py for a list of all supported configuration parameters.
configuration = datadog_api_client.v1.Configuration(
host = "https://api.datadoghq.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKeyAuth
configuration.api_key['apiKeyAuth'] = os.getenv('DD_CLIENT_API_KEY')

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKeyAuth'] = 'Bearer'

# Configure API key authorization: appKeyAuth
configuration.api_key['appKeyAuth'] = os.getenv('DD_CLIENT_APP_KEY')

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['appKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with datadog_api_client.v1.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = aws_integration_api.AWSIntegrationApi(api_client)
account_id = "account_id_example" # str | Only return AWS filters that matches this `account_id`.

# example passing only required values which don't have defaults set
try:
# Get all AWS tag filters
api_response = api_instance.list_aws_tag_filters(account_id)
pprint(api_response)
except datadog_api_client.v1.ApiException as e:
print("Exception when calling AWSIntegrationApi->list_aws_tag_filters: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**account_id** | **str**| Only return AWS filters that matches this `account_id`. |

### Return type

[**AWSTagFilterListResponse**](AWSTagFilterListResponse.md)

### Authorization

[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**403** | Authentication Error | - |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **update_aws_account**
> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} update_aws_account(body)

Expand Down
11 changes: 11 additions & 0 deletions docs/v1/AWSNamespace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AWSNamespace

The namespace associated with the tag filter entry.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | The namespace associated with the tag filter entry. | must be one of ["elb", "application_elb", "sqs", "rds", "custom", "network_elb", "lambda", ]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


13 changes: 13 additions & 0 deletions docs/v1/AWSTagFilterCreateRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# AWSTagFilterCreateRequest

The objects used to set an AWS tag filter.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**account_id** | **str** | Your AWS Account ID without dashes. | [optional]
**namespace** | [**AWSNamespace**](AWSNamespace.md) | | [optional]
**tag_filter_str** | **str** | The tag filter string. | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


12 changes: 12 additions & 0 deletions docs/v1/AWSTagFilterDeleteRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AWSTagFilterDeleteRequest

The objects used to delete an AWS tag filter entry.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**aws_account_identifier** | **str** | The unique identifier of your AWS account. | [optional]
**namespace** | [**AWSNamespace**](AWSNamespace.md) | | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


11 changes: 11 additions & 0 deletions docs/v1/AWSTagFilterListResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AWSTagFilterListResponse

An array of tag filter rules by `namespace` and tag filter string.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**filters** | [**[AWSTagFilterListResponseFilters]**](AWSTagFilterListResponseFilters.md) | An array of tag filters. | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


12 changes: 12 additions & 0 deletions docs/v1/AWSTagFilterListResponseFilters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AWSTagFilterListResponseFilters

A list of tag filters.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**namespace** | [**AWSNamespace**](AWSNamespace.md) | | [optional]
**tag_filter_str** | **str** | The tag filter string. | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


Loading