public void ElasticBeanstalkCreateEnvironment()
        {
            #region to-create-a-new-environment-for-an-application-1456269380396

            var response = client.CreateEnvironment(new CreateEnvironmentRequest
            {
                ApplicationName   = "my-app",
                CNAMEPrefix       = "my-app",
                EnvironmentName   = "my-env",
                SolutionStackName = "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8",
                VersionLabel      = "v1"
            });

            string          applicationName   = response.ApplicationName;
            string          cname             = response.CNAME;
            DateTime        dateCreated       = response.DateCreated;
            DateTime        dateUpdated       = response.DateUpdated;
            string          environmentId     = response.EnvironmentId;
            string          environmentName   = response.EnvironmentName;
            string          health            = response.Health;
            string          solutionStackName = response.SolutionStackName;
            string          status            = response.Status;
            EnvironmentTier tier         = response.Tier;
            string          versionLabel = response.VersionLabel;

            #endregion
        }
示例#2
0
 private Amazon.ElasticBeanstalk.Model.CreateEnvironmentResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.CreateEnvironmentRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "CreateEnvironment");
     try
     {
         #if DESKTOP
         return(client.CreateEnvironment(request));
         #elif CORECLR
         return(client.CreateEnvironmentAsync(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;
     }
 }