create_deployment_config
async
¶
create_deployment_config(
deployment_config_name: DeploymentConfigName,
*,
config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
minimum_healthy_hosts: Optional[MinimumHealthyHosts] = None,
traffic_routing_config: Optional[TrafficRoutingConfig] = None,
compute_platform: Optional[ComputePlatform] = None,
zonal_config: Optional[ZonalConfig] = None,
) -> CreateDeploymentConfigOutput
Creates a deployment configuration.
Parameters:
-
deployment_config_name(DeploymentConfigName) –The name of the deployment configuration to create.
-
minimum_healthy_hosts(Optional[MinimumHealthyHosts], default:None) –The minimum number of healthy instances that should be available at any time during the deployment. There are two parameters expected in the input: type and value.
The type parameter takes either of the following values:
-
HOST_COUNT: The value parameter represents the minimum number of healthy instances as an absolute value.
-
FLEET_PERCENT: The value parameter represents the minimum number of healthy instances as a percentage of the total number of instances in the deployment. If you specify FLEET_PERCENT, at the start of the deployment, CodeDeploy converts the percentage to the equivalent number of instances and rounds up fractional instances.
The value parameter takes an integer.
For example, to set a minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 95.
-
-
traffic_routing_config(Optional[TrafficRoutingConfig], default:None) –The configuration that specifies how the deployment traffic is routed.
-
compute_platform(Optional[ComputePlatform], default:None) –The destination platform type for the deployment (
Lambda,Server, orECS). -
zonal_config(Optional[ZonalConfig], default:None) –Configure the
ZonalConfigobject if you want CodeDeploy to deploy your application to one Availability Zone at a time, within an Amazon Web Services Region.For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.
Raises:
-
DeploymentConfigAlreadyExistsException–A deployment configuration with the specified name with the user or Amazon Web Services account already exists.
-
DeploymentConfigLimitExceededException–The deployment configurations limit was exceeded.
-
DeploymentConfigNameRequiredException–The deployment configuration name was not specified.
-
InvalidComputePlatformException–The computePlatform is invalid. The computePlatform should be
Lambda,Server, orECS. -
InvalidDeploymentConfigNameException–The deployment configuration name was specified in an invalid format.
-
InvalidMinimumHealthyHostValueException–The minimum healthy instance value was specified in an invalid format.
-
InvalidTrafficRoutingConfigurationException–The configuration that specifies how traffic is routed during a deployment is invalid.
-
InvalidZonalDeploymentConfigurationException–The
ZonalConfigobject is not valid. -
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 | |