agent/api/task/task.go
func (task *Task) BuildCNIConfig() (*ecscni.Config, error) {
	if !task.isNetworkModeVPC() {
		return nil, errors.New("task config: task has no ENIs associated with it, unable to generate cni config")
	}

	cfg := &ecscni.Config{}
	convertENIToCNIConfig(task.GetTaskENI(), cfg)
	if task.GetAppMesh() != nil {
		convertAppMeshToCNIConfig(task.GetAppMesh(), cfg)
	}

	return cfg, nil
}
func (task *Task) BuildCNIConfig() (*ecscni.Config, error) {
	if !task.isNetworkModeVPC() {
		return nil, errors.New("task config: task has no ENIs associated with it, unable to generate cni config")
	}

	cfg := &ecscni.Config{}
	convertENIToCNIConfig(task.GetTaskENI(), cfg)
	if task.GetAppMesh() != nil {
		convertAppMeshToCNIConfig(task.GetAppMesh(), cfg)
	}

	return cfg, nil
}
// BuildCNIConfig constructs the cni configuration from eni