create_environment
¶
create_environment(
name: ResourceName,
template_name: ResourceName,
template_major_version: TemplateVersionPart,
spec: SpecContents,
*,
config_overrides: Optional[ProtonClientConfig] = None,
template_minor_version: Optional[TemplateVersionPart] = None,
description: Optional[Description] = None,
proton_service_role_arn: Optional[Arn] = None,
environment_account_connection_id: Optional[EnvironmentAccountConnectionId] = None,
tags: Optional[TagList] = None,
provisioning_repository: Optional[RepositoryBranchInput] = None,
component_role_arn: Optional[RoleArn] = None,
codebuild_role_arn: Optional[RoleArn] = None,
) -> CreateEnvironmentOutput
Deploy a new environment. An Proton environment is created from an environment template that defines infrastructure and resources that can be shared across services.
You can provision environments using the following methods:
-
Amazon Web Services-managed provisioning: Proton makes direct calls to provision your resources.
-
Self-managed provisioning: Proton makes pull requests on your repository to provide compiled infrastructure as code (IaC) files that your IaC engine uses to provision resources.
For more information, see Environments and Provisioning methods in the Proton User Guide.
Parameters:
-
name(ResourceName) –The name of the environment.
-
template_name(ResourceName) –The name of the environment template. For more information, see Environment Templates in the Proton User Guide.
-
template_major_version(TemplateVersionPart) –The major version of the environment template.
-
template_minor_version(Optional[TemplateVersionPart], default:None) –The minor version of the environment template.
-
description(Optional[Description], default:None) –A description of the environment that's being created and deployed.
-
spec(SpecContents) –A YAML formatted string that provides inputs as defined in the environment template bundle schema file. For more information, see Environments in the Proton User Guide.
-
proton_service_role_arn(Optional[Arn], default:None) –The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf.
To use Amazon Web Services-managed provisioning for the environment, specify either the
environmentAccountConnectionIdorprotonServiceRoleArnparameter and omit theprovisioningRepositoryparameter. -
environment_account_connection_id(Optional[EnvironmentAccountConnectionId], default:None) –The ID of the environment account connection that you provide if you're provisioning your environment infrastructure resources to an environment account. For more information, see Environment account connections in the Proton User guide.
To use Amazon Web Services-managed provisioning for the environment, specify either the
environmentAccountConnectionIdorprotonServiceRoleArnparameter and omit theprovisioningRepositoryparameter. -
tags(Optional[TagList], default:None) –An optional list of metadata items that you can associate with the Proton environment. A tag is a key-value pair.
For more information, see Proton resources and tagging in the Proton User Guide.
-
provisioning_repository(Optional[RepositoryBranchInput], default:None) –The linked repository that you use to host your rendered infrastructure templates for self-managed provisioning. A linked repository is a repository that has been registered with Proton. For more information, see CreateRepository.
To use self-managed provisioning for the environment, specify this parameter and omit the
environmentAccountConnectionIdandprotonServiceRoleArnparameters. -
component_role_arn(Optional[RoleArn], default:None) –The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined components in this environment. It determines the scope of infrastructure that a component can provision.
You must specify
componentRoleArnto allow directly defined components to be associated with this environment.For more information about components, see Proton components in the Proton User Guide.
-
codebuild_role_arn(Optional[RoleArn], default:None) –The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure using CodeBuild-based provisioning on your behalf.
To use CodeBuild-based provisioning for the environment or for any service instance running in the environment, specify either the
environmentAccountConnectionIdorcodebuildRoleArnparameter.
Raises:
-
AccessDeniedException–There isn't sufficient access for performing this action.
-
ConflictException–The request couldn't be made due to a conflicting operation or resource.
-
InternalServerException–The request failed to register with the service.
-
ResourceNotFoundException–The requested resource wasn't found.
-
ServiceQuotaExceededException–A quota was exceeded. For more information, see Proton Quotas in the Proton User Guide.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input is invalid or an out-of-range value was supplied for the input parameter.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_proton/_services/proton.py
2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 | |