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

AWSIntegration response obj missing aws account id #763

Open
rjhornsby opened this issue Apr 1, 2023 · 1 comment
Open

AWSIntegration response obj missing aws account id #763

rjhornsby opened this issue Apr 1, 2023 · 1 comment
Labels
kind/bug Bug related issue stale Stale - Bot reminder

Comments

@rjhornsby
Copy link

Describe the bug
The API docs describe[1] the response to api.AwsIntegration.list() as including the AWS account ID. This field does not seem to be present in the response.

This is not specifically an issue with the python library. Rather, it appears to be missing from the raw REST object, but I wasn't sure where else to go.

This is an issue because while the list() method returns all of the accounts, it does not return any unique id such as the aws account id or datadog-owned id that could be used in the update() method, to for example, add a tag. The python update() method's first documented argument[2] is the aws account id. The inference is that this is the unique ID expected to be used to identify the object the user wishes to modify.

Python aside for a moment and using a REST call directly (ie cURL or Insomnia), the REST api[3] itself isn't returning the AWS account id:

{
  "accounts": [
    {
      "access_key_id": "Axxxxxxxx",
      "filter_tags": [],
      "host_tags": [
        "account-name-id:corp-lab-123"
      ],
      "account_specific_namespace_rules": {},
      "excluded_regions": [],
      "metrics_collection_enabled": true,
      "errors": [],
      "cspm_resource_collection_enabled": false,
      "resource_collection_enabled": false
    }
  ]
}

To Reproduce
Steps to reproduce the behavior:

  1. Retrieve the list of AWS accounts via REST https://api.ddog-gov.com/api/v1/integration/aws
  2. Response object does not contain an aws account id or other DD-generated unique ID usable to identify the account in subsequent calls

Expected behavior
As per the documentation and functionality requirements, the AWS account id or another unique id for each account should be contained in the response object, such that this id could be passed back to DD in calls such as update() or delete()

Additional context
[1] https://docs.datadoghq.com/api/latest/aws-integration/#list-all-aws-integrations
[2] https://github.com/DataDog/datadogpy/blob/master/datadog/api/aws_integration.py#L100-L107
[3] https://api.ddog-gov.com/api/v1/integration/aws

@rjhornsby rjhornsby added the kind/bug Bug related issue label Apr 1, 2023
@github-actions
Copy link

github-actions bot commented May 1, 2023

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.

If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of this project.

  2. Comment that the issue is still reproducible and include updated details requested in the issue template.

@github-actions github-actions bot added the stale Stale - Bot reminder label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Bug related issue stale Stale - Bot reminder
Projects
None yet
Development

No branches or pull requests

1 participant