create_deployment_group
async
¶
create_deployment_group(
application_name: ApplicationName,
deployment_group_name: DeploymentGroupName,
service_role_arn: Role,
*,
config_overrides: Optional[AsyncCodeDeployClientConfig] = 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,
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.
-
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/async_code_deploy.py
1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 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 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 | |