aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

OrganizationsClient::DescribeOrganization() not working

Open gmilletAVS opened this issue 3 years ago • 1 comments

Describe the bug

A simple test using DescribeOrganization() fail. When calling this method we are blocked in this call. Tested with CLI and same IAM access token => it works Simple program with just this call fail (stay blocked on the API call)

Expected behavior

Should return organization description

Current behavior

Blocked in DescribeOrganization() call.

Steps to Reproduce

Test code:

#include <aws/core/Aws.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/organizations/OrganizationsClient.h>
#include <aws/organizations/model/DescribeOrganizationResult.h>

#include <iostream>
#include <string>

int main(int argc, char **argv)
{
    Aws::SDKOptions options;
    options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;

    Aws::InitAPI(options);
    std::cout << "Init OK" << std::endl;
    {
        Aws::Auth::AWSCredentials auth("XXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXX");
        Aws::Organizations::OrganizationsClient org(auth);
        std::cout << "Before Describe" << std::endl;
        auto outcome = org.DescribeOrganization();
        std::cout << "After Describe" << std::endl;
        if (outcome.IsSuccess())
        {
            std::cout << "Describe success" << std::endl;
            const auto &orgres = outcome.GetResult().GetOrganization();
            std::string org_id = orgres.GetId();
            std::cout << org_id << std::endl;
        }
    }

    Aws::ShutdownAPI(options);
    return 0;
}

Output:

Init OK
Before Describe

See attached aws log (trace mode) aws_sdk_2022-02-19-15.log

Possible Solution

I don't know.

AWS CPP SDK version used

1.9.196

Compiler and Version used

gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

Operating System and version

Ubuntu 20.04.3 LTS

gmilletAVS avatar Feb 19 '22 15:02 gmilletAVS

Hi @gmilletAVS , Thanks for pointing this out to us, I was able to reproduce and we'll start working on a solution.

KaibaLopez avatar Feb 21 '22 21:02 KaibaLopez

Greetings! Sorry to say but this is a very old issue that is probably not getting as much attention as it deservers. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.

github-actions[bot] avatar Feb 22 '23 00:02 github-actions[bot]