AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Creates a bucket in Amazon S3 to store application versions, logs, and other files
used by Elastic Beanstalk environments. The Elastic Beanstalk console and EB CLI call
this API the first time you create an environment in a region. If the storage location
already exists, CreateStorageLocation
still returns the bucket name but does
not create a new bucket.
For .NET Core this operation is only available in asynchronous form. Please refer to CreateStorageLocationAsync.
Namespace: Amazon.ElasticBeanstalk
Assembly: AWSSDK.ElasticBeanstalk.dll
Version: 3.x.y.z
public abstract CreateStorageLocationResponse CreateStorageLocation( CreateStorageLocationRequest request )
Container for the necessary parameters to execute the CreateStorageLocation service method.
Exception | Condition |
---|---|
InsufficientPrivilegesException | The specified account does not have sufficient privileges for one or more AWS services. |
S3SubscriptionRequiredException | The specified account does not have a subscription to Amazon S3. |
TooManyBucketsException | The specified account has reached its limit of Amazon S3 buckets. |
The following operation creates a new environment for version v1 of a java application named my-app:
var client = new AmazonElasticBeanstalkClient(); 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;
.NET Framework:
Supported in: 4.5 and newer, 3.5