[英]Creating Account in the AWS Organizations using AWS SDK for Java
您可以提供有关此问题的样本吗? 我已经尝试过一些,但是还没有成功。 如何在我的主帐户上为其他人创建帐户?
@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.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.