update_environment
async
¶
update_environment(
name: ResourceName,
deployment_type: DeploymentUpdateType,
*,
config_overrides: Optional[AsyncProtonClientConfig] = 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/async_proton.py
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 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 | |