public void OrganizationsCreateAccount() { #region to-create-a-new-account-that-is-automatically-part-of-the-organization-1472501463507 var response = client.CreateAccount(new CreateAccountRequest { AccountName = "Production Account", Email = "*****@*****.**" }); CreateAccountStatus createAccountStatus = response.CreateAccountStatus; #endregion }
private Amazon.Organizations.Model.CreateAccountResponse CallAWSServiceOperation(IAmazonOrganizations client, Amazon.Organizations.Model.CreateAccountRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Organizations", "CreateAccount"); try { #if DESKTOP return(client.CreateAccount(request)); #elif CORECLR return(client.CreateAccountAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }