def deployment_group(self, function_logical_id):
deployment_preference = self.get(function_logical_id)<EOL>deployment_group = CodeDeployDeploymentGroup(self.deployment_group_logical_id(function_logical_id))<EOL>if deployment_preference.alarms is not None:<EOL><INDENT>deployment_group.AlarmConfiguration = {'<STR_LIT>': True,<EOL>'<STR_LIT>': [{'<STR_LIT:Name>': alarm} for alarm in<EOL>deployment_preference.alarms]}<EOL><DEDENT>deployment_group.ApplicationName = self.codedeploy_application.get_runtime_attr('<STR_LIT:name>')<EOL>deployment_group.AutoRollbackConfiguration = {'<STR_LIT>': True,<EOL>'<STR_LIT>': ['<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>']}<EOL>deployment_group.DeploymentConfigName = fnSub("<STR_LIT>",<EOL>{"<STR_LIT>": deployment_preference.deployment_type})<EOL>deployment_group.DeploymentStyle = {'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'}<EOL>deployment_group.ServiceRoleArn = self.codedeploy_iam_role.get_runtime_attr("<STR_LIT>")<EOL>if deployment_preference.role:<EOL><INDENT>deployment_group.ServiceRoleArn = deployment_preference.role<EOL><DEDENT>return deployment_group<EOL>
:param function_logical_id: logical_id of the function this deployment group belongs to
:return: CodeDeployDeploymentGroup resource