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
972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 | |