update_environment
¶
update_environment(
name: ResourceName,
deployment_type: DeploymentUpdateType,
*,
config_overrides: Optional[ProtonClientConfig] = None,
description: Optional[Description] = None,
spec: Optional[SpecContents] = None,
template_major_version: Optional[TemplateVersionPart] = None,
template_minor_version: Optional[TemplateVersionPart] = None,
proton_service_role_arn: Optional[Arn] = None,
environment_account_connection_id: Optional[EnvironmentAccountConnectionId] = None,
provisioning_repository: Optional[RepositoryBranchInput] = None,
component_role_arn: Optional[RoleArn] = None,
codebuild_role_arn: Optional[RoleArn] = None,
) -> UpdateEnvironmentOutput
Update an environment.
If the environment is associated with an environment account connection, don't update or include the protonServiceRoleArn and provisioningRepository parameter to update or connect to an environment account connection.
You can only update to a new environment account connection if that connection was created in the same environment account that the current environment account connection was created in. The account connection must also be associated with the current environment.
If the environment isn't associated with an environment account connection, don't update or include the environmentAccountConnectionId parameter. You can't update or connect the environment to an environment account connection if it isn't already associated with an environment connection.
You can update either the environmentAccountConnectionId or protonServiceRoleArn parameter and value. You can’t update both.
If the environment was configured for Amazon Web Services-managed provisioning, omit the provisioningRepository parameter.
If the environment was configured for self-managed provisioning, specify the provisioningRepository parameter and omit the protonServiceRoleArn and environmentAccountConnectionId parameters.
For more information, see Environments and Provisioning methods in the Proton User Guide.
There are four modes for updating an environment. The deploymentType field defines the mode.
-
NONEIn this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
-
CURRENT_VERSIONIn this mode, the environment is deployed and updated with the new spec that you provide. Only requested parameters are updated. Don’t include minor or major version parameters when you use this
deployment-type. -
MINOR_VERSIONIn this mode, the environment is deployed and updated with the published, recommended (latest) minor version of the current major version in use, by default. You can also specify a different minor version of the current major version in use.
-
MAJOR_VERSIONIn this mode, the environment is deployed and updated with the published, recommended (latest) major and minor version of the current template, by default. You can also specify a different major version that's higher than the major version in use and a minor version.
Parameters:
-
name(ResourceName) –The name of the environment to update.
-
description(Optional[Description], default:None) –A description of the environment update.
-
spec(Optional[SpecContents], default:None) –The formatted specification that defines the update.
-
template_major_version(Optional[TemplateVersionPart], default:None) –The major version of the environment to update.
-
template_minor_version(Optional[TemplateVersionPart], default:None) –The minor version of the environment to update.
-
proton_service_role_arn(Optional[Arn], default:None) –The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make API calls to other services your behalf.
-
deployment_type(DeploymentUpdateType) –There are four modes for updating an environment. The
deploymentTypefield defines the mode.-
NONEIn this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
-
CURRENT_VERSIONIn this mode, the environment is deployed and updated with the new spec that you provide. Only requested parameters are updated. Don’t include major or minor version parameters when you use this
deployment-type. -
MINOR_VERSIONIn this mode, the environment is deployed and updated with the published, recommended (latest) minor version of the current major version in use, by default. You can also specify a different minor version of the current major version in use.
-
MAJOR_VERSIONIn this mode, the environment is deployed and updated with the published, recommended (latest) major and minor version of the current template, by default. You can also specify a different major version that is higher than the major version in use and a minor version (optional).
-
-
environment_account_connection_id(Optional[EnvironmentAccountConnectionId], default:None) –The ID of the environment account connection.
You can only update to a new environment account connection if it was created in the same environment account that the current environment account connection was created in and is associated with the current environment.
-
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.
-
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.
The environment must have a
componentRoleArnto allow directly defined components to be associated with the 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.
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.
-
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
3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 | |