create_environment
async
¶
create_environment(
application_name: ApplicationName,
*,
config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
environment_name: Optional[EnvironmentName] = None,
group_name: Optional[GroupName] = None,
description: Optional[Description] = None,
cname_prefix: Optional[DNSCnamePrefix] = None,
tier: Optional[EnvironmentTier] = None,
tags: Optional[Tags] = None,
version_label: Optional[VersionLabel] = None,
template_name: Optional[ConfigurationTemplateName] = None,
solution_stack_name: Optional[SolutionStackName] = None,
platform_arn: Optional[PlatformArn] = None,
option_settings: Optional[ConfigurationOptionSettingsList] = None,
options_to_remove: Optional[OptionsSpecifierList] = None,
operations_role: Optional[OperationsRole] = None,
) -> EnvironmentDescription
Launches an Elastic Beanstalk environment for the specified application using the specified configuration.
Parameters:
-
application_name(ApplicationName) –The name of the application that is associated with this environment.
-
environment_name(Optional[EnvironmentName], default:None) –A unique name for the environment.
Constraint: Must be from 4 to 40 characters in length. The name can contain only letters, numbers, and hyphens. It can't start or end with a hyphen. This name must be unique within a region in your account. If the specified name already exists in the region, Elastic Beanstalk returns an
InvalidParameterValueerror.If you don't specify the
CNAMEPrefixparameter, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application. -
group_name(Optional[GroupName], default:None) –The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name parameter. See Environment Manifest (env.yaml) for details.
-
description(Optional[Description], default:None) –Your description for this environment.
-
cname_prefix(Optional[DNSCnamePrefix], default:None) –If specified, the environment attempts to use this value as the prefix for the CNAME in your Elastic Beanstalk environment URL. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.
-
tier(Optional[EnvironmentTier], default:None) –Specifies the tier to use in creating this environment. The environment tier that you choose determines whether Elastic Beanstalk provisions resources on Amazon EC2 instances or on an Amazon EKS cluster, and, for Amazon EC2, whether the environment serves HTTP(S) requests or processes background tasks from a queue.
-
tags(Optional[Tags], default:None) –Specifies the tags applied to resources in the environment.
-
version_label(Optional[VersionLabel], default:None) –The name of the application version to deploy.
Default: If not specified, Elastic Beanstalk attempts to deploy the sample application.
-
template_name(Optional[ConfigurationTemplateName], default:None) –The name of the Elastic Beanstalk configuration template to use with the environment.
If you specify
TemplateName, then don't specifySolutionStackName. -
solution_stack_name(Optional[SolutionStackName], default:None) –The name of an Elastic Beanstalk solution stack (platform version) to use with the environment. If specified, Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack. For a list of current solution stacks, see Elastic Beanstalk Supported Platforms in the Elastic Beanstalk Platforms guide.
If you specify
SolutionStackName, don't specifyPlatformArnorTemplateName. -
platform_arn(Optional[PlatformArn], default:None) –The Amazon Resource Name (ARN) of the custom platform to use with the environment. For more information, see Custom Platforms in the Elastic Beanstalk Developer Guide.
If you specify
PlatformArn, don't specifySolutionStackName. -
option_settings(Optional[ConfigurationOptionSettingsList], default:None) –If specified, Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template.
-
options_to_remove(Optional[OptionsSpecifierList], default:None) –A list of custom user-defined configuration options to remove from the configuration set for this new environment.
-
operations_role(Optional[OperationsRole], default:None) –The operations role feature of Elastic Beanstalk is in beta release and is subject to change.
The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role. If specified, Elastic Beanstalk uses the operations role for permissions to downstream services during this call and during subsequent calls acting on this environment. To specify an operations role, you must have the
iam:PassRolepermission for the role.
Raises:
-
InsufficientPrivilegesException–The specified account does not have sufficient privileges for one or more Amazon Web Services services.
-
TooManyEnvironmentsException–The specified account has reached its limit of environments.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a new environment for an application The following operation creates a new environment for version v1 of a java application named my-app:
>>> await client.create_environment(application_name='my-app', environment_name='my-env', cname_prefix='my-app', version_label='v1', solution_stack_name='64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8')
Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 | |