create_deployment_group
¶
create_deployment_group(
application_name: ApplicationName,
deployment_group_name: DeploymentGroupName,
service_role_arn: Role,
*,
config_overrides: Optional[CodeDeployClientConfig] = None,
deployment_config_name: Optional[DeploymentConfigName] = None,
ec2_tag_filters: Optional[EC2TagFilterList] = None,
on_premises_instance_tag_filters: Optional[TagFilterList] = None,
auto_scaling_groups: Optional[AutoScalingGroupNameList] = None,
trigger_configurations: Optional[TriggerConfigList] = None,
alarm_configuration: Optional[AlarmConfiguration] = None,
auto_rollback_configuration: Optional[AutoRollbackConfiguration] = None,
outdated_instances_strategy: Optional[OutdatedInstancesStrategy] = None,
deployment_style: Optional[DeploymentStyle] = None,
blue_green_deployment_configuration: Optional[
BlueGreenDeploymentConfiguration
] = None,
load_balancer_info: Optional[LoadBalancerInfo] = None,
ec2_tag_set: Optional[EC2TagSet] = None,
ecs_services: Optional[ECSServiceList] = None,
on_premises_tag_set: Optional[OnPremisesTagSet] = None,
tags: Optional[TagList] = None,
ec2_deployment_options: Optional[EC2DeploymentOptions] = None,
termination_hook_enabled: Optional[NullableBoolean] = None,
) -> CreateDeploymentGroupOutput
Creates a deployment group to which application revisions are deployed.
Parameters:
-
application_name(ApplicationName) –The name of an CodeDeploy application associated with the user or Amazon Web Services account.
-
deployment_group_name(DeploymentGroupName) –The name of a new deployment group for the specified application.
-
deployment_config_name(Optional[DeploymentConfigName], default:None) –If specified, the deployment configuration name can be either one of the predefined configurations provided with CodeDeploy or a custom deployment configuration that you create by calling the create deployment configuration operation.
CodeDeployDefault.OneAtATimeis the default deployment configuration. It is used if a configuration isn't specified for the deployment or deployment group.For more information about the predefined deployment configurations in CodeDeploy, see Working with Deployment Configurations in CodeDeploy in the CodeDeploy User Guide.
-
ec2_tag_filters(Optional[EC2TagFilterList], default:None) –The Amazon EC2 tags on which to filter. The deployment group includes Amazon EC2 instances with any of the specified tags. Cannot be used in the same call as ec2TagSet.
-
on_premises_instance_tag_filters(Optional[TagFilterList], default:None) –The on-premises instance tags on which to filter. The deployment group includes on-premises instances with any of the specified tags. Cannot be used in the same call as
OnPremisesTagSet. -
auto_scaling_groups(Optional[AutoScalingGroupNameList], default:None) –A list of associated Amazon EC2 Auto Scaling groups.
-
service_role_arn(Role) –A service role Amazon Resource Name (ARN) that allows CodeDeploy to act on the user's behalf when interacting with Amazon Web Services services.
-
trigger_configurations(Optional[TriggerConfigList], default:None) –Information about triggers to create when the deployment group is created. For examples, see Create a Trigger for an CodeDeploy Event in the CodeDeploy User Guide.
-
alarm_configuration(Optional[AlarmConfiguration], default:None) –Information to add about Amazon CloudWatch alarms when the deployment group is created.
-
auto_rollback_configuration(Optional[AutoRollbackConfiguration], default:None) –Configuration information for an automatic rollback that is added when a deployment group is created.
-
outdated_instances_strategy(Optional[OutdatedInstancesStrategy], default:None) –Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.
If this option is set to
UPDATEor is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.If this option is set to
IGNORE, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions. -
deployment_style(Optional[DeploymentStyle], default:None) –Information about the type of deployment, in-place or blue/green, that you want to run and whether to route deployment traffic behind a load balancer.
-
blue_green_deployment_configuration(Optional[BlueGreenDeploymentConfiguration], default:None) –Information about blue/green deployment options for a deployment group.
-
load_balancer_info(Optional[LoadBalancerInfo], default:None) –Information about the load balancer used in a deployment.
-
ec2_tag_set(Optional[EC2TagSet], default:None) –Information about groups of tags applied to Amazon EC2 instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups. Cannot be used in the same call as
ec2TagFilters. -
ecs_services(Optional[ECSServiceList], default:None) –The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format
.: -
on_premises_tag_set(Optional[OnPremisesTagSet], default:None) –Information about groups of tags applied to on-premises instances. The deployment group includes only on-premises instances identified by all of the tag groups. Cannot be used in the same call as
onPremisesInstanceTagFilters. -
tags(Optional[TagList], default:None) –The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.
-
termination_hook_enabled(Optional[NullableBoolean], default:None) –This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see Integrating CodeDeploy with Amazon EC2 Auto Scaling in the CodeDeploy User Guide.
Set
terminationHookEnabledtotrueto have CodeDeploy install a termination hook into your Auto Scaling group when you create a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.For information about termination deployments, see Enabling termination deployments during Auto Scaling scale-in events in the CodeDeploy User Guide.
For more information about Auto Scaling scale-in events, see the Scale in topic in the Amazon EC2 Auto Scaling User Guide.
Raises:
-
AlarmsLimitExceededException–The maximum number of alarms for a deployment group (10) was exceeded.
-
ApplicationDoesNotExistException–The application does not exist with the user or Amazon Web Services account.
-
ApplicationNameRequiredException–The minimum number of required application names was not specified.
-
DeploymentConfigDoesNotExistException–The deployment configuration does not exist with the user or Amazon Web Services account.
-
DeploymentGroupAlreadyExistsException–A deployment group with the specified name with the user or Amazon Web Services account already exists.
-
DeploymentGroupLimitExceededException–The deployment groups limit was exceeded.
-
DeploymentGroupNameRequiredException–The deployment group name was not specified.
-
ECSServiceMappingLimitExceededException–The Amazon ECS service is associated with more than one deployment groups. An Amazon ECS service can be associated with only one deployment group.
-
InvalidAlarmConfigException–The format of the alarm configuration is invalid. Possible causes include:
-
The alarm list is null.
-
The alarm object is null.
-
The alarm name is empty or null or exceeds the limit of 255 characters.
-
Two alarms with the same name have been specified.
-
The alarm configuration is enabled, but the alarm list is empty.
-
-
InvalidApplicationNameException–The application name was specified in an invalid format.
-
InvalidAutoRollbackConfigException–The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.
-
InvalidAutoScalingGroupException–The Auto Scaling group was specified in an invalid format or does not exist.
-
InvalidAutoScalingGroupProcessToSuspendException–The
autoScalingGroupProcessesToSuspendlist inec2DeploymentOptionscontains a process that is not valid. Valid values areTerminate,AZRebalance,InstanceRefresh, andScheduledActions. Process names are case sensitive. -
InvalidBlueGreenDeploymentConfigurationException–The configuration for the blue/green deployment group was provided in an invalid format. For information about deployment configuration format, see CreateDeploymentConfig.
-
InvalidDeploymentConfigNameException–The deployment configuration name was specified in an invalid format.
-
InvalidDeploymentGroupNameException–The deployment group name was specified in an invalid format.
-
InvalidDeploymentStyleException–An invalid deployment style was specified. Valid deployment types include "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" and "WITHOUT_TRAFFIC_CONTROL."
-
InvalidEC2TagCombinationException–A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but only one of these data types can be used in a single call.
-
InvalidEC2TagException–The tag was specified in an invalid format.
-
InvalidECSServiceException–The Amazon ECS service identifier is not valid.
-
InvalidInputException–The input was specified in an invalid format.
-
InvalidLoadBalancerInfoException–An invalid load balancer name, or no load balancer name, was specified.
-
InvalidOnPremisesTagCombinationException–A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, but only one of these data types can be used in a single call.
-
InvalidRoleException–The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.
-
InvalidTagException–The tag was specified in an invalid format.
-
InvalidTagsToAddException–The specified tags are not valid.
-
InvalidTargetGroupPairException–A target group pair associated with this deployment is not valid.
-
InvalidTrafficRoutingConfigurationException–The configuration that specifies how traffic is routed during a deployment is invalid.
-
InvalidTriggerConfigException–The trigger was specified in an invalid format.
-
LifecycleHookLimitExceededException–The limit for lifecycle hooks was exceeded.
-
RoleRequiredException–The role ID was not specified.
-
TagSetListLimitExceededException–The number of tag groups included in the tag set list exceeded the maximum allowed limit of 3.
-
ThrottlingException–An API function was called too frequently.
-
TriggerTargetsLimitExceededException–The maximum allowed number of triggers was exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codedeploy/_services/code_deploy.py
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 | |