gpt4 book ai didi

java - 使用适用于 Java 的 AWS 开发工具包在 AWS Organizations 中创建账户

转载 作者:行者123 更新时间:2023-12-02 13:18:33 26 4
gpt4 key购买 nike

你能举个关于这个问题的例子吗?我已经尝试过一些事情,但还没有成功。如何在我的主帐户上为其他人创建帐户?

    @Bean
public AWSOrganizations createAwsAccount(){
CreateAccountRequest createAccountRequest = new CreateAccountRequest();
createAccountRequest.setAccountName("newAccount");
createAccountRequest.setEmail("newAccount@yandex.com");
createAccountRequest.setIamUserAccessToBilling("ALLOW");
//createAccountRequest.setRoleName("");
AWSCredentials awsCredentials = new ProfileCredentialsProvider().getCredentials();
final AWSOrganizations awsOrganizations = AWSOrganizationsClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();
awsOrganizations.createAccount(createAccountRequest);
return awsOrganizations;
}

我知道,我写的代码没有任何意义,但我只是想尝试一些东西。我正在等待您有关此主题的帮助。

ErrorMessage: You cannot add accounts to your organization while it is initializing. Try again later.

最佳答案

您可能已经解决了这个问题,但以防万一其他人发现这个问题:

这似乎是 AWS 的一个问题,他们需要永远修复!

看看this thread in the AWS forums 。它于三月开业,有些人(包括我)仍然遇到问题。 API 调用是正确的,您只需继续等待(几天?几周?)、联系支持人员或就该主题发送消息。

关于java - 使用适用于 Java 的 AWS 开发工具包在 AWS Organizations 中创建账户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43669527/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com